提交 70dd3c65 编写于 作者: V Viktor Dukhovni

Tidy up x509_vfy callback handling

Reviewed-by: NDr. Stephen Henson <steve@openssl.org>
上级 0f1ef63b
......@@ -81,7 +81,8 @@ struct X509_VERIFY_PARAM_st {
size_t iplen; /* Length of IP address */
};
int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int quiet);
/* No error callback if depth < 0 */
int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int depth);
/* a sequence of these are used */
struct x509_attributes_st {
......
......@@ -630,7 +630,7 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
}
/* If certificate matches all OK */
if (ctx->check_issued(ctx, x, obj.data.x509)) {
if (x509_check_cert_time(ctx, obj.data.x509, 1)) {
if (x509_check_cert_time(ctx, obj.data.x509, -1)) {
*issuer = obj.data.x509;
return 1;
}
......@@ -661,7 +661,7 @@ int X509_STORE_CTX_get1_issuer(X509 **issuer, X509_STORE_CTX *ctx, X509 *x)
* match if no certificate time is OK.
*/
if (x509_check_cert_time(ctx, *issuer, 1))
if (x509_check_cert_time(ctx, *issuer, -1))
break;
}
}
......
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册