Hi, I am currently writing my own TLS socket handshake and have all of it working besides the record's mac generation. I am using the TLS_RSA_WITH_AES_256_CBC_SHA cipher suite which I expect the mac generation to be done with a HMAC_SHA function as specified in the TLS 1.0 rfc specification. I have OpenSSL printing out the parameters it uses to generate the mac and they match the parameters that I am using and yet when I use the OpenSSL HMAC function with MD_sha1() as the first parameter I get a different value. I have tried everything that I can think of and can not work out how to calculate a matching mac.
Does anyone have any information on where I might be making my mistake? Thanks, James