X509_check_mumble() failure is <= 0, not just 0
(cherry picked from commit a48fb0400c9c45d56144966b774998ebe37804ef)
This commit is contained in:
parent
3d15d58e55
commit
3fc0b1edad
@ -724,17 +724,17 @@ static int check_id(X509_STORE_CTX *ctx)
|
|||||||
X509_VERIFY_PARAM *vpm = ctx->param;
|
X509_VERIFY_PARAM *vpm = ctx->param;
|
||||||
X509_VERIFY_PARAM_ID *id = vpm->id;
|
X509_VERIFY_PARAM_ID *id = vpm->id;
|
||||||
X509 *x = ctx->cert;
|
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))
|
if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH))
|
||||||
return 0;
|
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))
|
if (!check_id_error(ctx, X509_V_ERR_EMAIL_MISMATCH))
|
||||||
return 0;
|
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))
|
if (!check_id_error(ctx, X509_V_ERR_IP_ADDRESS_MISMATCH))
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user