diff options
author | Dr. Stephen Henson <steve@openssl.org> | 2009-01-07 23:44:27 +0000 |
---|---|---|
committer | Dr. Stephen Henson <steve@openssl.org> | 2009-01-07 23:44:27 +0000 |
commit | bab534057b855a7dbf98261d494897b3542bd9d5 (patch) | |
tree | 8f339a962fce59f79aca9d68eee75304b885d551 /ssl | |
parent | cec2af75102df52c2f270b3751e3487f47fccb6c (diff) |
Updatde from stable branch.
Diffstat (limited to 'ssl')
-rw-r--r-- | ssl/s2_clnt.c | 2 | ||||
-rw-r--r-- | ssl/s2_srvr.c | 4 | ||||
-rw-r--r-- | ssl/s3_clnt.c | 6 | ||||
-rw-r--r-- | ssl/s3_srvr.c | 2 | ||||
-rw-r--r-- | ssl/ssltest.c | 2 |
5 files changed, 8 insertions, 8 deletions
diff --git a/ssl/s2_clnt.c b/ssl/s2_clnt.c index e976ba82e9..00ac158f9b 100644 --- a/ssl/s2_clnt.c +++ b/ssl/s2_clnt.c @@ -1046,7 +1046,7 @@ int ssl2_set_certificate(SSL *s, int type, int len, const unsigned char *data) i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i)) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0)) { SSLerr(SSL_F_SSL2_SET_CERTIFICATE,SSL_R_CERTIFICATE_VERIFY_FAILED); goto err; diff --git a/ssl/s2_srvr.c b/ssl/s2_srvr.c index b43a046aa6..c3b4e1d1c7 100644 --- a/ssl/s2_srvr.c +++ b/ssl/s2_srvr.c @@ -1054,7 +1054,7 @@ static int request_certificate(SSL *s) i=ssl_verify_cert_chain(s,sk); - if (i) /* we like the packet, now check the chksum */ + if (i > 0) /* we like the packet, now check the chksum */ { EVP_MD_CTX ctx; EVP_PKEY *pkey=NULL; @@ -1083,7 +1083,7 @@ static int request_certificate(SSL *s) EVP_PKEY_free(pkey); EVP_MD_CTX_cleanup(&ctx); - if (i) + if (i > 0) { if (s->session->peer != NULL) X509_free(s->session->peer); diff --git a/ssl/s3_clnt.c b/ssl/s3_clnt.c index af97a7e138..5d89086571 100644 --- a/ssl/s3_clnt.c +++ b/ssl/s3_clnt.c @@ -1018,7 +1018,7 @@ int ssl3_get_server_certificate(SSL *s) } i=ssl_verify_cert_chain(s,sk); - if ((s->verify_mode != SSL_VERIFY_NONE) && (!i) + if ((s->verify_mode != SSL_VERIFY_NONE) && (i <= 0) #ifndef OPENSSL_NO_KRB5 && !((s->s3->tmp.new_cipher->algorithm_mkey & SSL_kKRB5) && (s->s3->tmp.new_cipher->algorithm_auth & SSL_aKRB5)) @@ -1554,7 +1554,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; @@ -1572,7 +1572,7 @@ int ssl3_get_key_exchange(SSL *s) EVP_VerifyUpdate(&md_ctx,&(s->s3->client_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,&(s->s3->server_random[0]),SSL3_RANDOM_SIZE); EVP_VerifyUpdate(&md_ctx,param,param_len); - if (!EVP_VerifyFinal(&md_ctx,p,(int)n,pkey)) + if (EVP_VerifyFinal(&md_ctx,p,(int)n,pkey) <= 0) { /* bad signature */ al=SSL_AD_DECRYPT_ERROR; diff --git a/ssl/s3_srvr.c b/ssl/s3_srvr.c index eaaadde3ad..44a67f86d5 100644 --- a/ssl/s3_srvr.c +++ b/ssl/s3_srvr.c @@ -2844,7 +2844,7 @@ int ssl3_get_client_certificate(SSL *s) else { i=ssl_verify_cert_chain(s,sk); - if (!i) + if (i <= 0) { al=ssl_verify_alarm_type(s->verify_result); SSLerr(SSL_F_SSL3_GET_CLIENT_CERTIFICATE,SSL_R_NO_CERTIFICATE_RETURNED); diff --git a/ssl/ssltest.c b/ssl/ssltest.c index c76f6677b4..9ef43dfa88 100644 --- a/ssl/ssltest.c +++ b/ssl/ssltest.c @@ -2177,7 +2177,7 @@ static int MS_CALLBACK app_verify_callback(X509_STORE_CTX *ctx, void *arg) if (cb_arg->proxy_auth) { - if (ok) + if (ok > 0) { const char *cond_end = NULL; |