Updated version for compatibility with 1.0.0beta1:
--- ssl/ssl.h 2008-12-27 03:09:23.000000000 +0100 +++ ssl/ssl.h 2009-04-16 10:14:12.000000000 +0200 @@ -1770,6 +1770,10 @@ /* Pre-shared secret session resumption functions */ int SSL_set_session_secret_cb(SSL *s, tls_session_secret_cb_fn tls_session_secret_cb, void *arg); +void SSL_tls1_key_extractor(SSL *s, unsigned char *label, int label_len, + unsigned char *context, int context_len, + unsigned char *out, int olen); + /* BEGIN ERROR CODES */ /* The following lines are auto generated by the script mkerr.pl. Any changes * made after this point may be overwritten when the script is next run. --- ssl/t1_enc.c 2009-01-11 21:34:23.000000000 +0100 +++ ssl/t1_enc.c 2009-04-16 10:14:12.000000000 +0200 @@ -1006,3 +1006,24 @@ } } +void SSL_tls1_key_extractor(SSL *s, unsigned char *label, int label_len, + unsigned char *context, int context_len, + unsigned char *out, int olen) + { + unsigned char buf[label_len + 2 * SSL3_RANDOM_SIZE + context_len]; + unsigned char tmp[olen], *p; + + p = buf; + memcpy(p, label, label_len); + p += label_len; + memcpy(p, s->s3->client_random, SSL3_RANDOM_SIZE); + p += SSL3_RANDOM_SIZE; + memcpy(p, s->s3->server_random, SSL3_RANDOM_SIZE); + p += SSL3_RANDOM_SIZE; + memcpy(p, context, context_len); + + tls1_PRF(s->ctx->md5,s->ctx->sha1,buf,sizeof(buf), + s->session->master_key,s->session->master_key_length, + out, tmp,olen); + } + ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List openssl-dev@openssl.org Automated List Manager majord...@openssl.org