summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortb <>2024-03-02 09:10:42 +0000
committertb <>2024-03-02 09:10:42 +0000
commit583cfc2f9ea1e19f9353fca6557a7e9b59776a66 (patch)
tree6ebc8b09154d8f62ffc0a4eccd32bc7489ea0004
parent571fe2f9899bd7827fb5664d23260ca3313b4042 (diff)
downloadopenbsd-583cfc2f9ea1e19f9353fca6557a7e9b59776a66.tar.gz
openbsd-583cfc2f9ea1e19f9353fca6557a7e9b59776a66.tar.bz2
openbsd-583cfc2f9ea1e19f9353fca6557a7e9b59776a66.zip
Garbage collect ASN1_TIME_set_tm()
This was a public helper that is no longer used internally either. ok jsing
-rw-r--r--src/lib/libcrypto/asn1/a_time_tm.c12
-rw-r--r--src/lib/libcrypto/asn1/asn1_local.h3
2 files changed, 2 insertions, 13 deletions
diff --git a/src/lib/libcrypto/asn1/a_time_tm.c b/src/lib/libcrypto/asn1/a_time_tm.c
index dc568d6636..986c1e735d 100644
--- a/src/lib/libcrypto/asn1/a_time_tm.c
+++ b/src/lib/libcrypto/asn1/a_time_tm.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: a_time_tm.c,v 1.32 2024/03/02 09:08:41 tb Exp $ */ 1/* $OpenBSD: a_time_tm.c,v 1.33 2024/03/02 09:10:42 tb Exp $ */
2/* 2/*
3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org> 3 * Copyright (c) 2015 Bob Beck <beck@openbsd.org>
4 * 4 *
@@ -407,16 +407,6 @@ ASN1_TIME_set(ASN1_TIME *s, time_t t)
407LCRYPTO_ALIAS(ASN1_TIME_set); 407LCRYPTO_ALIAS(ASN1_TIME_set);
408 408
409ASN1_TIME * 409ASN1_TIME *
410ASN1_TIME_set_tm(ASN1_TIME *s, struct tm *tm)
411{
412 time_t t;
413
414 if (!asn1_time_tm_to_time_t(tm, &t))
415 return NULL;
416 return (ASN1_TIME_adj(s, t, 0, 0));
417}
418
419ASN1_TIME *
420ASN1_TIME_adj(ASN1_TIME *s, time_t t, int offset_day, long offset_sec) 410ASN1_TIME_adj(ASN1_TIME *s, time_t t, int offset_day, long offset_sec)
421{ 411{
422 return (ASN1_TIME_adj_internal(s, t, offset_day, offset_sec, RFC5280)); 412 return (ASN1_TIME_adj_internal(s, t, offset_day, offset_sec, RFC5280));
diff --git a/src/lib/libcrypto/asn1/asn1_local.h b/src/lib/libcrypto/asn1/asn1_local.h
index e645dcb18e..19de978772 100644
--- a/src/lib/libcrypto/asn1/asn1_local.h
+++ b/src/lib/libcrypto/asn1/asn1_local.h
@@ -1,4 +1,4 @@
1/* $OpenBSD: asn1_local.h,v 1.9 2024/03/02 09:08:41 tb Exp $ */ 1/* $OpenBSD: asn1_local.h,v 1.10 2024/03/02 09:10:42 tb Exp $ */
2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 2/* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
3 * project 2006. 3 * project 2006.
4 */ 4 */
@@ -187,7 +187,6 @@ void ASN1_primitive_free(ASN1_VALUE **pval, const ASN1_ITEM *it);
187int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); 187int ASN1_template_new(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
188void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt); 188void ASN1_template_free(ASN1_VALUE **pval, const ASN1_TEMPLATE *tt);
189 189
190ASN1_TIME *ASN1_TIME_set_tm(ASN1_TIME *s, struct tm *tm);
191int ASN1_time_parse(const char *_bytes, size_t _len, struct tm *_tm, int _mode); 190int ASN1_time_parse(const char *_bytes, size_t _len, struct tm *_tm, int _mode);
192int ASN1_time_tm_cmp(struct tm *_tm1, struct tm *_tm2); 191int ASN1_time_tm_cmp(struct tm *_tm1, struct tm *_tm2);
193 192