diff options
-rw-r--r-- | ssl/ssl_cert.c | 24 |
1 files changed, 1 insertions, 23 deletions
diff --git a/ssl/ssl_cert.c b/ssl/ssl_cert.c index 771ec67..f083920 100644 --- a/ssl/ssl_cert.c +++ b/ssl/ssl_cert.c @@ -247,29 +247,7 @@ CERT *ssl_cert_dup(CERT *cert) if (cpk->privatekey != NULL) { - rpk->privatekey = cpk->privatekey; - CRYPTO_add(&cpk->privatekey->references, 1, - CRYPTO_LOCK_EVP_PKEY); - - switch(i) - { - /* If there was anything special to do for - * certain types of keys, we'd do it here. - * (Nothing at the moment, I think.) */ - - case SSL_PKEY_RSA_ENC: - case SSL_PKEY_RSA_SIGN: - /* We have an RSA key. */ - break; - - case SSL_PKEY_ECC: - /* We have an ECC key */ - break; - - default: - /* Can't happen. */ - OPENSSL_PUT_ERROR(SSL, ssl_cert_dup, SSL_R_LIBRARY_BUG); - } + rpk->privatekey = EVP_PKEY_dup(cpk->privatekey); } if (cpk->chain) |