diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2014-06-23 02:14:53 +0200 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2014-06-23 02:14:53 +0200 |
commit | a48fb0400c9c45d56144966b774998ebe37804ef (patch) | |
tree | 352943c96b5aa333b6ad39932b8b1e6c1cd34fab /crypto/x509 | |
parent | Drop hostlen from X509_VERIFY_PARAM_ID. (diff) | |
download | openssl-a48fb0400c9c45d56144966b774998ebe37804ef.tar.xz openssl-a48fb0400c9c45d56144966b774998ebe37804ef.zip |
X509_check_mumble() failure is <= 0, not just 0
Diffstat (limited to 'crypto/x509')
-rw-r--r-- | crypto/x509/x509_vfy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c index b6d4989e4b..b6f16bb772 100644 --- a/crypto/x509/x509_vfy.c +++ b/crypto/x509/x509_vfy.c @@ -748,17 +748,17 @@ static int check_id(X509_STORE_CTX *ctx) X509_VERIFY_PARAM *vpm = ctx->param; X509_VERIFY_PARAM_ID *id = vpm->id; X509 *x = ctx->cert; - if (id->host && !X509_check_host(x, id->host, 0, id->hostflags)) + if (id->host && X509_check_host(x, id->host, 0, id->hostflags) <= 0) { if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH)) return 0; } - if (id->email && !X509_check_email(x, id->email, id->emaillen, 0)) + if (id->email && X509_check_email(x, id->email, id->emaillen, 0) <= 0) { if (!check_id_error(ctx, X509_V_ERR_EMAIL_MISMATCH)) return 0; } - if (id->ip && !X509_check_ip(x, id->ip, id->iplen, 0)) + if (id->ip && X509_check_ip(x, id->ip, id->iplen, 0) <= 0) { if (!check_id_error(ctx, X509_V_ERR_IP_ADDRESS_MISMATCH)) return 0; |