aboutsummaryrefslogtreecommitdiff
path: root/ssl/t1_enc.c
diff options
context:
space:
mode:
authorDr. Stephen Henson <steve@openssl.org>2010-07-18 16:52:47 +0000
committerDr. Stephen Henson <steve@openssl.org>2010-07-18 16:52:47 +0000
commitd135da51922dc756ab42643099de96728891f1d4 (patch)
tree5998caa0907237e136a81ab7670023d9e6682a4e /ssl/t1_enc.c
parent75db4b2f7be3291fe72fc3e1191ba0016aebb5f8 (diff)
downloadopenssl-d135da51922dc756ab42643099de96728891f1d4.zip
openssl-d135da51922dc756ab42643099de96728891f1d4.tar.gz
openssl-d135da51922dc756ab42643099de96728891f1d4.tar.bz2
Fix warnings (From HEAD, original patch by Ben).
Diffstat (limited to 'ssl/t1_enc.c')
-rw-r--r--ssl/t1_enc.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/ssl/t1_enc.c b/ssl/t1_enc.c
index 5446bb2..3614b8a 100644
--- a/ssl/t1_enc.c
+++ b/ssl/t1_enc.c
@@ -1071,3 +1071,26 @@ int tls1_alert_code(int code)
}
}
+int SSL_tls1_key_exporter(SSL *s, unsigned char *label, int label_len,
+ unsigned char *context, int context_len,
+ unsigned char *out, int olen)
+ {
+ unsigned char *tmp;
+ int rv;
+
+ tmp = OPENSSL_malloc(olen);
+
+ if (!tmp)
+ return 0;
+
+ rv = tls1_PRF(s->s3->tmp.new_cipher->algorithm2,
+ label, label_len,
+ s->s3->client_random,SSL3_RANDOM_SIZE,
+ s->s3->server_random,SSL3_RANDOM_SIZE,
+ context, context_len, NULL, 0,
+ s->session->master_key, s->session->master_key_length,
+ out, tmp, olen);
+
+ OPENSSL_free(tmp);
+ return rv;
+ }