Loading crypto/evp/p_lib.c +9 −6 Original line number Diff line number Diff line Loading @@ -210,7 +210,8 @@ int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key) int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) { int ret = EVP_PKEY_assign_RSA(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_RSA); if(ret) RSA_up(key); return ret; } Loading @@ -220,7 +221,7 @@ RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_RSA, EVP_R_EXPECTING_AN_RSA_KEY); return NULL; } CRYPTO_add(&pkey->pkey.rsa->references, 1, CRYPTO_LOCK_RSA); RSA_up(pkey->pkey.rsa); return pkey->pkey.rsa; } #endif Loading @@ -229,7 +230,8 @@ RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey) int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) { int ret = EVP_PKEY_assign_DSA(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_DSA); if(ret) DSA_up(key); return ret; } Loading @@ -239,7 +241,7 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_DSA, EVP_R_EXPECTING_A_DSA_KEY); return NULL; } CRYPTO_add(&pkey->pkey.dsa->references, 1, CRYPTO_LOCK_DSA); DSA_up(pkey->pkey.dsa); return pkey->pkey.dsa; } #endif Loading @@ -249,7 +251,8 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) { int ret = EVP_PKEY_assign_DH(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_DH); if(ret) DH_up(key); return ret; } Loading @@ -259,7 +262,7 @@ DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_DH, EVP_R_EXPECTING_A_DH_KEY); return NULL; } CRYPTO_add(&pkey->pkey.dh->references, 1, CRYPTO_LOCK_DH); DH_up(pkey->pkey.dh); return pkey->pkey.dh; } #endif Loading ssl/s3_srvr.c +1 −1 Original line number Diff line number Diff line Loading @@ -982,7 +982,7 @@ static int ssl3_send_server_key_exchange(SSL *s) SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ERROR_GENERATING_TMP_RSA_KEY); goto f_err; } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); cert->rsa_tmp=rsa; } if (rsa == NULL) Loading ssl/ssl_cert.c +1 −1 Original line number Diff line number Diff line Loading @@ -190,8 +190,8 @@ CERT *ssl_cert_dup(CERT *cert) #ifndef OPENSSL_NO_RSA if (cert->rsa_tmp != NULL) { RSA_up(cert->rsa_tmp); ret->rsa_tmp = cert->rsa_tmp; CRYPTO_add(&ret->rsa_tmp->references, 1, CRYPTO_LOCK_RSA); } ret->rsa_tmp_cb = cert->rsa_tmp_cb; #endif Loading ssl/ssl_rsa.c +2 −2 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) return(0); } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); EVP_PKEY_assign_RSA(pkey,rsa); ret=ssl_set_pkey(ssl->cert,pkey); Loading Loading @@ -582,7 +582,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) return(0); } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); EVP_PKEY_assign_RSA(pkey,rsa); ret=ssl_set_pkey(ctx->cert, pkey); Loading Loading
crypto/evp/p_lib.c +9 −6 Original line number Diff line number Diff line Loading @@ -210,7 +210,8 @@ int EVP_PKEY_assign(EVP_PKEY *pkey, int type, char *key) int EVP_PKEY_set1_RSA(EVP_PKEY *pkey, RSA *key) { int ret = EVP_PKEY_assign_RSA(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_RSA); if(ret) RSA_up(key); return ret; } Loading @@ -220,7 +221,7 @@ RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_RSA, EVP_R_EXPECTING_AN_RSA_KEY); return NULL; } CRYPTO_add(&pkey->pkey.rsa->references, 1, CRYPTO_LOCK_RSA); RSA_up(pkey->pkey.rsa); return pkey->pkey.rsa; } #endif Loading @@ -229,7 +230,8 @@ RSA *EVP_PKEY_get1_RSA(EVP_PKEY *pkey) int EVP_PKEY_set1_DSA(EVP_PKEY *pkey, DSA *key) { int ret = EVP_PKEY_assign_DSA(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_DSA); if(ret) DSA_up(key); return ret; } Loading @@ -239,7 +241,7 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_DSA, EVP_R_EXPECTING_A_DSA_KEY); return NULL; } CRYPTO_add(&pkey->pkey.dsa->references, 1, CRYPTO_LOCK_DSA); DSA_up(pkey->pkey.dsa); return pkey->pkey.dsa; } #endif Loading @@ -249,7 +251,8 @@ DSA *EVP_PKEY_get1_DSA(EVP_PKEY *pkey) int EVP_PKEY_set1_DH(EVP_PKEY *pkey, DH *key) { int ret = EVP_PKEY_assign_DH(pkey, key); if(ret) CRYPTO_add(&key->references, 1, CRYPTO_LOCK_DH); if(ret) DH_up(key); return ret; } Loading @@ -259,7 +262,7 @@ DH *EVP_PKEY_get1_DH(EVP_PKEY *pkey) EVPerr(EVP_F_EVP_PKEY_GET1_DH, EVP_R_EXPECTING_A_DH_KEY); return NULL; } CRYPTO_add(&pkey->pkey.dh->references, 1, CRYPTO_LOCK_DH); DH_up(pkey->pkey.dh); return pkey->pkey.dh; } #endif Loading
ssl/s3_srvr.c +1 −1 Original line number Diff line number Diff line Loading @@ -982,7 +982,7 @@ static int ssl3_send_server_key_exchange(SSL *s) SSLerr(SSL_F_SSL3_SEND_SERVER_KEY_EXCHANGE,SSL_R_ERROR_GENERATING_TMP_RSA_KEY); goto f_err; } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); cert->rsa_tmp=rsa; } if (rsa == NULL) Loading
ssl/ssl_cert.c +1 −1 Original line number Diff line number Diff line Loading @@ -190,8 +190,8 @@ CERT *ssl_cert_dup(CERT *cert) #ifndef OPENSSL_NO_RSA if (cert->rsa_tmp != NULL) { RSA_up(cert->rsa_tmp); ret->rsa_tmp = cert->rsa_tmp; CRYPTO_add(&ret->rsa_tmp->references, 1, CRYPTO_LOCK_RSA); } ret->rsa_tmp_cb = cert->rsa_tmp_cb; #endif Loading
ssl/ssl_rsa.c +2 −2 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ int SSL_use_RSAPrivateKey(SSL *ssl, RSA *rsa) return(0); } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); EVP_PKEY_assign_RSA(pkey,rsa); ret=ssl_set_pkey(ssl->cert,pkey); Loading Loading @@ -582,7 +582,7 @@ int SSL_CTX_use_RSAPrivateKey(SSL_CTX *ctx, RSA *rsa) return(0); } CRYPTO_add(&rsa->references,1,CRYPTO_LOCK_RSA); RSA_up(rsa); EVP_PKEY_assign_RSA(pkey,rsa); ret=ssl_set_pkey(ctx->cert, pkey); Loading