From 6f34a74075b653d56f70c881dbc7b45c6bbdfa13 Mon Sep 17 00:00:00 2001 From: tb Date: Mon, 4 Jul 2022 12:17:32 +0000 Subject: [PATCH] Prepare to provide X509_VERIFY_PARAM_get_time() ok jsing sthen --- lib/libcrypto/x509/x509_vfy.h | 3 ++- lib/libcrypto/x509/x509_vpm.c | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/libcrypto/x509/x509_vfy.h b/lib/libcrypto/x509/x509_vfy.h index d31e779aae7..b18dd02fc0a 100644 --- a/lib/libcrypto/x509/x509_vfy.h +++ b/lib/libcrypto/x509/x509_vfy.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.h,v 1.52 2022/06/27 14:10:22 tb Exp $ */ +/* $OpenBSD: x509_vfy.h,v 1.53 2022/07/04 12:17:32 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -435,6 +435,7 @@ int X509_VERIFY_PARAM_set_trust(X509_VERIFY_PARAM *param, int trust); void X509_VERIFY_PARAM_set_depth(X509_VERIFY_PARAM *param, int depth); #if defined(LIBRESSL_INTERNAL) void X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level); +time_t X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param); #endif void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t); int X509_VERIFY_PARAM_add0_policy(X509_VERIFY_PARAM *param, diff --git a/lib/libcrypto/x509/x509_vpm.c b/lib/libcrypto/x509/x509_vpm.c index d4ec2c597f7..e14d7a36fd6 100644 --- a/lib/libcrypto/x509/x509_vpm.c +++ b/lib/libcrypto/x509/x509_vpm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vpm.c,v 1.29 2022/06/27 14:00:09 tb Exp $ */ +/* $OpenBSD: x509_vpm.c,v 1.30 2022/07/04 12:17:32 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2004. */ @@ -459,6 +459,12 @@ X509_VERIFY_PARAM_set_auth_level(X509_VERIFY_PARAM *param, int auth_level) param->security_level = auth_level; } +time_t +X509_VERIFY_PARAM_get_time(const X509_VERIFY_PARAM *param) +{ + return param->check_time; +} + void X509_VERIFY_PARAM_set_time(X509_VERIFY_PARAM *param, time_t t) { -- 2.20.1