Remove redundant TLS exporter.
authorBen Laurie <ben@openssl.org>
Tue, 13 Dec 2011 15:57:39 +0000 (15:57 +0000)
committerBen Laurie <ben@openssl.org>
Tue, 13 Dec 2011 15:57:39 +0000 (15:57 +0000)
ssl/ssl.h
ssl/t1_enc.c

index 7c012685646691cff9fdad00144c820f6d82842e..92c1f43899d2c3ac781e000d043918e9f1591184 100644 (file)
--- a/ssl/ssl.h
+++ b/ssl/ssl.h
@@ -2028,10 +2028,6 @@ int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb,
 /* 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);
 
-int SSL_tls1_key_exporter(SSL *s, unsigned char *label, int label_len,
-                           unsigned char *context, int context_len,
-                           unsigned char *out, int olen);
-
 void SSL_CTX_set_not_resumable_session_callback(SSL_CTX *ctx,
        int (*cb)(SSL *ssl, int is_forward_secure));
 
index 1c6fe5d82ae92dbf574b4b2ab10666245bab3685..5c1074e245e7407160b3ed82db4b2ee04adacf69 100644 (file)
@@ -1124,7 +1124,7 @@ int tls1_export_keying_material(SSL *s, unsigned char *out, unsigned int olen,
          unsigned int contextlen, int use_context)
        {
        unsigned char *buff;
-       unsigned char *val;
+       unsigned char *val = NULL;
        unsigned int vallen, currentvalpos, rv;
 
 #ifdef KSSL_DEBUG
@@ -1249,27 +1249,3 @@ int tls1_alert_code(int code)
        default:                        return(-1);
                }
        }
-
-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(ssl_get_algorithm2(s),
-                        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;
-       }