From 3b8a78795bef4ca09dc876e28a533d702bf5275d Mon Sep 17 00:00:00 2001 From: beck <> Date: Fri, 4 Nov 2016 18:07:24 +0000 Subject: make public ASN1_time_parse and ASN1_time_tm_cmp to replace former hidden functions.. document with a man page. bump majors on libtls, libssl, libcrypto ok jsing@ guenther@ --- src/lib/libcrypto/x509/vpm_int.h | 0 src/lib/libcrypto/x509/x509_lcl.h | 2 -- src/lib/libcrypto/x509/x509_vfy.c | 6 +++--- 3 files changed, 3 insertions(+), 5 deletions(-) create mode 100644 src/lib/libcrypto/x509/vpm_int.h (limited to 'src/lib/libcrypto/x509') diff --git a/src/lib/libcrypto/x509/vpm_int.h b/src/lib/libcrypto/x509/vpm_int.h new file mode 100644 index 0000000000..e69de29bb2 diff --git a/src/lib/libcrypto/x509/x509_lcl.h b/src/lib/libcrypto/x509/x509_lcl.h index 9ffdd01e61..b16df78ad7 100644 --- a/src/lib/libcrypto/x509/x509_lcl.h +++ b/src/lib/libcrypto/x509/x509_lcl.h @@ -57,5 +57,3 @@ */ int x509_check_cert_time(X509_STORE_CTX *ctx, X509 *x, int quiet); -int asn1_time_parse(const char *, size_t, struct tm *, int); -int asn1_tm_cmp(struct tm *tm1, struct tm *tm2); diff --git a/src/lib/libcrypto/x509/x509_vfy.c b/src/lib/libcrypto/x509/x509_vfy.c index a9330e1c03..7a6d272023 100644 --- a/src/lib/libcrypto/x509/x509_vfy.c +++ b/src/lib/libcrypto/x509/x509_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x509_vfy.c,v 1.50 2016/10/02 20:45:04 guenther Exp $ */ +/* $OpenBSD: x509_vfy.c,v 1.51 2016/11/04 18:07:23 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -1658,7 +1658,7 @@ X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) memset(&tm1, 0, sizeof(tm1)); - type = asn1_time_parse(ctm->data, ctm->length, &tm1, ctm->type); + type = ASN1_time_parse(ctm->data, ctm->length, &tm1, ctm->type); if (type == -1) goto out; /* invalid time */ @@ -1679,7 +1679,7 @@ X509_cmp_time(const ASN1_TIME *ctm, time_t *cmp_time) if (gmtime_r(&time2, &tm2) == NULL) goto out; - ret = asn1_tm_cmp(&tm1, &tm2); + ret = ASN1_time_tm_cmp(&tm1, &tm2); if (ret == 0) ret = -1; /* 0 is used for error, so map same to less than */ out: -- cgit v1.2.3-55-g6feb