Remove redundant checks in ssl_cert_dup. This was causing spurious error messages...
authorMatt Caswell <matt@openssl.org>
Thu, 27 Nov 2014 11:06:43 +0000 (11:06 +0000)
committerMatt Caswell <matt@openssl.org>
Thu, 27 Nov 2014 20:53:58 +0000 (20:53 +0000)
PR#3613

Reviewed-by: Richard Levitte <levitte@openssl.org>
(cherry picked from commit fc3968a25ce0c16cab8730ec0d68a59856158029)

ssl/ssl_cert.c

index 5123a89182e590267edcb5b382ab5a767128fb85..cef3ff46e4a3f65eb1cb78fc3b631b05e92b2f6a 100644 (file)
@@ -286,35 +286,6 @@ CERT *ssl_cert_dup(CERT *cert)
                        ret->pkeys[i].privatekey = cert->pkeys[i].privatekey;
                        CRYPTO_add(&ret->pkeys[i].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_DSA_SIGN:
-                               /* We have a DSA key. */
-                               break;
-                               
-                       case SSL_PKEY_DH_RSA:
-                       case SSL_PKEY_DH_DSA:
-                               /* We have a DH key. */
-                               break;
-
-                       case SSL_PKEY_ECC:
-                               /* We have an ECC key */
-                               break;
-
-                       default:
-                               /* Can't happen. */
-                               SSLerr(SSL_F_SSL_CERT_DUP, SSL_R_LIBRARY_BUG);
-                               }
                        }
                }