Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdam Langley <agl@chromium.org>2015-02-11 23:09:10 +0300
committerAdam Langley <agl@chromium.org>2015-02-13 21:58:55 +0300
commitc68f3e02b0060190caccc6f8b8d1f398f041fb79 (patch)
tree7eb675ae19ca3cdff82ff1b5366abf70f651ad32 /crypto/x509
parentfcd34624a14a3bfe8b445b57cbfa81b945b3706e (diff)
X509_check_mumble() failure is <= 0, not just 0.
(This change is for a future change that increases the range of the return values.) (Imported from upstream's 3fc0b1edad0c75d7beb51fa77f63ffe817295e2c.) Change-Id: I221d4ee0e90586f89f731e01ff4d813058173211
Diffstat (limited to 'crypto/x509')
-rw-r--r--crypto/x509/x509_vfy.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/crypto/x509/x509_vfy.c b/crypto/x509/x509_vfy.c
index 3c492ab1..1650b77a 100644
--- a/crypto/x509/x509_vfy.c
+++ b/crypto/x509/x509_vfy.c
@@ -709,17 +709,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, strlen((const char*) id->host), id->hostflags))
+ if (id->host && X509_check_host(x, id->host, strlen((const char*) id->host), 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;