From e160817992770978586e5b10785c1c16fb7b341f Mon Sep 17 00:00:00 2001 From: beck Date: Tue, 9 Apr 2024 13:55:02 +0000 Subject: [PATCH] Hide public symbols in x509.h This picks up most of the remaining public symbols in x509.h ok tb@ --- lib/libcrypto/Symbols.namespace | 194 +++++++++++++++++++++++++++ lib/libcrypto/asn1/a_strex.c | 4 +- lib/libcrypto/asn1/asn1_item.c | 6 +- lib/libcrypto/asn1/p8_pkey.c | 10 +- lib/libcrypto/asn1/t_crl.c | 4 +- lib/libcrypto/asn1/t_req.c | 5 +- lib/libcrypto/asn1/t_spki.c | 3 +- lib/libcrypto/asn1/t_x509.c | 10 +- lib/libcrypto/asn1/x_algor.c | 12 +- lib/libcrypto/asn1/x_attrib.c | 8 +- lib/libcrypto/asn1/x_crl.c | 31 ++++- lib/libcrypto/asn1/x_exten.c | 9 +- lib/libcrypto/asn1/x_info.c | 4 +- lib/libcrypto/asn1/x_name.c | 14 +- lib/libcrypto/asn1/x_pkey.c | 4 +- lib/libcrypto/asn1/x_pubkey.c | 35 ++++- lib/libcrypto/asn1/x_req.c | 13 +- lib/libcrypto/asn1/x_sig.c | 8 +- lib/libcrypto/asn1/x_spki.c | 10 +- lib/libcrypto/asn1/x_val.c | 6 +- lib/libcrypto/asn1/x_x509.c | 20 ++- lib/libcrypto/asn1/x_x509a.c | 10 +- lib/libcrypto/evp/evp_pkey.c | 13 +- lib/libcrypto/hidden/openssl/x509.h | 196 +++++++++++++++++++++++++++- 24 files changed, 606 insertions(+), 23 deletions(-) diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index e17e38e6f59..dfeff2e763f 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2909,3 +2909,197 @@ _libre_EVP_AEAD_CTX_cleanup _libre_EVP_AEAD_CTX_seal _libre_EVP_AEAD_CTX_open _libre_ERR_load_EVP_strings +_libre_X509_CRL_get_signature_nid +_libre_X509_CRL_get0_extensions +_libre_X509_CRL_get_version +_libre_X509_CRL_get0_lastUpdate +_libre_X509_CRL_get0_nextUpdate +_libre_X509_CRL_get_lastUpdate +_libre_X509_CRL_get_nextUpdate +_libre_X509_CRL_get_issuer +_libre_X509_CRL_get_REVOKED +_libre_X509_CRL_get0_signature +_libre_X509_CRL_get0_tbs_sigalg +_libre_X509_REQ_get_signature_nid +_libre_X509_REQ_get0_signature +_libre_X509_CRL_verify +_libre_NETSCAPE_SPKI_print +_libre_X509_signature_dump +_libre_X509_signature_print +_libre_d2i_RSA_PUBKEY_fp +_libre_i2d_RSA_PUBKEY_fp +_libre_d2i_DSA_PUBKEY_fp +_libre_i2d_DSA_PUBKEY_fp +_libre_d2i_EC_PUBKEY_fp +_libre_i2d_EC_PUBKEY_fp +_libre_i2d_PUBKEY_fp +_libre_d2i_PUBKEY_fp +_libre_d2i_RSA_PUBKEY_bio +_libre_i2d_RSA_PUBKEY_bio +_libre_d2i_DSA_PUBKEY_bio +_libre_i2d_DSA_PUBKEY_bio +_libre_d2i_EC_PUBKEY_bio +_libre_i2d_EC_PUBKEY_bio +_libre_i2d_PUBKEY_bio +_libre_d2i_PUBKEY_bio +_libre_X509_dup +_libre_X509_ATTRIBUTE_dup +_libre_X509_EXTENSION_dup +_libre_X509_CRL_dup +_libre_X509_REQ_dup +_libre_X509_ALGOR_dup +_libre_X509_ALGOR_set0 +_libre_X509_ALGOR_get0 +_libre_X509_ALGOR_cmp +_libre_X509_NAME_dup +_libre_X509_NAME_get0_der +_libre_X509_NAME_ENTRY_dup +_libre_X509_ALGOR_new +_libre_X509_ALGOR_free +_libre_d2i_X509_ALGOR +_libre_i2d_X509_ALGOR +_libre_d2i_X509_ALGORS +_libre_i2d_X509_ALGORS +_libre_X509_VAL_new +_libre_X509_VAL_free +_libre_d2i_X509_VAL +_libre_i2d_X509_VAL +_libre_X509_PUBKEY_new +_libre_X509_PUBKEY_free +_libre_d2i_X509_PUBKEY +_libre_i2d_X509_PUBKEY +_libre_X509_PUBKEY_set +_libre_X509_PUBKEY_get +_libre_X509_PUBKEY_get0 +_libre_i2d_PUBKEY +_libre_d2i_PUBKEY +_libre_i2d_RSA_PUBKEY +_libre_d2i_RSA_PUBKEY +_libre_i2d_DSA_PUBKEY +_libre_d2i_DSA_PUBKEY +_libre_i2d_EC_PUBKEY +_libre_d2i_EC_PUBKEY +_libre_X509_SIG_new +_libre_X509_SIG_free +_libre_d2i_X509_SIG +_libre_i2d_X509_SIG +_libre_X509_SIG_get0 +_libre_X509_SIG_getm +_libre_X509_REQ_INFO_new +_libre_X509_REQ_INFO_free +_libre_d2i_X509_REQ_INFO +_libre_i2d_X509_REQ_INFO +_libre_X509_REQ_new +_libre_X509_REQ_free +_libre_d2i_X509_REQ +_libre_i2d_X509_REQ +_libre_X509_ATTRIBUTE_new +_libre_X509_ATTRIBUTE_free +_libre_d2i_X509_ATTRIBUTE +_libre_i2d_X509_ATTRIBUTE +_libre_X509_ATTRIBUTE_create +_libre_X509_EXTENSION_new +_libre_X509_EXTENSION_free +_libre_d2i_X509_EXTENSION +_libre_i2d_X509_EXTENSION +_libre_d2i_X509_EXTENSIONS +_libre_i2d_X509_EXTENSIONS +_libre_X509_NAME_ENTRY_new +_libre_X509_NAME_ENTRY_free +_libre_d2i_X509_NAME_ENTRY +_libre_i2d_X509_NAME_ENTRY +_libre_X509_NAME_new +_libre_X509_NAME_free +_libre_d2i_X509_NAME +_libre_i2d_X509_NAME +_libre_X509_NAME_set +_libre_X509_CINF_new +_libre_X509_CINF_free +_libre_d2i_X509_CINF +_libre_i2d_X509_CINF +_libre_X509_new +_libre_X509_free +_libre_d2i_X509 +_libre_i2d_X509 +_libre_X509_get_ex_new_index +_libre_X509_set_ex_data +_libre_X509_get_ex_data +_libre_i2d_X509_AUX +_libre_d2i_X509_AUX +_libre_i2d_re_X509_tbs +_libre_X509_get0_signature +_libre_X509_get_signature_nid +_libre_X509_alias_set1 +_libre_X509_keyid_set1 +_libre_X509_alias_get0 +_libre_X509_keyid_get0 +_libre_X509_add1_trust_object +_libre_X509_add1_reject_object +_libre_X509_trust_clear +_libre_X509_reject_clear +_libre_X509_REVOKED_new +_libre_X509_REVOKED_free +_libre_X509_REVOKED_dup +_libre_d2i_X509_REVOKED +_libre_i2d_X509_REVOKED +_libre_X509_CRL_INFO_new +_libre_X509_CRL_INFO_free +_libre_d2i_X509_CRL_INFO +_libre_i2d_X509_CRL_INFO +_libre_X509_CRL_new +_libre_X509_CRL_free +_libre_d2i_X509_CRL +_libre_i2d_X509_CRL +_libre_X509_CRL_add0_revoked +_libre_X509_CRL_get0_by_serial +_libre_X509_CRL_get0_by_cert +_libre_X509_PKEY_new +_libre_X509_PKEY_free +_libre_NETSCAPE_SPKI_new +_libre_NETSCAPE_SPKI_free +_libre_d2i_NETSCAPE_SPKI +_libre_i2d_NETSCAPE_SPKI +_libre_NETSCAPE_SPKAC_new +_libre_NETSCAPE_SPKAC_free +_libre_d2i_NETSCAPE_SPKAC +_libre_i2d_NETSCAPE_SPKAC +_libre_X509_INFO_new +_libre_X509_INFO_free +_libre_ASN1_item_digest +_libre_ASN1_item_verify +_libre_ASN1_item_sign +_libre_ASN1_item_sign_ctx +_libre_X509_print_ex_fp +_libre_X509_print_fp +_libre_X509_CRL_print_fp +_libre_X509_REQ_print_fp +_libre_X509_NAME_print_ex_fp +_libre_X509_NAME_print +_libre_X509_NAME_print_ex +_libre_X509_print_ex +_libre_X509_print +_libre_X509_ocspid_print +_libre_X509_CRL_print +_libre_X509_REQ_print_ex +_libre_X509_REQ_print +_libre_EVP_PKEY_get_attr_count +_libre_EVP_PKEY_get_attr_by_NID +_libre_EVP_PKEY_get_attr_by_OBJ +_libre_EVP_PKEY_get_attr +_libre_EVP_PKEY_delete_attr +_libre_EVP_PKEY_add1_attr +_libre_EVP_PKEY_add1_attr_by_OBJ +_libre_EVP_PKEY_add1_attr_by_NID +_libre_EVP_PKEY_add1_attr_by_txt +_libre_PKCS8_PRIV_KEY_INFO_new +_libre_PKCS8_PRIV_KEY_INFO_free +_libre_d2i_PKCS8_PRIV_KEY_INFO +_libre_i2d_PKCS8_PRIV_KEY_INFO +_libre_EVP_PKCS82PKEY +_libre_EVP_PKEY2PKCS8 +_libre_PKCS8_pkey_set0 +_libre_PKCS8_pkey_get0 +_libre_PKCS8_pkey_get0_attrs +_libre_PKCS8_pkey_add1_attr_by_NID +_libre_X509_PUBKEY_set0_param +_libre_X509_PUBKEY_get0_param diff --git a/lib/libcrypto/asn1/a_strex.c b/lib/libcrypto/asn1/a_strex.c index 17213cbd3a7..4ca0a092ee4 100644 --- a/lib/libcrypto/asn1/a_strex.c +++ b/lib/libcrypto/asn1/a_strex.c @@ -1,4 +1,4 @@ -/* $OpenBSD: a_strex.c,v 1.34 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: a_strex.c,v 1.35 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -570,6 +570,7 @@ X509_NAME_print_ex(BIO *out, const X509_NAME *nm, int indent, return X509_NAME_print(out, nm, indent); return do_name_ex(send_bio_chars, out, nm, indent, flags); } +LCRYPTO_ALIAS(X509_NAME_print_ex); int X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, @@ -587,6 +588,7 @@ X509_NAME_print_ex_fp(FILE *fp, const X509_NAME *nm, int indent, } return do_name_ex(send_fp_chars, fp, nm, indent, flags); } +LCRYPTO_ALIAS(X509_NAME_print_ex_fp); int ASN1_STRING_print_ex(BIO *out, const ASN1_STRING *str, unsigned long flags) diff --git a/lib/libcrypto/asn1/asn1_item.c b/lib/libcrypto/asn1/asn1_item.c index 99a08698c8d..86c800e3adc 100644 --- a/lib/libcrypto/asn1/asn1_item.c +++ b/lib/libcrypto/asn1/asn1_item.c @@ -1,4 +1,4 @@ -/* $OpenBSD: asn1_item.c,v 1.20 2024/01/28 14:43:48 joshua Exp $ */ +/* $OpenBSD: asn1_item.c,v 1.21 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -139,6 +139,7 @@ ASN1_item_digest(const ASN1_ITEM *it, const EVP_MD *type, void *asn, free(str); return (1); } +LCRYPTO_ALIAS(ASN1_item_digest); /* * ASN1_ITEM version of ASN1_dup(): follows the same model except there's no @@ -237,6 +238,7 @@ ASN1_item_sign(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, return ret; } +LCRYPTO_ALIAS(ASN1_item_sign); static int asn1_item_set_algorithm_identifiers(EVP_MD_CTX *ctx, X509_ALGOR *algor1, @@ -376,6 +378,7 @@ ASN1_item_sign_ctx(const ASN1_ITEM *it, X509_ALGOR *algor1, X509_ALGOR *algor2, return ret; } +LCRYPTO_ALIAS(ASN1_item_sign_ctx); int ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, @@ -462,6 +465,7 @@ ASN1_item_verify(const ASN1_ITEM *it, X509_ALGOR *a, return ret; } +LCRYPTO_ALIAS(ASN1_item_verify); #define HEADER_SIZE 8 #define ASN1_CHUNK_INITIAL_SIZE (16 * 1024) diff --git a/lib/libcrypto/asn1/p8_pkey.c b/lib/libcrypto/asn1/p8_pkey.c index 9e0cfc41da2..149591414d7 100644 --- a/lib/libcrypto/asn1/p8_pkey.c +++ b/lib/libcrypto/asn1/p8_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: p8_pkey.c,v 1.23 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: p8_pkey.c,v 1.24 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -121,24 +121,28 @@ d2i_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO **a, const unsigned char **in, long return (PKCS8_PRIV_KEY_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &PKCS8_PRIV_KEY_INFO_it); } +LCRYPTO_ALIAS(d2i_PKCS8_PRIV_KEY_INFO); int i2d_PKCS8_PRIV_KEY_INFO(PKCS8_PRIV_KEY_INFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS8_PRIV_KEY_INFO_it); } +LCRYPTO_ALIAS(i2d_PKCS8_PRIV_KEY_INFO); PKCS8_PRIV_KEY_INFO * PKCS8_PRIV_KEY_INFO_new(void) { return (PKCS8_PRIV_KEY_INFO *)ASN1_item_new(&PKCS8_PRIV_KEY_INFO_it); } +LCRYPTO_ALIAS(PKCS8_PRIV_KEY_INFO_new); void PKCS8_PRIV_KEY_INFO_free(PKCS8_PRIV_KEY_INFO *a) { ASN1_item_free((ASN1_VALUE *)a, &PKCS8_PRIV_KEY_INFO_it); } +LCRYPTO_ALIAS(PKCS8_PRIV_KEY_INFO_free); int PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, int version, @@ -154,6 +158,7 @@ PKCS8_pkey_set0(PKCS8_PRIV_KEY_INFO *priv, ASN1_OBJECT *aobj, int version, ASN1_STRING_set0(priv->pkey, penc, penclen); return 1; } +LCRYPTO_ALIAS(PKCS8_pkey_set0); int PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg, const unsigned char **pk, @@ -169,12 +174,14 @@ PKCS8_pkey_get0(const ASN1_OBJECT **ppkalg, const unsigned char **pk, *pa = p8->pkeyalg; return 1; } +LCRYPTO_ALIAS(PKCS8_pkey_get0); const STACK_OF(X509_ATTRIBUTE) * PKCS8_pkey_get0_attrs(const PKCS8_PRIV_KEY_INFO *p8) { return p8->attributes; } +LCRYPTO_ALIAS(PKCS8_pkey_get0_attrs); int PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, @@ -185,3 +192,4 @@ PKCS8_pkey_add1_attr_by_NID(PKCS8_PRIV_KEY_INFO *p8, int nid, int type, return 1; return 0; } +LCRYPTO_ALIAS(PKCS8_pkey_add1_attr_by_NID); diff --git a/lib/libcrypto/asn1/t_crl.c b/lib/libcrypto/asn1/t_crl.c index d662d99ec5e..1ff6ea02adb 100644 --- a/lib/libcrypto/asn1/t_crl.c +++ b/lib/libcrypto/asn1/t_crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_crl.c,v 1.23 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: t_crl.c,v 1.24 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -83,6 +83,7 @@ X509_CRL_print_fp(FILE *fp, X509_CRL *x) BIO_free(b); return (ret); } +LCRYPTO_ALIAS(X509_CRL_print_fp); int X509_CRL_print(BIO *out, X509_CRL *x) @@ -143,3 +144,4 @@ X509_CRL_print(BIO *out, X509_CRL *x) err: return 0; } +LCRYPTO_ALIAS(X509_CRL_print); diff --git a/lib/libcrypto/asn1/t_req.c b/lib/libcrypto/asn1/t_req.c index 2fd98424347..ac011705ef2 100644 --- a/lib/libcrypto/asn1/t_req.c +++ b/lib/libcrypto/asn1/t_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_req.c,v 1.26 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: t_req.c,v 1.27 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -91,6 +91,7 @@ X509_REQ_print_fp(FILE *fp, X509_REQ *x) BIO_free(b); return (ret); } +LCRYPTO_ALIAS(X509_REQ_print_fp); int X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, @@ -254,9 +255,11 @@ X509_REQ_print_ex(BIO *bp, X509_REQ *x, unsigned long nmflags, X509error(ERR_R_BUF_LIB); return (0); } +LCRYPTO_ALIAS(X509_REQ_print_ex); int X509_REQ_print(BIO *bp, X509_REQ *x) { return X509_REQ_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT); } +LCRYPTO_ALIAS(X509_REQ_print); diff --git a/lib/libcrypto/asn1/t_spki.c b/lib/libcrypto/asn1/t_spki.c index 73996b66f65..1a315c15731 100644 --- a/lib/libcrypto/asn1/t_spki.c +++ b/lib/libcrypto/asn1/t_spki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_spki.c,v 1.16 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: t_spki.c,v 1.17 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -113,3 +113,4 @@ NETSCAPE_SPKI_print(BIO *out, NETSCAPE_SPKI *spki) BIO_write(out, "\n", 1); return 1; } +LCRYPTO_ALIAS(NETSCAPE_SPKI_print); diff --git a/lib/libcrypto/asn1/t_x509.c b/lib/libcrypto/asn1/t_x509.c index 6f7bdc79fe4..5e753f3278a 100644 --- a/lib/libcrypto/asn1/t_x509.c +++ b/lib/libcrypto/asn1/t_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: t_x509.c,v 1.44 2023/12/29 10:59:00 tb Exp $ */ +/* $OpenBSD: t_x509.c,v 1.45 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -85,6 +85,7 @@ X509_print_fp(FILE *fp, X509 *x) { return X509_print_ex_fp(fp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT); } +LCRYPTO_ALIAS(X509_print_fp); int X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag) @@ -101,12 +102,14 @@ X509_print_ex_fp(FILE *fp, X509 *x, unsigned long nmflag, unsigned long cflag) BIO_free(b); return (ret); } +LCRYPTO_ALIAS(X509_print_ex_fp); int X509_print(BIO *bp, X509 *x) { return X509_print_ex(bp, x, XN_FLAG_COMPAT, X509_FLAG_COMPAT); } +LCRYPTO_ALIAS(X509_print); int X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) @@ -250,6 +253,7 @@ X509_print_ex(BIO *bp, X509 *x, unsigned long nmflags, unsigned long cflag) free(m); return (ret); } +LCRYPTO_ALIAS(X509_print_ex); int X509_ocspid_print(BIO *bp, X509 *x) @@ -301,6 +305,7 @@ X509_ocspid_print(BIO *bp, X509 *x) free(der); return (0); } +LCRYPTO_ALIAS(X509_ocspid_print); int X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent) @@ -326,6 +331,7 @@ X509_signature_dump(BIO *bp, const ASN1_STRING *sig, int indent) return 1; } +LCRYPTO_ALIAS(X509_signature_dump); int X509_signature_print(BIO *bp, const X509_ALGOR *sigalg, const ASN1_STRING *sig) @@ -352,6 +358,7 @@ X509_signature_print(BIO *bp, const X509_ALGOR *sigalg, const ASN1_STRING *sig) return 0; return 1; } +LCRYPTO_ALIAS(X509_signature_print); int ASN1_TIME_print(BIO *bp, const ASN1_TIME *tm) @@ -513,3 +520,4 @@ X509_NAME_print(BIO *bp, const X509_NAME *name, int obase) free(b); return (ret); } +LCRYPTO_ALIAS(X509_NAME_print); diff --git a/lib/libcrypto/asn1/x_algor.c b/lib/libcrypto/asn1/x_algor.c index 939ce4b669f..71430e1fd88 100644 --- a/lib/libcrypto/asn1/x_algor.c +++ b/lib/libcrypto/asn1/x_algor.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_algor.c,v 1.39 2024/03/02 10:33:51 tb Exp $ */ +/* $OpenBSD: x_algor.c,v 1.40 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -111,24 +111,28 @@ d2i_X509_ALGOR(X509_ALGOR **a, const unsigned char **in, long len) return (X509_ALGOR *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_ALGOR_it); } +LCRYPTO_ALIAS(d2i_X509_ALGOR); int i2d_X509_ALGOR(X509_ALGOR *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_ALGOR_it); } +LCRYPTO_ALIAS(i2d_X509_ALGOR); X509_ALGOR * X509_ALGOR_new(void) { return (X509_ALGOR *)ASN1_item_new(&X509_ALGOR_it); } +LCRYPTO_ALIAS(X509_ALGOR_new); void X509_ALGOR_free(X509_ALGOR *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_ALGOR_it); } +LCRYPTO_ALIAS(X509_ALGOR_free); X509_ALGORS * d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len) @@ -136,18 +140,21 @@ d2i_X509_ALGORS(X509_ALGORS **a, const unsigned char **in, long len) return (X509_ALGORS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_ALGORS_it); } +LCRYPTO_ALIAS(d2i_X509_ALGORS); int i2d_X509_ALGORS(X509_ALGORS *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_ALGORS_it); } +LCRYPTO_ALIAS(i2d_X509_ALGORS); X509_ALGOR * X509_ALGOR_dup(X509_ALGOR *x) { return ASN1_item_dup(&X509_ALGOR_it, x); } +LCRYPTO_ALIAS(X509_ALGOR_dup); static int X509_ALGOR_set0_obj(X509_ALGOR *alg, ASN1_OBJECT *aobj) @@ -225,6 +232,7 @@ X509_ALGOR_set0(X509_ALGOR *alg, ASN1_OBJECT *aobj, int parameter_type, return 1; } +LCRYPTO_ALIAS(X509_ALGOR_set0); void X509_ALGOR_get0(const ASN1_OBJECT **out_aobj, int *out_type, @@ -252,6 +260,7 @@ X509_ALGOR_get0(const ASN1_OBJECT **out_aobj, int *out_type, if (out_value != NULL) *out_value = value; } +LCRYPTO_ALIAS(X509_ALGOR_get0); int X509_ALGOR_set_evp_md(X509_ALGOR *alg, const EVP_MD *md) @@ -281,3 +290,4 @@ X509_ALGOR_cmp(const X509_ALGOR *a, const X509_ALGOR *b) return ASN1_TYPE_cmp(a->parameter, b->parameter); } +LCRYPTO_ALIAS(X509_ALGOR_cmp); diff --git a/lib/libcrypto/asn1/x_attrib.c b/lib/libcrypto/asn1/x_attrib.c index 08206172fdf..3e3ed381950 100644 --- a/lib/libcrypto/asn1/x_attrib.c +++ b/lib/libcrypto/asn1/x_attrib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_attrib.c,v 1.21 2023/07/28 13:30:07 jsg Exp $ */ +/* $OpenBSD: x_attrib.c,v 1.22 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,30 +98,35 @@ d2i_X509_ATTRIBUTE(X509_ATTRIBUTE **a, const unsigned char **in, long len) return (X509_ATTRIBUTE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_ATTRIBUTE_it); } +LCRYPTO_ALIAS(d2i_X509_ATTRIBUTE); int i2d_X509_ATTRIBUTE(X509_ATTRIBUTE *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_ATTRIBUTE_it); } +LCRYPTO_ALIAS(i2d_X509_ATTRIBUTE); X509_ATTRIBUTE * X509_ATTRIBUTE_new(void) { return (X509_ATTRIBUTE *)ASN1_item_new(&X509_ATTRIBUTE_it); } +LCRYPTO_ALIAS(X509_ATTRIBUTE_new); void X509_ATTRIBUTE_free(X509_ATTRIBUTE *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_ATTRIBUTE_it); } +LCRYPTO_ALIAS(X509_ATTRIBUTE_free); X509_ATTRIBUTE * X509_ATTRIBUTE_dup(X509_ATTRIBUTE *x) { return ASN1_item_dup(&X509_ATTRIBUTE_it, x); } +LCRYPTO_ALIAS(X509_ATTRIBUTE_dup); X509_ATTRIBUTE * X509_ATTRIBUTE_create(int nid, int atrtype, void *value) @@ -150,3 +155,4 @@ X509_ATTRIBUTE_create(int nid, int atrtype, void *value) ASN1_TYPE_free(val); return (NULL); } +LCRYPTO_ALIAS(X509_ATTRIBUTE_create); diff --git a/lib/libcrypto/asn1/x_crl.c b/lib/libcrypto/asn1/x_crl.c index e3d16352a70..0e6047db0bb 100644 --- a/lib/libcrypto/asn1/x_crl.c +++ b/lib/libcrypto/asn1/x_crl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_crl.c,v 1.43 2024/03/02 10:59:41 tb Exp $ */ +/* $OpenBSD: x_crl.c,v 1.44 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -420,30 +420,35 @@ d2i_X509_REVOKED(X509_REVOKED **a, const unsigned char **in, long len) return (X509_REVOKED *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_REVOKED_it); } +LCRYPTO_ALIAS(d2i_X509_REVOKED); int i2d_X509_REVOKED(X509_REVOKED *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REVOKED_it); } +LCRYPTO_ALIAS(i2d_X509_REVOKED); X509_REVOKED * X509_REVOKED_new(void) { return (X509_REVOKED *)ASN1_item_new(&X509_REVOKED_it); } +LCRYPTO_ALIAS(X509_REVOKED_new); void X509_REVOKED_free(X509_REVOKED *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_REVOKED_it); } +LCRYPTO_ALIAS(X509_REVOKED_free); X509_REVOKED * X509_REVOKED_dup(X509_REVOKED *a) { return ASN1_item_dup(&X509_REVOKED_it, a); } +LCRYPTO_ALIAS(X509_REVOKED_dup); X509_CRL_INFO * d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) @@ -451,24 +456,28 @@ d2i_X509_CRL_INFO(X509_CRL_INFO **a, const unsigned char **in, long len) return (X509_CRL_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_CRL_INFO_it); } +LCRYPTO_ALIAS(d2i_X509_CRL_INFO); int i2d_X509_CRL_INFO(X509_CRL_INFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_INFO_it); } +LCRYPTO_ALIAS(i2d_X509_CRL_INFO); X509_CRL_INFO * X509_CRL_INFO_new(void) { return (X509_CRL_INFO *)ASN1_item_new(&X509_CRL_INFO_it); } +LCRYPTO_ALIAS(X509_CRL_INFO_new); void X509_CRL_INFO_free(X509_CRL_INFO *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_INFO_it); } +LCRYPTO_ALIAS(X509_CRL_INFO_free); X509_CRL * d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) @@ -476,30 +485,35 @@ d2i_X509_CRL(X509_CRL **a, const unsigned char **in, long len) return (X509_CRL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_CRL_it); } +LCRYPTO_ALIAS(d2i_X509_CRL); int i2d_X509_CRL(X509_CRL *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CRL_it); } +LCRYPTO_ALIAS(i2d_X509_CRL); X509_CRL * X509_CRL_new(void) { return (X509_CRL *)ASN1_item_new(&X509_CRL_it); } +LCRYPTO_ALIAS(X509_CRL_new); void X509_CRL_free(X509_CRL *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_CRL_it); } +LCRYPTO_ALIAS(X509_CRL_free); X509_CRL * X509_CRL_dup(X509_CRL *x) { return ASN1_item_dup(&X509_CRL_it, x); } +LCRYPTO_ALIAS(X509_CRL_dup); static int X509_REVOKED_cmp(const X509_REVOKED * const *a, const X509_REVOKED * const *b) @@ -522,6 +536,7 @@ X509_CRL_add0_revoked(X509_CRL *crl, X509_REVOKED *rev) inf->enc.modified = 1; return 1; } +LCRYPTO_ALIAS(X509_CRL_add0_revoked); int X509_CRL_verify(X509_CRL *crl, EVP_PKEY *pkey) @@ -529,6 +544,7 @@ X509_CRL_verify(X509_CRL *crl, EVP_PKEY *pkey) return ASN1_item_verify(&X509_CRL_INFO_it, crl->sig_alg, crl->signature, crl->crl, pkey); } +LCRYPTO_ALIAS(X509_CRL_verify); static int crl_revoked_issuer_match(X509_CRL *crl, X509_NAME *nm, X509_REVOKED *rev) @@ -595,6 +611,7 @@ X509_CRL_get0_by_serial(X509_CRL *crl, X509_REVOKED **ret, { return crl_lookup(crl, ret, serial, NULL); } +LCRYPTO_ALIAS(X509_CRL_get0_by_serial); int X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x) @@ -602,60 +619,70 @@ X509_CRL_get0_by_cert(X509_CRL *crl, X509_REVOKED **ret, X509 *x) return crl_lookup(crl, ret, X509_get_serialNumber(x), X509_get_issuer_name(x)); } +LCRYPTO_ALIAS(X509_CRL_get0_by_cert); int X509_CRL_get_signature_nid(const X509_CRL *crl) { return OBJ_obj2nid(crl->sig_alg->algorithm); } +LCRYPTO_ALIAS(X509_CRL_get_signature_nid); const STACK_OF(X509_EXTENSION) * X509_CRL_get0_extensions(const X509_CRL *crl) { return crl->crl->extensions; } +LCRYPTO_ALIAS(X509_CRL_get0_extensions); long X509_CRL_get_version(const X509_CRL *crl) { return ASN1_INTEGER_get(crl->crl->version); } +LCRYPTO_ALIAS(X509_CRL_get_version); const ASN1_TIME * X509_CRL_get0_lastUpdate(const X509_CRL *crl) { return crl->crl->lastUpdate; } +LCRYPTO_ALIAS(X509_CRL_get0_lastUpdate); ASN1_TIME * X509_CRL_get_lastUpdate(X509_CRL *crl) { return crl->crl->lastUpdate; } +LCRYPTO_ALIAS(X509_CRL_get_lastUpdate); const ASN1_TIME * X509_CRL_get0_nextUpdate(const X509_CRL *crl) { return crl->crl->nextUpdate; } +LCRYPTO_ALIAS(X509_CRL_get0_nextUpdate); ASN1_TIME * X509_CRL_get_nextUpdate(X509_CRL *crl) { return crl->crl->nextUpdate; } +LCRYPTO_ALIAS(X509_CRL_get_nextUpdate); X509_NAME * X509_CRL_get_issuer(const X509_CRL *crl) { return crl->crl->issuer; } +LCRYPTO_ALIAS(X509_CRL_get_issuer); STACK_OF(X509_REVOKED) * X509_CRL_get_REVOKED(X509_CRL *crl) { return crl->crl->revoked; } +LCRYPTO_ALIAS(X509_CRL_get_REVOKED); void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, @@ -666,9 +693,11 @@ X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, if (palg != NULL) *palg = crl->sig_alg; } +LCRYPTO_ALIAS(X509_CRL_get0_signature); const X509_ALGOR * X509_CRL_get0_tbs_sigalg(const X509_CRL *crl) { return crl->crl->sig_alg; } +LCRYPTO_ALIAS(X509_CRL_get0_tbs_sigalg); diff --git a/lib/libcrypto/asn1/x_exten.c b/lib/libcrypto/asn1/x_exten.c index 6ff33d5865a..323b539490e 100644 --- a/lib/libcrypto/asn1/x_exten.c +++ b/lib/libcrypto/asn1/x_exten.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_exten.c,v 1.20 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: x_exten.c,v 1.21 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -116,24 +116,28 @@ d2i_X509_EXTENSION(X509_EXTENSION **a, const unsigned char **in, long len) return (X509_EXTENSION *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_EXTENSION_it); } +LCRYPTO_ALIAS(d2i_X509_EXTENSION); int i2d_X509_EXTENSION(X509_EXTENSION *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_EXTENSION_it); } +LCRYPTO_ALIAS(i2d_X509_EXTENSION); X509_EXTENSION * X509_EXTENSION_new(void) { return (X509_EXTENSION *)ASN1_item_new(&X509_EXTENSION_it); } +LCRYPTO_ALIAS(X509_EXTENSION_new); void X509_EXTENSION_free(X509_EXTENSION *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_EXTENSION_it); } +LCRYPTO_ALIAS(X509_EXTENSION_free); X509_EXTENSIONS * d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len) @@ -141,15 +145,18 @@ d2i_X509_EXTENSIONS(X509_EXTENSIONS **a, const unsigned char **in, long len) return (X509_EXTENSIONS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_EXTENSIONS_it); } +LCRYPTO_ALIAS(d2i_X509_EXTENSIONS); int i2d_X509_EXTENSIONS(X509_EXTENSIONS *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_EXTENSIONS_it); } +LCRYPTO_ALIAS(i2d_X509_EXTENSIONS); X509_EXTENSION * X509_EXTENSION_dup(X509_EXTENSION *x) { return ASN1_item_dup(&X509_EXTENSION_it, x); } +LCRYPTO_ALIAS(X509_EXTENSION_dup); diff --git a/lib/libcrypto/asn1/x_info.c b/lib/libcrypto/asn1/x_info.c index 3d2d5bad64e..cb8c4660854 100644 --- a/lib/libcrypto/asn1/x_info.c +++ b/lib/libcrypto/asn1/x_info.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_info.c,v 1.20 2023/07/07 19:37:52 beck Exp $ */ +/* $OpenBSD: x_info.c,v 1.21 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -75,6 +75,7 @@ X509_INFO_new(void) return ret; } +LCRYPTO_ALIAS(X509_INFO_new); void X509_INFO_free(X509_INFO *x) @@ -92,3 +93,4 @@ X509_INFO_free(X509_INFO *x) free(x); } +LCRYPTO_ALIAS(X509_INFO_free); diff --git a/lib/libcrypto/asn1/x_name.c b/lib/libcrypto/asn1/x_name.c index dc9f217892b..5124ad3b253 100644 --- a/lib/libcrypto/asn1/x_name.c +++ b/lib/libcrypto/asn1/x_name.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_name.c,v 1.41 2023/07/24 06:56:54 tb Exp $ */ +/* $OpenBSD: x_name.c,v 1.42 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -117,30 +117,35 @@ d2i_X509_NAME_ENTRY(X509_NAME_ENTRY **a, const unsigned char **in, long len) return (X509_NAME_ENTRY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_NAME_ENTRY_it); } +LCRYPTO_ALIAS(d2i_X509_NAME_ENTRY); int i2d_X509_NAME_ENTRY(X509_NAME_ENTRY *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_NAME_ENTRY_it); } +LCRYPTO_ALIAS(i2d_X509_NAME_ENTRY); X509_NAME_ENTRY * X509_NAME_ENTRY_new(void) { return (X509_NAME_ENTRY *)ASN1_item_new(&X509_NAME_ENTRY_it); } +LCRYPTO_ALIAS(X509_NAME_ENTRY_new); void X509_NAME_ENTRY_free(X509_NAME_ENTRY *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_NAME_ENTRY_it); } +LCRYPTO_ALIAS(X509_NAME_ENTRY_free); X509_NAME_ENTRY * X509_NAME_ENTRY_dup(X509_NAME_ENTRY *x) { return ASN1_item_dup(&X509_NAME_ENTRY_it, x); } +LCRYPTO_ALIAS(X509_NAME_ENTRY_dup); /* For the "Name" type we need a SEQUENCE OF { SET OF X509_NAME_ENTRY } * so declare two template wrappers for this @@ -214,30 +219,35 @@ d2i_X509_NAME(X509_NAME **a, const unsigned char **in, long len) return (X509_NAME *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_NAME_it); } +LCRYPTO_ALIAS(d2i_X509_NAME); int i2d_X509_NAME(X509_NAME *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_NAME_it); } +LCRYPTO_ALIAS(i2d_X509_NAME); X509_NAME * X509_NAME_new(void) { return (X509_NAME *)ASN1_item_new(&X509_NAME_it); } +LCRYPTO_ALIAS(X509_NAME_new); void X509_NAME_free(X509_NAME *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_NAME_it); } +LCRYPTO_ALIAS(X509_NAME_free); X509_NAME * X509_NAME_dup(X509_NAME *x) { return ASN1_item_dup(&X509_NAME_it, x); } +LCRYPTO_ALIAS(X509_NAME_dup); static int x509_name_ex_new(ASN1_VALUE **val, const ASN1_ITEM *it) @@ -635,6 +645,7 @@ X509_NAME_set(X509_NAME **xn, X509_NAME *name) *xn = name; return 1; } +LCRYPTO_ALIAS(X509_NAME_set); int X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, size_t *pderlen) @@ -648,3 +659,4 @@ X509_NAME_get0_der(X509_NAME *nm, const unsigned char **pder, size_t *pderlen) *pderlen = nm->bytes->length; return 1; } +LCRYPTO_ALIAS(X509_NAME_get0_der); diff --git a/lib/libcrypto/asn1/x_pkey.c b/lib/libcrypto/asn1/x_pkey.c index c4964fcd64a..5c96c13ab9a 100644 --- a/lib/libcrypto/asn1/x_pkey.c +++ b/lib/libcrypto/asn1/x_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_pkey.c,v 1.23 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_pkey.c,v 1.24 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -98,6 +98,7 @@ X509_PKEY_new(void) } return NULL; } +LCRYPTO_ALIAS(X509_PKEY_new); void X509_PKEY_free(X509_PKEY *x) @@ -119,3 +120,4 @@ X509_PKEY_free(X509_PKEY *x) free(x->key_data); free(x); } +LCRYPTO_ALIAS(X509_PKEY_free); diff --git a/lib/libcrypto/asn1/x_pubkey.c b/lib/libcrypto/asn1/x_pubkey.c index 0534edcad00..783e2630d30 100644 --- a/lib/libcrypto/asn1/x_pubkey.c +++ b/lib/libcrypto/asn1/x_pubkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_pubkey.c,v 1.35 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_pubkey.c,v 1.36 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -118,24 +118,28 @@ d2i_X509_PUBKEY(X509_PUBKEY **a, const unsigned char **in, long len) return (X509_PUBKEY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_PUBKEY_it); } +LCRYPTO_ALIAS(d2i_X509_PUBKEY); int i2d_X509_PUBKEY(X509_PUBKEY *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_PUBKEY_it); } +LCRYPTO_ALIAS(i2d_X509_PUBKEY); X509_PUBKEY * X509_PUBKEY_new(void) { return (X509_PUBKEY *)ASN1_item_new(&X509_PUBKEY_it); } +LCRYPTO_ALIAS(X509_PUBKEY_new); void X509_PUBKEY_free(X509_PUBKEY *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_PUBKEY_it); } +LCRYPTO_ALIAS(X509_PUBKEY_free); int X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) @@ -174,6 +178,7 @@ X509_PUBKEY_set(X509_PUBKEY **x, EVP_PKEY *pkey) X509_PUBKEY_free(pk); return 0; } +LCRYPTO_ALIAS(X509_PUBKEY_set); EVP_PKEY * X509_PUBKEY_get0(X509_PUBKEY *key) @@ -226,6 +231,7 @@ X509_PUBKEY_get0(X509_PUBKEY *key) EVP_PKEY_free(ret); return (NULL); } +LCRYPTO_ALIAS(X509_PUBKEY_get0); EVP_PKEY * X509_PUBKEY_get(X509_PUBKEY *key) @@ -239,6 +245,7 @@ X509_PUBKEY_get(X509_PUBKEY *key) return pkey; } +LCRYPTO_ALIAS(X509_PUBKEY_get); /* * Decode an X509_PUBKEY into the specified key type. @@ -403,12 +410,14 @@ d2i_PUBKEY(EVP_PKEY **pkey, const unsigned char **in, long len) return (EVP_PKEY *)ASN1_item_d2i((ASN1_VALUE **)pkey, in, len, &EVP_PKEY_PUBKEY_it); } +LCRYPTO_ALIAS(d2i_PUBKEY); int i2d_PUBKEY(EVP_PKEY *pkey, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)pkey, out, &EVP_PKEY_PUBKEY_it); } +LCRYPTO_ALIAS(i2d_PUBKEY); EVP_PKEY * d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **pkey) @@ -416,12 +425,14 @@ d2i_PUBKEY_bio(BIO *bp, EVP_PKEY **pkey) return (EVP_PKEY *)ASN1_item_d2i_bio(&EVP_PKEY_PUBKEY_it, bp, (ASN1_VALUE **)pkey); } +LCRYPTO_ALIAS(d2i_PUBKEY_bio); int i2d_PUBKEY_bio(BIO *bp, EVP_PKEY *pkey) { return ASN1_item_i2d_bio(&EVP_PKEY_PUBKEY_it, bp, (ASN1_VALUE *)pkey); } +LCRYPTO_ALIAS(i2d_PUBKEY_bio); EVP_PKEY * d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **pkey) @@ -429,12 +440,14 @@ d2i_PUBKEY_fp(FILE *fp, EVP_PKEY **pkey) return (EVP_PKEY *)ASN1_item_d2i_fp(&EVP_PKEY_PUBKEY_it, fp, (ASN1_VALUE **)pkey); } +LCRYPTO_ALIAS(d2i_PUBKEY_fp); int i2d_PUBKEY_fp(FILE *fp, EVP_PKEY *pkey) { return ASN1_item_i2d_fp(&EVP_PKEY_PUBKEY_it, fp, (ASN1_VALUE *)pkey); } +LCRYPTO_ALIAS(i2d_PUBKEY_fp); /* * The following are equivalents but which return RSA and DSA keys. @@ -497,36 +510,42 @@ d2i_RSA_PUBKEY(RSA **rsa, const unsigned char **in, long len) return (RSA *)ASN1_item_d2i((ASN1_VALUE **)rsa, in, len, &RSA_PUBKEY_it); } +LCRYPTO_ALIAS(d2i_RSA_PUBKEY); int i2d_RSA_PUBKEY(RSA *rsa, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)rsa, out, &RSA_PUBKEY_it); } +LCRYPTO_ALIAS(i2d_RSA_PUBKEY); RSA * d2i_RSA_PUBKEY_bio(BIO *bp, RSA **rsa) { return (RSA *)ASN1_item_d2i_bio(&RSA_PUBKEY_it, bp, (ASN1_VALUE **)rsa); } +LCRYPTO_ALIAS(d2i_RSA_PUBKEY_bio); int i2d_RSA_PUBKEY_bio(BIO *bp, RSA *rsa) { return ASN1_item_i2d_bio(&RSA_PUBKEY_it, bp, (ASN1_VALUE *)rsa); } +LCRYPTO_ALIAS(i2d_RSA_PUBKEY_bio); RSA * d2i_RSA_PUBKEY_fp(FILE *fp, RSA **rsa) { return (RSA *)ASN1_item_d2i_fp(&RSA_PUBKEY_it, fp, (ASN1_VALUE **)rsa); } +LCRYPTO_ALIAS(d2i_RSA_PUBKEY_fp); int i2d_RSA_PUBKEY_fp(FILE *fp, RSA *rsa) { return ASN1_item_i2d_fp(&RSA_PUBKEY_it, fp, (ASN1_VALUE *)rsa); } +LCRYPTO_ALIAS(i2d_RSA_PUBKEY_fp); #endif #ifndef OPENSSL_NO_DSA @@ -587,36 +606,42 @@ d2i_DSA_PUBKEY(DSA **dsa, const unsigned char **in, long len) return (DSA *)ASN1_item_d2i((ASN1_VALUE **)dsa, in, len, &DSA_PUBKEY_it); } +LCRYPTO_ALIAS(d2i_DSA_PUBKEY); int i2d_DSA_PUBKEY(DSA *dsa, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)dsa, out, &DSA_PUBKEY_it); } +LCRYPTO_ALIAS(i2d_DSA_PUBKEY); DSA * d2i_DSA_PUBKEY_bio(BIO *bp, DSA **dsa) { return (DSA *)ASN1_item_d2i_bio(&DSA_PUBKEY_it, bp, (ASN1_VALUE **)dsa); } +LCRYPTO_ALIAS(d2i_DSA_PUBKEY_bio); int i2d_DSA_PUBKEY_bio(BIO *bp, DSA *dsa) { return ASN1_item_i2d_bio(&DSA_PUBKEY_it, bp, (ASN1_VALUE *)dsa); } +LCRYPTO_ALIAS(i2d_DSA_PUBKEY_bio); DSA * d2i_DSA_PUBKEY_fp(FILE *fp, DSA **dsa) { return (DSA *)ASN1_item_d2i_fp(&DSA_PUBKEY_it, fp, (ASN1_VALUE **)dsa); } +LCRYPTO_ALIAS(d2i_DSA_PUBKEY_fp); int i2d_DSA_PUBKEY_fp(FILE *fp, DSA *dsa) { return ASN1_item_i2d_fp(&DSA_PUBKEY_it, fp, (ASN1_VALUE *)dsa); } +LCRYPTO_ALIAS(i2d_DSA_PUBKEY_fp); #endif @@ -678,36 +703,42 @@ d2i_EC_PUBKEY(EC_KEY **ec, const unsigned char **in, long len) return (EC_KEY *)ASN1_item_d2i((ASN1_VALUE **)ec, in, len, &EC_PUBKEY_it); } +LCRYPTO_ALIAS(d2i_EC_PUBKEY); int i2d_EC_PUBKEY(EC_KEY *ec, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)ec, out, &EC_PUBKEY_it); } +LCRYPTO_ALIAS(i2d_EC_PUBKEY); EC_KEY * d2i_EC_PUBKEY_bio(BIO *bp, EC_KEY **ec) { return (EC_KEY *)ASN1_item_d2i_bio(&EC_PUBKEY_it, bp, (ASN1_VALUE **)ec); } +LCRYPTO_ALIAS(d2i_EC_PUBKEY_bio); int i2d_EC_PUBKEY_bio(BIO *bp, EC_KEY *ec) { return ASN1_item_i2d_bio(&EC_PUBKEY_it, bp, (ASN1_VALUE *)ec); } +LCRYPTO_ALIAS(i2d_EC_PUBKEY_bio); EC_KEY * d2i_EC_PUBKEY_fp(FILE *fp, EC_KEY **ec) { return (EC_KEY *)ASN1_item_d2i_fp(&EC_PUBKEY_it, fp, (ASN1_VALUE **)ec); } +LCRYPTO_ALIAS(d2i_EC_PUBKEY_fp); int i2d_EC_PUBKEY_fp(FILE *fp, EC_KEY *ec) { return ASN1_item_i2d_fp(&EC_PUBKEY_it, fp, (ASN1_VALUE *)ec); } +LCRYPTO_ALIAS(i2d_EC_PUBKEY_fp); #endif int @@ -724,6 +755,7 @@ X509_PUBKEY_set0_param(X509_PUBKEY *pub, ASN1_OBJECT *aobj, int ptype, return asn1_abs_set_unused_bits(pub->public_key, 0); } +LCRYPTO_ALIAS(X509_PUBKEY_set0_param); int X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, const unsigned char **pk, @@ -739,3 +771,4 @@ X509_PUBKEY_get0_param(ASN1_OBJECT **ppkalg, const unsigned char **pk, *pa = pub->algor; return 1; } +LCRYPTO_ALIAS(X509_PUBKEY_get0_param); diff --git a/lib/libcrypto/asn1/x_req.c b/lib/libcrypto/asn1/x_req.c index 9a6f0c7b08e..7dd2dd7c3ed 100644 --- a/lib/libcrypto/asn1/x_req.c +++ b/lib/libcrypto/asn1/x_req.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_req.c,v 1.21 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_req.c,v 1.22 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -143,24 +143,28 @@ d2i_X509_REQ_INFO(X509_REQ_INFO **a, const unsigned char **in, long len) return (X509_REQ_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_REQ_INFO_it); } +LCRYPTO_ALIAS(d2i_X509_REQ_INFO); int i2d_X509_REQ_INFO(X509_REQ_INFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REQ_INFO_it); } +LCRYPTO_ALIAS(i2d_X509_REQ_INFO); X509_REQ_INFO * X509_REQ_INFO_new(void) { return (X509_REQ_INFO *)ASN1_item_new(&X509_REQ_INFO_it); } +LCRYPTO_ALIAS(X509_REQ_INFO_new); void X509_REQ_INFO_free(X509_REQ_INFO *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_REQ_INFO_it); } +LCRYPTO_ALIAS(X509_REQ_INFO_free); static const ASN1_AUX X509_REQ_aux = { .app_data = NULL, @@ -203,36 +207,42 @@ d2i_X509_REQ(X509_REQ **a, const unsigned char **in, long len) return (X509_REQ *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_REQ_it); } +LCRYPTO_ALIAS(d2i_X509_REQ); int i2d_X509_REQ(X509_REQ *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_REQ_it); } +LCRYPTO_ALIAS(i2d_X509_REQ); X509_REQ * X509_REQ_new(void) { return (X509_REQ *)ASN1_item_new(&X509_REQ_it); } +LCRYPTO_ALIAS(X509_REQ_new); void X509_REQ_free(X509_REQ *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_REQ_it); } +LCRYPTO_ALIAS(X509_REQ_free); X509_REQ * X509_REQ_dup(X509_REQ *x) { return ASN1_item_dup(&X509_REQ_it, x); } +LCRYPTO_ALIAS(X509_REQ_dup); int X509_REQ_get_signature_nid(const X509_REQ *req) { return OBJ_obj2nid(req->sig_alg->algorithm); } +LCRYPTO_ALIAS(X509_REQ_get_signature_nid); void X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, @@ -243,3 +253,4 @@ X509_REQ_get0_signature(const X509_REQ *req, const ASN1_BIT_STRING **psig, if (palg != NULL) *palg = req->sig_alg; } +LCRYPTO_ALIAS(X509_REQ_get0_signature); diff --git a/lib/libcrypto/asn1/x_sig.c b/lib/libcrypto/asn1/x_sig.c index c55de714168..5148b5a2228 100644 --- a/lib/libcrypto/asn1/x_sig.c +++ b/lib/libcrypto/asn1/x_sig.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_sig.c,v 1.16 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_sig.c,v 1.17 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -92,24 +92,28 @@ d2i_X509_SIG(X509_SIG **a, const unsigned char **in, long len) return (X509_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_SIG_it); } +LCRYPTO_ALIAS(d2i_X509_SIG); int i2d_X509_SIG(X509_SIG *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_SIG_it); } +LCRYPTO_ALIAS(i2d_X509_SIG); X509_SIG * X509_SIG_new(void) { return (X509_SIG *)ASN1_item_new(&X509_SIG_it); } +LCRYPTO_ALIAS(X509_SIG_new); void X509_SIG_free(X509_SIG *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_SIG_it); } +LCRYPTO_ALIAS(X509_SIG_free); void X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, @@ -120,6 +124,7 @@ X509_SIG_get0(const X509_SIG *sig, const X509_ALGOR **palg, if (pdigest != NULL) *pdigest = sig->digest; } +LCRYPTO_ALIAS(X509_SIG_get0); void X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest) @@ -129,3 +134,4 @@ X509_SIG_getm(X509_SIG *sig, X509_ALGOR **palg, ASN1_OCTET_STRING **pdigest) if (pdigest != NULL) *pdigest = sig->digest; } +LCRYPTO_ALIAS(X509_SIG_getm); diff --git a/lib/libcrypto/asn1/x_spki.c b/lib/libcrypto/asn1/x_spki.c index ef6053339bd..545799e2ae8 100644 --- a/lib/libcrypto/asn1/x_spki.c +++ b/lib/libcrypto/asn1/x_spki.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_spki.c,v 1.13 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_spki.c,v 1.14 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -94,24 +94,28 @@ d2i_NETSCAPE_SPKAC(NETSCAPE_SPKAC **a, const unsigned char **in, long len) return (NETSCAPE_SPKAC *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &NETSCAPE_SPKAC_it); } +LCRYPTO_ALIAS(d2i_NETSCAPE_SPKAC); int i2d_NETSCAPE_SPKAC(NETSCAPE_SPKAC *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_SPKAC_it); } +LCRYPTO_ALIAS(i2d_NETSCAPE_SPKAC); NETSCAPE_SPKAC * NETSCAPE_SPKAC_new(void) { return (NETSCAPE_SPKAC *)ASN1_item_new(&NETSCAPE_SPKAC_it); } +LCRYPTO_ALIAS(NETSCAPE_SPKAC_new); void NETSCAPE_SPKAC_free(NETSCAPE_SPKAC *a) { ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_SPKAC_it); } +LCRYPTO_ALIAS(NETSCAPE_SPKAC_free); static const ASN1_TEMPLATE NETSCAPE_SPKI_seq_tt[] = { { @@ -154,21 +158,25 @@ d2i_NETSCAPE_SPKI(NETSCAPE_SPKI **a, const unsigned char **in, long len) return (NETSCAPE_SPKI *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &NETSCAPE_SPKI_it); } +LCRYPTO_ALIAS(d2i_NETSCAPE_SPKI); int i2d_NETSCAPE_SPKI(NETSCAPE_SPKI *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &NETSCAPE_SPKI_it); } +LCRYPTO_ALIAS(i2d_NETSCAPE_SPKI); NETSCAPE_SPKI * NETSCAPE_SPKI_new(void) { return (NETSCAPE_SPKI *)ASN1_item_new(&NETSCAPE_SPKI_it); } +LCRYPTO_ALIAS(NETSCAPE_SPKI_new); void NETSCAPE_SPKI_free(NETSCAPE_SPKI *a) { ASN1_item_free((ASN1_VALUE *)a, &NETSCAPE_SPKI_it); } +LCRYPTO_ALIAS(NETSCAPE_SPKI_free); diff --git a/lib/libcrypto/asn1/x_val.c b/lib/libcrypto/asn1/x_val.c index a9c9c481e04..47e17551511 100644 --- a/lib/libcrypto/asn1/x_val.c +++ b/lib/libcrypto/asn1/x_val.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_val.c,v 1.13 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_val.c,v 1.14 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -90,21 +90,25 @@ d2i_X509_VAL(X509_VAL **a, const unsigned char **in, long len) return (X509_VAL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_VAL_it); } +LCRYPTO_ALIAS(d2i_X509_VAL); int i2d_X509_VAL(X509_VAL *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_VAL_it); } +LCRYPTO_ALIAS(i2d_X509_VAL); X509_VAL * X509_VAL_new(void) { return (X509_VAL *)ASN1_item_new(&X509_VAL_it); } +LCRYPTO_ALIAS(X509_VAL_new); void X509_VAL_free(X509_VAL *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_VAL_it); } +LCRYPTO_ALIAS(X509_VAL_free); diff --git a/lib/libcrypto/asn1/x_x509.c b/lib/libcrypto/asn1/x_x509.c index 08e4dba9e86..e3499f620ff 100644 --- a/lib/libcrypto/asn1/x_x509.c +++ b/lib/libcrypto/asn1/x_x509.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509.c,v 1.37 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_x509.c,v 1.38 2024/04/09 13:55:02 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -149,24 +149,28 @@ d2i_X509_CINF(X509_CINF **a, const unsigned char **in, long len) return (X509_CINF *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_CINF_it); } +LCRYPTO_ALIAS(d2i_X509_CINF); int i2d_X509_CINF(X509_CINF *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_CINF_it); } +LCRYPTO_ALIAS(i2d_X509_CINF); X509_CINF * X509_CINF_new(void) { return (X509_CINF *)ASN1_item_new(&X509_CINF_it); } +LCRYPTO_ALIAS(X509_CINF_new); void X509_CINF_free(X509_CINF *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_CINF_it); } +LCRYPTO_ALIAS(X509_CINF_free); /* X509 top level structure needs a bit of customisation */ static int @@ -216,6 +220,7 @@ x509_cb(int operation, ASN1_VALUE **pval, const ASN1_ITEM *it, void *exarg) return 1; } +LCRYPTO_ALIAS(d2i_X509_CINF); static const ASN1_AUX X509_aux = { .app_data = NULL, @@ -259,30 +264,35 @@ d2i_X509(X509 **a, const unsigned char **in, long len) return (X509 *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &X509_it); } +LCRYPTO_ALIAS(d2i_X509); int i2d_X509(X509 *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &X509_it); } +LCRYPTO_ALIAS(i2d_X509); X509 * X509_new(void) { return (X509 *)ASN1_item_new(&X509_it); } +LCRYPTO_ALIAS(X509_new); void X509_free(X509 *a) { ASN1_item_free((ASN1_VALUE *)a, &X509_it); } +LCRYPTO_ALIAS(X509_free); X509 * X509_dup(X509 *x) { return ASN1_item_dup(&X509_it, x); } +LCRYPTO_ALIAS(X509_dup); int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, @@ -291,18 +301,21 @@ X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, return CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_X509, argl, argp, new_func, dup_func, free_func); } +LCRYPTO_ALIAS(X509_get_ex_new_index); int X509_set_ex_data(X509 *r, int idx, void *arg) { return (CRYPTO_set_ex_data(&r->ex_data, idx, arg)); } +LCRYPTO_ALIAS(X509_set_ex_data); void * X509_get_ex_data(X509 *r, int idx) { return (CRYPTO_get_ex_data(&r->ex_data, idx)); } +LCRYPTO_ALIAS(X509_get_ex_data); /* X509_AUX ASN1 routines. X509_AUX is the name given to * a certificate with extra info tagged on the end. Since these @@ -340,6 +353,7 @@ d2i_X509_AUX(X509 **a, const unsigned char **pp, long length) X509_free(ret); return NULL; } +LCRYPTO_ALIAS(d2i_X509_AUX); int i2d_X509_AUX(X509 *a, unsigned char **pp) @@ -351,6 +365,7 @@ i2d_X509_AUX(X509 *a, unsigned char **pp) length += i2d_X509_CERT_AUX(a->aux, pp); return length; } +LCRYPTO_ALIAS(i2d_X509_AUX); int i2d_re_X509_tbs(X509 *x, unsigned char **pp) @@ -358,6 +373,7 @@ i2d_re_X509_tbs(X509 *x, unsigned char **pp) x->cert_info->enc.modified = 1; return i2d_X509_CINF(x->cert_info, pp); } +LCRYPTO_ALIAS(i2d_re_X509_tbs); void X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, @@ -368,9 +384,11 @@ X509_get0_signature(const ASN1_BIT_STRING **psig, const X509_ALGOR **palg, if (palg != NULL) *palg = x->sig_alg; } +LCRYPTO_ALIAS(X509_get0_signature); int X509_get_signature_nid(const X509 *x) { return OBJ_obj2nid(x->sig_alg->algorithm); } +LCRYPTO_ALIAS(X509_get_signature_nid); diff --git a/lib/libcrypto/asn1/x_x509a.c b/lib/libcrypto/asn1/x_x509a.c index 2b6fe7fcec5..aaa22d13513 100644 --- a/lib/libcrypto/asn1/x_x509a.c +++ b/lib/libcrypto/asn1/x_x509a.c @@ -1,4 +1,4 @@ -/* $OpenBSD: x_x509a.c,v 1.21 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: x_x509a.c,v 1.22 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -172,6 +172,7 @@ X509_alias_set1(X509 *x, const unsigned char *name, int len) return 0; return ASN1_STRING_set(aux->alias, name, len); } +LCRYPTO_ALIAS(X509_alias_set1); int X509_keyid_set1(X509 *x, const unsigned char *id, int len) @@ -190,6 +191,7 @@ X509_keyid_set1(X509 *x, const unsigned char *id, int len) return 0; return ASN1_STRING_set(aux->keyid, id, len); } +LCRYPTO_ALIAS(X509_keyid_set1); unsigned char * X509_alias_get0(X509 *x, int *len) @@ -200,6 +202,7 @@ X509_alias_get0(X509 *x, int *len) *len = x->aux->alias->length; return x->aux->alias->data; } +LCRYPTO_ALIAS(X509_alias_get0); unsigned char * X509_keyid_get0(X509 *x, int *len) @@ -210,6 +213,7 @@ X509_keyid_get0(X509 *x, int *len) *len = x->aux->keyid->length; return x->aux->keyid->data; } +LCRYPTO_ALIAS(X509_keyid_get0); int X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj) @@ -232,6 +236,7 @@ X509_add1_trust_object(X509 *x, const ASN1_OBJECT *obj) ASN1_OBJECT_free(objtmp); return 0; } +LCRYPTO_ALIAS(X509_add1_trust_object); int X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj) @@ -254,6 +259,7 @@ X509_add1_reject_object(X509 *x, const ASN1_OBJECT *obj) ASN1_OBJECT_free(objtmp); return 0; } +LCRYPTO_ALIAS(X509_add1_reject_object); void X509_trust_clear(X509 *x) @@ -263,6 +269,7 @@ X509_trust_clear(X509 *x) x->aux->trust = NULL; } } +LCRYPTO_ALIAS(X509_trust_clear); void X509_reject_clear(X509 *x) @@ -272,3 +279,4 @@ X509_reject_clear(X509 *x) x->aux->reject = NULL; } } +LCRYPTO_ALIAS(X509_reject_clear); diff --git a/lib/libcrypto/evp/evp_pkey.c b/lib/libcrypto/evp/evp_pkey.c index 9e29a1ae691..591d066f4f3 100644 --- a/lib/libcrypto/evp/evp_pkey.c +++ b/lib/libcrypto/evp/evp_pkey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_pkey.c,v 1.27 2023/07/07 19:37:53 beck Exp $ */ +/* $OpenBSD: evp_pkey.c,v 1.28 2024/04/09 13:55:02 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 1999. */ @@ -105,6 +105,7 @@ error: EVP_PKEY_free(pkey); return NULL; } +LCRYPTO_ALIAS(EVP_PKCS82PKEY); /* Turn a private key into a PKCS8 structure */ @@ -138,6 +139,7 @@ error: PKCS8_PRIV_KEY_INFO_free(p8); return NULL; } +LCRYPTO_ALIAS(EVP_PKEY2PKCS8); /* EVP_PKEY attribute functions */ @@ -146,12 +148,14 @@ EVP_PKEY_get_attr_count(const EVP_PKEY *key) { return X509at_get_attr_count(key->attributes); } +LCRYPTO_ALIAS(EVP_PKEY_get_attr_count); int EVP_PKEY_get_attr_by_NID(const EVP_PKEY *key, int nid, int lastpos) { return X509at_get_attr_by_NID(key->attributes, nid, lastpos); } +LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_NID); int EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, @@ -159,18 +163,21 @@ EVP_PKEY_get_attr_by_OBJ(const EVP_PKEY *key, const ASN1_OBJECT *obj, { return X509at_get_attr_by_OBJ(key->attributes, obj, lastpos); } +LCRYPTO_ALIAS(EVP_PKEY_get_attr_by_OBJ); X509_ATTRIBUTE * EVP_PKEY_get_attr(const EVP_PKEY *key, int loc) { return X509at_get_attr(key->attributes, loc); } +LCRYPTO_ALIAS(EVP_PKEY_get_attr); X509_ATTRIBUTE * EVP_PKEY_delete_attr(EVP_PKEY *key, int loc) { return X509at_delete_attr(key->attributes, loc); } +LCRYPTO_ALIAS(EVP_PKEY_delete_attr); int EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) @@ -179,6 +186,7 @@ EVP_PKEY_add1_attr(EVP_PKEY *key, X509_ATTRIBUTE *attr) return 1; return 0; } +LCRYPTO_ALIAS(EVP_PKEY_add1_attr); int EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, @@ -188,6 +196,7 @@ EVP_PKEY_add1_attr_by_OBJ(EVP_PKEY *key, const ASN1_OBJECT *obj, int type, return 1; return 0; } +LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_OBJ); int EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, @@ -197,6 +206,7 @@ EVP_PKEY_add1_attr_by_NID(EVP_PKEY *key, int nid, int type, return 1; return 0; } +LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_NID); int EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, @@ -207,3 +217,4 @@ EVP_PKEY_add1_attr_by_txt(EVP_PKEY *key, const char *attrname, int type, return 1; return 0; } +LCRYPTO_ALIAS(EVP_PKEY_add1_attr_by_txt); diff --git a/lib/libcrypto/hidden/openssl/x509.h b/lib/libcrypto/hidden/openssl/x509.h index 35a4a67e083..6cf6ca5f6d6 100644 --- a/lib/libcrypto/hidden/openssl/x509.h +++ b/lib/libcrypto/hidden/openssl/x509.h @@ -1,4 +1,4 @@ -/* $OpenBSD: x509.h,v 1.4 2024/03/02 10:48:17 tb Exp $ */ +/* $OpenBSD: x509.h,v 1.5 2024/04/09 13:55:02 beck Exp $ */ /* * Copyright (c) 2022 Bob Beck * @@ -269,5 +269,199 @@ LCRYPTO_USED(X509_check_trust); LCRYPTO_USED(X509_up_ref); LCRYPTO_USED(X509_chain_up_ref); LCRYPTO_USED(ERR_load_X509_strings); +LCRYPTO_USED(X509_CRL_get_signature_nid); +LCRYPTO_USED(X509_CRL_get0_extensions); +LCRYPTO_USED(X509_CRL_get_version); +LCRYPTO_USED(X509_CRL_get0_lastUpdate); +LCRYPTO_USED(X509_CRL_get0_nextUpdate); +LCRYPTO_USED(X509_CRL_get_lastUpdate); +LCRYPTO_USED(X509_CRL_get_nextUpdate); +LCRYPTO_USED(X509_CRL_get_issuer); +LCRYPTO_USED(X509_CRL_get_REVOKED); +LCRYPTO_USED(X509_CRL_get0_signature); +LCRYPTO_USED(X509_CRL_get0_tbs_sigalg); +LCRYPTO_USED(X509_REQ_get_signature_nid); +LCRYPTO_USED(X509_REQ_get0_signature); +LCRYPTO_USED(X509_CRL_verify); +LCRYPTO_USED(NETSCAPE_SPKI_print); +LCRYPTO_USED(X509_signature_dump); +LCRYPTO_USED(X509_signature_print); +LCRYPTO_USED(d2i_RSA_PUBKEY_fp); +LCRYPTO_USED(i2d_RSA_PUBKEY_fp); +LCRYPTO_USED(d2i_DSA_PUBKEY_fp); +LCRYPTO_USED(i2d_DSA_PUBKEY_fp); +LCRYPTO_USED(d2i_EC_PUBKEY_fp); +LCRYPTO_USED(i2d_EC_PUBKEY_fp); +LCRYPTO_USED(i2d_PUBKEY_fp); +LCRYPTO_USED(d2i_PUBKEY_fp); +LCRYPTO_USED(d2i_RSA_PUBKEY_bio); +LCRYPTO_USED(i2d_RSA_PUBKEY_bio); +LCRYPTO_USED(d2i_DSA_PUBKEY_bio); +LCRYPTO_USED(i2d_DSA_PUBKEY_bio); +LCRYPTO_USED(d2i_EC_PUBKEY_bio); +LCRYPTO_USED(i2d_EC_PUBKEY_bio); +LCRYPTO_USED(i2d_PUBKEY_bio); +LCRYPTO_USED(d2i_PUBKEY_bio); +LCRYPTO_USED(X509_dup); +LCRYPTO_USED(X509_ATTRIBUTE_dup); +LCRYPTO_USED(X509_EXTENSION_dup); +LCRYPTO_USED(X509_CRL_dup); +LCRYPTO_USED(X509_REQ_dup); +LCRYPTO_USED(X509_ALGOR_dup); +LCRYPTO_USED(X509_ALGOR_set0); +LCRYPTO_USED(X509_ALGOR_get0); +LCRYPTO_USED(X509_ALGOR_cmp); +LCRYPTO_USED(X509_NAME_dup); +LCRYPTO_USED(X509_NAME_get0_der); +LCRYPTO_USED(X509_NAME_ENTRY_dup); +LCRYPTO_USED(X509_ALGOR_new); +LCRYPTO_USED(X509_ALGOR_free); +LCRYPTO_USED(d2i_X509_ALGOR); +LCRYPTO_USED(i2d_X509_ALGOR); +LCRYPTO_USED(d2i_X509_ALGORS); +LCRYPTO_USED(i2d_X509_ALGORS); +LCRYPTO_USED(X509_VAL_new); +LCRYPTO_USED(X509_VAL_free); +LCRYPTO_USED(d2i_X509_VAL); +LCRYPTO_USED(i2d_X509_VAL); +LCRYPTO_USED(X509_PUBKEY_new); +LCRYPTO_USED(X509_PUBKEY_free); +LCRYPTO_USED(d2i_X509_PUBKEY); +LCRYPTO_USED(i2d_X509_PUBKEY); +LCRYPTO_USED(X509_PUBKEY_set); +LCRYPTO_USED(X509_PUBKEY_get); +LCRYPTO_USED(X509_PUBKEY_get0); +LCRYPTO_USED(i2d_PUBKEY); +LCRYPTO_USED(d2i_PUBKEY); +LCRYPTO_USED(i2d_RSA_PUBKEY); +LCRYPTO_USED(d2i_RSA_PUBKEY); +LCRYPTO_USED(i2d_DSA_PUBKEY); +LCRYPTO_USED(d2i_DSA_PUBKEY); +LCRYPTO_USED(i2d_EC_PUBKEY); +LCRYPTO_USED(d2i_EC_PUBKEY); +LCRYPTO_USED(X509_SIG_new); +LCRYPTO_USED(X509_SIG_free); +LCRYPTO_USED(d2i_X509_SIG); +LCRYPTO_USED(i2d_X509_SIG); +LCRYPTO_USED(X509_SIG_get0); +LCRYPTO_USED(X509_SIG_getm); +LCRYPTO_USED(X509_REQ_INFO_new); +LCRYPTO_USED(X509_REQ_INFO_free); +LCRYPTO_USED(d2i_X509_REQ_INFO); +LCRYPTO_USED(i2d_X509_REQ_INFO); +LCRYPTO_USED(X509_REQ_new); +LCRYPTO_USED(X509_REQ_free); +LCRYPTO_USED(d2i_X509_REQ); +LCRYPTO_USED(i2d_X509_REQ); +LCRYPTO_USED(X509_ATTRIBUTE_new); +LCRYPTO_USED(X509_ATTRIBUTE_free); +LCRYPTO_USED(d2i_X509_ATTRIBUTE); +LCRYPTO_USED(i2d_X509_ATTRIBUTE); +LCRYPTO_USED(X509_ATTRIBUTE_create); +LCRYPTO_USED(X509_EXTENSION_new); +LCRYPTO_USED(X509_EXTENSION_free); +LCRYPTO_USED(d2i_X509_EXTENSION); +LCRYPTO_USED(i2d_X509_EXTENSION); +LCRYPTO_USED(d2i_X509_EXTENSIONS); +LCRYPTO_USED(i2d_X509_EXTENSIONS); +LCRYPTO_USED(X509_NAME_ENTRY_new); +LCRYPTO_USED(X509_NAME_ENTRY_free); +LCRYPTO_USED(d2i_X509_NAME_ENTRY); +LCRYPTO_USED(i2d_X509_NAME_ENTRY); +LCRYPTO_USED(X509_NAME_new); +LCRYPTO_USED(X509_NAME_free); +LCRYPTO_USED(d2i_X509_NAME); +LCRYPTO_USED(i2d_X509_NAME); +LCRYPTO_USED(X509_NAME_set); +LCRYPTO_USED(X509_CINF_new); +LCRYPTO_USED(X509_CINF_free); +LCRYPTO_USED(d2i_X509_CINF); +LCRYPTO_USED(i2d_X509_CINF); +LCRYPTO_USED(X509_new); +LCRYPTO_USED(X509_free); +LCRYPTO_USED(d2i_X509); +LCRYPTO_USED(i2d_X509); +LCRYPTO_USED(X509_get_ex_new_index); +LCRYPTO_USED(X509_set_ex_data); +LCRYPTO_USED(X509_get_ex_data); +LCRYPTO_USED(i2d_X509_AUX); +LCRYPTO_USED(d2i_X509_AUX); +LCRYPTO_USED(i2d_re_X509_tbs); +LCRYPTO_USED(X509_get0_signature); +LCRYPTO_USED(X509_get_signature_nid); +LCRYPTO_USED(X509_alias_set1); +LCRYPTO_USED(X509_keyid_set1); +LCRYPTO_USED(X509_alias_get0); +LCRYPTO_USED(X509_keyid_get0); +LCRYPTO_USED(X509_add1_trust_object); +LCRYPTO_USED(X509_add1_reject_object); +LCRYPTO_USED(X509_trust_clear); +LCRYPTO_USED(X509_reject_clear); +LCRYPTO_USED(X509_REVOKED_new); +LCRYPTO_USED(X509_REVOKED_free); +LCRYPTO_USED(X509_REVOKED_dup); +LCRYPTO_USED(d2i_X509_REVOKED); +LCRYPTO_USED(i2d_X509_REVOKED); +LCRYPTO_USED(X509_CRL_INFO_new); +LCRYPTO_USED(X509_CRL_INFO_free); +LCRYPTO_USED(d2i_X509_CRL_INFO); +LCRYPTO_USED(i2d_X509_CRL_INFO); +LCRYPTO_USED(X509_CRL_new); +LCRYPTO_USED(X509_CRL_free); +LCRYPTO_USED(d2i_X509_CRL); +LCRYPTO_USED(i2d_X509_CRL); +LCRYPTO_USED(X509_CRL_add0_revoked); +LCRYPTO_USED(X509_CRL_get0_by_serial); +LCRYPTO_USED(X509_CRL_get0_by_cert); +LCRYPTO_USED(X509_PKEY_new); +LCRYPTO_USED(X509_PKEY_free); +LCRYPTO_USED(NETSCAPE_SPKI_new); +LCRYPTO_USED(NETSCAPE_SPKI_free); +LCRYPTO_USED(d2i_NETSCAPE_SPKI); +LCRYPTO_USED(i2d_NETSCAPE_SPKI); +LCRYPTO_USED(NETSCAPE_SPKAC_new); +LCRYPTO_USED(NETSCAPE_SPKAC_free); +LCRYPTO_USED(d2i_NETSCAPE_SPKAC); +LCRYPTO_USED(i2d_NETSCAPE_SPKAC); +LCRYPTO_USED(X509_INFO_new); +LCRYPTO_USED(X509_INFO_free); +LCRYPTO_USED(ASN1_item_digest); +LCRYPTO_USED(ASN1_item_verify); +LCRYPTO_USED(ASN1_item_sign); +LCRYPTO_USED(ASN1_item_sign_ctx); +LCRYPTO_USED(X509_print_ex_fp); +LCRYPTO_USED(X509_print_fp); +LCRYPTO_USED(X509_CRL_print_fp); +LCRYPTO_USED(X509_REQ_print_fp); +LCRYPTO_USED(X509_NAME_print_ex_fp); +LCRYPTO_USED(X509_NAME_print); +LCRYPTO_USED(X509_NAME_print_ex); +LCRYPTO_USED(X509_print_ex); +LCRYPTO_USED(X509_print); +LCRYPTO_USED(X509_ocspid_print); +LCRYPTO_USED(X509_CRL_print); +LCRYPTO_USED(X509_REQ_print_ex); +LCRYPTO_USED(X509_REQ_print); +LCRYPTO_USED(EVP_PKEY_get_attr_count); +LCRYPTO_USED(EVP_PKEY_get_attr_by_NID); +LCRYPTO_USED(EVP_PKEY_get_attr_by_OBJ); +LCRYPTO_USED(EVP_PKEY_get_attr); +LCRYPTO_USED(EVP_PKEY_delete_attr); +LCRYPTO_USED(EVP_PKEY_add1_attr); +LCRYPTO_USED(EVP_PKEY_add1_attr_by_OBJ); +LCRYPTO_USED(EVP_PKEY_add1_attr_by_NID); +LCRYPTO_USED(EVP_PKEY_add1_attr_by_txt); +LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_new); +LCRYPTO_USED(PKCS8_PRIV_KEY_INFO_free); +LCRYPTO_USED(d2i_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(i2d_PKCS8_PRIV_KEY_INFO); +LCRYPTO_USED(EVP_PKCS82PKEY); +LCRYPTO_USED(EVP_PKEY2PKCS8); +LCRYPTO_USED(PKCS8_pkey_set0); +LCRYPTO_USED(PKCS8_pkey_get0); +LCRYPTO_USED(PKCS8_pkey_get0_attrs); +LCRYPTO_USED(PKCS8_pkey_add1_attr_by_NID); +LCRYPTO_USED(X509_PUBKEY_set0_param); +LCRYPTO_USED(X509_PUBKEY_get0_param); #endif /* _LIBCRYPTO_X509_H */ -- 2.20.1