From: beck Date: Wed, 10 Apr 2024 14:55:12 +0000 (+0000) Subject: Hide a couple of LCRYPTO_UNUSED in asn1.h X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=b4712960cfaf7fb1c86320676377698d20f2f6f1;p=openbsd Hide a couple of LCRYPTO_UNUSED in asn1.h and remove the LIBRESSL_INTERNAL guards around them ok tb@ --- diff --git a/lib/libcrypto/asn1/a_time_tm.c b/lib/libcrypto/asn1/a_time_tm.c index 16b9df25844..49d6ea2097b 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.35 2024/04/09 13:56:00 tb Exp $ */ +/* $OpenBSD: a_time_tm.c,v 1.36 2024/04/10 14:55:12 beck Exp $ */ /* * Copyright (c) 2015 Bob Beck * @@ -552,6 +552,7 @@ ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t) return ASN1_TIME_cmp_time_t_internal(s, t, V_ASN1_UTCTIME); return -2; } +LCRYPTO_ALIAS(ASN1_UTCTIME_cmp_time_t); /* * ASN1_GENERALIZEDTIME wrappers diff --git a/lib/libcrypto/asn1/asn1.h b/lib/libcrypto/asn1/asn1.h index 63458db9447..aeabbc0a287 100644 --- a/lib/libcrypto/asn1/asn1.h +++ b/lib/libcrypto/asn1/asn1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1.h,v 1.91 2024/03/02 09:08:41 tb Exp $ */ +/* $OpenBSD: asn1.h,v 1.92 2024/04/10 14:55:12 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -573,9 +573,7 @@ ASN1_UTCTIME *ASN1_UTCTIME_adj(ASN1_UTCTIME *s, time_t t, int offset_day, long offset_sec); int ASN1_UTCTIME_set_string(ASN1_UTCTIME *s, const char *str); -#ifndef LIBRESSL_INTERNAL int ASN1_UTCTIME_cmp_time_t(const ASN1_UTCTIME *s, time_t t); -#endif /* !LIBRESSL_INTERNAL */ int ASN1_GENERALIZEDTIME_check(const ASN1_GENERALIZEDTIME *a); ASN1_GENERALIZEDTIME *ASN1_GENERALIZEDTIME_set(ASN1_GENERALIZEDTIME *s, @@ -736,12 +734,8 @@ int ASN1_object_size(int constructed, int length, int tag); void *ASN1_item_dup(const ASN1_ITEM *it, void *x); -#ifndef LIBRESSL_INTERNAL - void *ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x); -#endif /* !LIBRESSL_INTERNAL */ - void *ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x); #define ASN1_d2i_fp_of(type,xnew,d2i,in,x) \ diff --git a/lib/libcrypto/asn1/asn1_old.c b/lib/libcrypto/asn1/asn1_old.c index a9aeeb823e3..7992fccdef6 100644 --- a/lib/libcrypto/asn1/asn1_old.c +++ b/lib/libcrypto/asn1/asn1_old.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_old.c,v 1.5 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: asn1_old.c,v 1.6 2024/04/10 14:55:12 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -91,6 +91,7 @@ ASN1_dup(i2d_of_void *i2d, d2i_of_void *d2i, void *x) free(b); return (ret); } +LCRYPTO_ALIAS(ASN1_dup); void * ASN1_d2i_fp(void *(*xnew)(void), d2i_of_void *d2i, FILE *in, void **x) diff --git a/lib/libcrypto/hidden/openssl/asn1.h b/lib/libcrypto/hidden/openssl/asn1.h index 12d9618f809..91595d1da05 100644 --- a/lib/libcrypto/hidden/openssl/asn1.h +++ b/lib/libcrypto/hidden/openssl/asn1.h @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1.h,v 1.12 2024/03/02 09:08:41 tb Exp $ */ +/* $OpenBSD: asn1.h,v 1.13 2024/04/10 14:55:12 beck Exp $ */ /* * Copyright (c) 2023 Bob Beck * @@ -231,5 +231,7 @@ LCRYPTO_USED(ASN1_item_print); LCRYPTO_USED(SMIME_crlf_copy); LCRYPTO_USED(SMIME_text); LCRYPTO_USED(ERR_load_ASN1_strings); +LCRYPTO_UNUSED(ASN1_UTCTIME_cmp_time_t); +LCRYPTO_UNUSED(ASN1_dup); #endif /* _LIBCRYPTO_ASN1_H */