Loading crypto/x509/x509_lcl.h +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ struct X509_VERIFY_PARAM_ID_st { unsigned char *host; /* If not NULL hostname to match */ size_t hostlen; unsigned int hostflags; /* Flags to control matching features */ unsigned char *email; /* If not NULL email address to match */ size_t emaillen; Loading crypto/x509/x509_vfy.c +1 −2 Original line number Diff line number Diff line Loading @@ -748,8 +748,7 @@ 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, id->hostlen, id->hostflags)) if (id->host && !X509_check_host(x, id->host, 0, id->hostflags)) { if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH)) return 0; Loading crypto/x509/x509_vpm.c +3 −5 Original line number Diff line number Diff line Loading @@ -91,7 +91,6 @@ static void x509_verify_param_zero(X509_VERIFY_PARAM *param) { OPENSSL_free(paramid->host); paramid->host = NULL; paramid->hostlen = 0; } if (paramid->email) { Loading Loading @@ -237,7 +236,7 @@ int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, if (test_x509_verify_param_copy_id(host, NULL)) { if (!X509_VERIFY_PARAM_set1_host(dest, id->host, id->hostlen)) if (!X509_VERIFY_PARAM_set1_host(dest, id->host, 0)) return 0; dest->id->hostflags = id->hostflags; } Loading Loading @@ -399,8 +398,7 @@ int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, const unsigned char *name, size_t namelen) { return int_x509_param_set1(¶m->id->host, ¶m->id->hostlen, name, namelen); return int_x509_param_set1(¶m->id->host, NULL, name, namelen); } void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, Loading Loading @@ -444,7 +442,7 @@ const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param) return param->name; } static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0, 0U, NULL, 0, NULL, 0}; static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0U, NULL, 0, NULL, 0}; #define vpm_empty_id (X509_VERIFY_PARAM_ID *)&_empty_id Loading crypto/x509v3/v3_utl.c +4 −0 Original line number Diff line number Diff line Loading @@ -972,6 +972,10 @@ static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen, int X509_check_host(X509 *x, const unsigned char *chk, size_t chklen, unsigned int flags) { if (chklen == 0) chklen = chk ? strlen((char *)chk) : 0; else if (chk && memchr(chk, '\0', chklen)) return 0; return do_x509_check(x, chk, chklen, flags, GEN_DNS); } Loading Loading
crypto/x509/x509_lcl.h +0 −1 Original line number Diff line number Diff line Loading @@ -61,7 +61,6 @@ struct X509_VERIFY_PARAM_ID_st { unsigned char *host; /* If not NULL hostname to match */ size_t hostlen; unsigned int hostflags; /* Flags to control matching features */ unsigned char *email; /* If not NULL email address to match */ size_t emaillen; Loading
crypto/x509/x509_vfy.c +1 −2 Original line number Diff line number Diff line Loading @@ -748,8 +748,7 @@ 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, id->hostlen, id->hostflags)) if (id->host && !X509_check_host(x, id->host, 0, id->hostflags)) { if (!check_id_error(ctx, X509_V_ERR_HOSTNAME_MISMATCH)) return 0; Loading
crypto/x509/x509_vpm.c +3 −5 Original line number Diff line number Diff line Loading @@ -91,7 +91,6 @@ static void x509_verify_param_zero(X509_VERIFY_PARAM *param) { OPENSSL_free(paramid->host); paramid->host = NULL; paramid->hostlen = 0; } if (paramid->email) { Loading Loading @@ -237,7 +236,7 @@ int X509_VERIFY_PARAM_inherit(X509_VERIFY_PARAM *dest, if (test_x509_verify_param_copy_id(host, NULL)) { if (!X509_VERIFY_PARAM_set1_host(dest, id->host, id->hostlen)) if (!X509_VERIFY_PARAM_set1_host(dest, id->host, 0)) return 0; dest->id->hostflags = id->hostflags; } Loading Loading @@ -399,8 +398,7 @@ int X509_VERIFY_PARAM_set1_policies(X509_VERIFY_PARAM *param, int X509_VERIFY_PARAM_set1_host(X509_VERIFY_PARAM *param, const unsigned char *name, size_t namelen) { return int_x509_param_set1(¶m->id->host, ¶m->id->hostlen, name, namelen); return int_x509_param_set1(¶m->id->host, NULL, name, namelen); } void X509_VERIFY_PARAM_set_hostflags(X509_VERIFY_PARAM *param, Loading Loading @@ -444,7 +442,7 @@ const char *X509_VERIFY_PARAM_get0_name(const X509_VERIFY_PARAM *param) return param->name; } static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0, 0U, NULL, 0, NULL, 0}; static X509_VERIFY_PARAM_ID _empty_id = {NULL, 0U, NULL, 0, NULL, 0}; #define vpm_empty_id (X509_VERIFY_PARAM_ID *)&_empty_id Loading
crypto/x509v3/v3_utl.c +4 −0 Original line number Diff line number Diff line Loading @@ -972,6 +972,10 @@ static int do_x509_check(X509 *x, const unsigned char *chk, size_t chklen, int X509_check_host(X509 *x, const unsigned char *chk, size_t chklen, unsigned int flags) { if (chklen == 0) chklen = chk ? strlen((char *)chk) : 0; else if (chk && memchr(chk, '\0', chklen)) return 0; return do_x509_check(x, chk, chklen, flags, GEN_DNS); } Loading