Zero the premaster secret after deriving the master secret in DH
[openssl.git] / ssl / ssl_rsa.c
index f367d39bdc13346b278f2ab13768d665ce7a7d38..34a4d27dbee57df8e8deeeb9515a75fd21758fcb 100644 (file)
@@ -303,7 +303,7 @@ end:
 int SSL_use_RSAPrivateKey_ASN1(SSL *ssl, unsigned char *d, long len)
        {
        int ret;
-       unsigned char *p;
+       const unsigned char *p;
        RSA *rsa;
 
        p=d;
@@ -641,7 +641,7 @@ end:
 int SSL_CTX_use_RSAPrivateKey_ASN1(SSL_CTX *ctx, unsigned char *d, long len)
        {
        int ret;
-       unsigned char *p;
+       const unsigned char *p;
        RSA *rsa;
 
        p=d;
@@ -794,7 +794,7 @@ int SSL_CTX_use_certificate_chain_file(SSL_CTX *ctx, const char *file)
                                ret = 0;
                                goto end;
                                }
-                       /* Note that we must not free r if it was succesully
+                       /* Note that we must not free r if it was successfully
                         * added to the chain (while we must free the main
                         * certificate, since its reference count is increased
                         * by SSL_CTX_use_certificate). */