Style tweaks following review feedback

Reviewed-by: Rich Salz <rsalz@openssl.org>
This commit is contained in:
Matt Caswell 2016-09-20 10:16:15 +01:00
parent 15e6be6c5c
commit 418a18a2de
3 changed files with 3 additions and 3 deletions

View File

@ -769,7 +769,7 @@ int ssl_add_cert_chain(SSL *s, WPACKET *pkt, CERT_PKEY *cpk)
STACK_OF(X509) *chain = NULL;
X509_STORE *chain_store;
if (!cpk || !cpk->x509)
if (cpk == NULL || cpk->x509 == NULL)
return 1;
x = cpk->x509;

View File

@ -2625,7 +2625,6 @@ int tls_construct_client_verify(SSL *s)
unsigned char *sig = NULL;
WPACKET pkt;
if (!WPACKET_init(&pkt, s->init_buf)) {
/* Should not happen */
SSLerr(SSL_F_TLS_CONSTRUCT_CLIENT_VERIFY, ERR_R_INTERNAL_ERROR);

View File

@ -3122,7 +3122,8 @@ static int tls12_find_nid(int id, const tls12_lookup *table, size_t tlen)
int tls12_get_sigandhash(WPACKET *pkt, const EVP_PKEY *pk, const EVP_MD *md)
{
int sig_id, md_id;
if (!md)
if (md == NULL)
return 0;
md_id = tls12_find_id(EVP_MD_type(md), tls12_md, OSSL_NELEM(tls12_md));
if (md_id == -1)