Skip to content

Commit

Permalink
Remove unnuecessary ifdefs.
Browse files Browse the repository at this point in the history
If RSA or DSA is disabled we will never use a ciphersuite with
RSA/DSA authentication as it is already filtered out by the cipher
list logic.

Reviewed-by: Richard Levitte <[email protected]>
  • Loading branch information
snhenson committed Jun 22, 2015
1 parent a273c6e commit 8df53b7
Showing 1 changed file with 2 additions and 18 deletions.
20 changes: 2 additions & 18 deletions ssl/s3_clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1617,16 +1617,8 @@ int ssl3_get_key_exchange(SSL *s)
}

/* We must check if there is a certificate */
# ifndef OPENSSL_NO_RSA
if (alg_a & SSL_aRSA)
if (alg_a & (SSL_aRSA|SSL_aDSS))
pkey = X509_get_pubkey(s->session->peer);
# else
if (0) ;
# endif
# ifndef OPENSSL_NO_DSA
else if (alg_a & SSL_aDSS)
pkey = X509_get_pubkey(s->session->peer);
# endif
} else
#endif /* !OPENSSL_NO_SRP */
#ifndef OPENSSL_NO_RSA
Expand Down Expand Up @@ -1774,16 +1766,8 @@ int ssl3_get_key_exchange(SSL *s)
SSLerr(SSL_F_SSL3_GET_KEY_EXCHANGE, SSL_R_DH_KEY_TOO_SMALL);
goto f_err;
}
# ifndef OPENSSL_NO_RSA
if (alg_a & SSL_aRSA)
if (alg_a & (SSL_aRSA|SSL_aDSS))
pkey = X509_get_pubkey(s->session->peer);
# else
if (0) ;
# endif
# ifndef OPENSSL_NO_DSA
else if (alg_a & SSL_aDSS)
pkey = X509_get_pubkey(s->session->peer);
# endif
/* else anonymous DH, so no certificate or pkey. */

s->s3->peer_dh_tmp = dh;
Expand Down

0 comments on commit 8df53b7

Please sign in to comment.