From: tb Date: Sat, 2 Mar 2024 09:10:42 +0000 (+0000) Subject: Garbage collect ASN1_TIME_set_tm() X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=27e5e86b7cb8486b56d161adadf014433cf53744;p=openbsd Garbage collect ASN1_TIME_set_tm() This was a public helper that is no longer used internally either. ok jsing --- diff --git a/lib/libcrypto/asn1/a_time_tm.c b/lib/libcrypto/asn1/a_time_tm.c index dc568d66360..986c1e735d0 100644 --- a/lib/libcrypto/asn1/a_time_tm.c +++ b/lib/libcrypto/asn1/a_time_tm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_time_tm.c,v 1.32 2024/03/02 09:08:41 tb Exp $ */ +/* $OpenBSD: a_time_tm.c,v 1.33 2024/03/02 09:10:42 tb Exp $ */ /* * Copyright (c) 2015 Bob Beck * @@ -406,16 +406,6 @@ ASN1_TIME_set(ASN1_TIME *s, time_t t) } LCRYPTO_ALIAS(ASN1_TIME_set); -ASN1_TIME * -ASN1_TIME_set_tm(ASN1_TIME *s, struct tm *tm) -{ - time_t t; - - if (!asn1_time_tm_to_time_t(tm, &t)) - return NULL; - return (ASN1_TIME_adj(s, t, 0, 0)); -} - ASN1_TIME * ASN1_TIME_adj(ASN1_TIME *s, time_t t, int offset_day, long offset_sec) { diff --git a/lib/libcrypto/asn1/asn1_local.h b/lib/libcrypto/asn1/asn1_local.h index e645dcb18e9..19de9787729 100644 --- a/lib/libcrypto/asn1/asn1_local.h +++ b/lib/libcrypto/asn1/asn1_local.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_local.h,v 1.9 2024/03/02 09:08:41 tb Exp $ */ +/* $OpenBSD: asn1_local.h,v 1.10 2024/03/02 09:10:42 tb Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -187,7 +187,6 @@ void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it); int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); -ASN1_TIME *ASN1_TIME_set_tm(ASN1_TIME *s, struct tm *tm); int ASN1_time_parse(const char *_bytes, size_t _len, struct tm *_tm, int _mode); int ASN1_time_tm_cmp(struct tm *_tm1, struct tm *_tm2);