From a1e92f6bcf28d1c6ba77a70b0e65c8987b640fd8 Mon Sep 17 00:00:00 2001 From: beck Date: Sat, 8 Jul 2023 10:43:59 +0000 Subject: [PATCH] Hide symbols in cast, idea, and ocsp ok tb@ --- lib/libcrypto/Symbols.namespace | 176 ++++++++++++++++++++++++++ lib/libcrypto/cast/c_cfb64.c | 3 +- lib/libcrypto/cast/c_ecb.c | 3 +- lib/libcrypto/cast/c_enc.c | 5 +- lib/libcrypto/cast/c_ofb64.c | 3 +- lib/libcrypto/cast/c_skey.c | 4 +- lib/libcrypto/hidden/openssl/cast.h | 36 ++++++ lib/libcrypto/hidden/openssl/idea.h | 37 ++++++ lib/libcrypto/hidden/openssl/ocsp.h | 190 ++++++++++++++++++++++++++++ lib/libcrypto/idea/i_cbc.c | 4 +- lib/libcrypto/idea/i_cfb64.c | 3 +- lib/libcrypto/idea/i_ecb.c | 4 +- lib/libcrypto/idea/i_ofb64.c | 3 +- lib/libcrypto/idea/i_skey.c | 4 +- lib/libcrypto/ocsp/ocsp_asn.c | 66 +++++++++- lib/libcrypto/ocsp/ocsp_cl.c | 21 ++- lib/libcrypto/ocsp/ocsp_err.c | 3 +- lib/libcrypto/ocsp/ocsp_ext.c | 46 ++++++- lib/libcrypto/ocsp/ocsp_ht.c | 8 +- lib/libcrypto/ocsp/ocsp_lib.c | 8 +- lib/libcrypto/ocsp/ocsp_prn.c | 7 +- lib/libcrypto/ocsp/ocsp_srv.c | 11 +- lib/libcrypto/ocsp/ocsp_vfy.c | 5 +- 23 files changed, 630 insertions(+), 20 deletions(-) create mode 100644 lib/libcrypto/hidden/openssl/cast.h create mode 100644 lib/libcrypto/hidden/openssl/idea.h create mode 100644 lib/libcrypto/hidden/openssl/ocsp.h diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index 89c4a06367c..37063b03be9 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -2063,3 +2063,179 @@ _libre_OPENSSL_cpu_caps _libre_OPENSSL_init_crypto _libre_OPENSSL_cleanup _libre_ERR_load_CRYPTO_strings +_libre_CAST_set_key +_libre_CAST_ecb_encrypt +_libre_CAST_encrypt +_libre_CAST_decrypt +_libre_CAST_cbc_encrypt +_libre_CAST_cfb64_encrypt +_libre_CAST_ofb64_encrypt +_libre_idea_options +_libre_idea_ecb_encrypt +_libre_idea_set_encrypt_key +_libre_idea_set_decrypt_key +_libre_idea_cbc_encrypt +_libre_idea_cfb64_encrypt +_libre_idea_ofb64_encrypt +_libre_idea_encrypt +_libre_OCSP_RESPID_new +_libre_OCSP_RESPID_free +_libre_d2i_OCSP_RESPID +_libre_i2d_OCSP_RESPID +_libre_OCSP_CERTID_dup +_libre_OCSP_sendreq_bio +_libre_OCSP_sendreq_new +_libre_OCSP_sendreq_nbio +_libre_OCSP_REQ_CTX_free +_libre_OCSP_REQ_CTX_set1_req +_libre_OCSP_REQ_CTX_add1_header +_libre_OCSP_cert_to_id +_libre_OCSP_cert_id_new +_libre_OCSP_request_add0_id +_libre_OCSP_request_add1_nonce +_libre_OCSP_basic_add1_nonce +_libre_OCSP_check_nonce +_libre_OCSP_copy_nonce +_libre_OCSP_request_set1_name +_libre_OCSP_request_add1_cert +_libre_OCSP_request_sign +_libre_OCSP_response_status +_libre_OCSP_response_get1_basic +_libre_OCSP_resp_get0_signature +_libre_OCSP_resp_get0_tbs_sigalg +_libre_OCSP_resp_get0_respdata +_libre_OCSP_resp_get0_signer +_libre_OCSP_resp_count +_libre_OCSP_resp_get0 +_libre_OCSP_resp_get0_produced_at +_libre_OCSP_resp_get0_certs +_libre_OCSP_resp_get0_id +_libre_OCSP_resp_find +_libre_OCSP_single_get0_status +_libre_OCSP_resp_find_status +_libre_OCSP_check_validity +_libre_OCSP_request_verify +_libre_OCSP_parse_url +_libre_OCSP_id_issuer_cmp +_libre_OCSP_id_cmp +_libre_OCSP_request_onereq_count +_libre_OCSP_request_onereq_get0 +_libre_OCSP_onereq_get0_id +_libre_OCSP_id_get0_info +_libre_OCSP_request_is_signed +_libre_OCSP_response_create +_libre_OCSP_basic_add1_status +_libre_OCSP_basic_add1_cert +_libre_OCSP_basic_sign +_libre_OCSP_crlID_new +_libre_OCSP_accept_responses_new +_libre_OCSP_archive_cutoff_new +_libre_OCSP_url_svcloc_new +_libre_OCSP_REQUEST_get_ext_count +_libre_OCSP_REQUEST_get_ext_by_NID +_libre_OCSP_REQUEST_get_ext_by_OBJ +_libre_OCSP_REQUEST_get_ext_by_critical +_libre_OCSP_REQUEST_get_ext +_libre_OCSP_REQUEST_delete_ext +_libre_OCSP_REQUEST_get1_ext_d2i +_libre_OCSP_REQUEST_add1_ext_i2d +_libre_OCSP_REQUEST_add_ext +_libre_OCSP_ONEREQ_get_ext_count +_libre_OCSP_ONEREQ_get_ext_by_NID +_libre_OCSP_ONEREQ_get_ext_by_OBJ +_libre_OCSP_ONEREQ_get_ext_by_critical +_libre_OCSP_ONEREQ_get_ext +_libre_OCSP_ONEREQ_delete_ext +_libre_OCSP_ONEREQ_get1_ext_d2i +_libre_OCSP_ONEREQ_add1_ext_i2d +_libre_OCSP_ONEREQ_add_ext +_libre_OCSP_BASICRESP_get_ext_count +_libre_OCSP_BASICRESP_get_ext_by_NID +_libre_OCSP_BASICRESP_get_ext_by_OBJ +_libre_OCSP_BASICRESP_get_ext_by_critical +_libre_OCSP_BASICRESP_get_ext +_libre_OCSP_BASICRESP_delete_ext +_libre_OCSP_BASICRESP_get1_ext_d2i +_libre_OCSP_BASICRESP_add1_ext_i2d +_libre_OCSP_BASICRESP_add_ext +_libre_OCSP_SINGLERESP_get_ext_count +_libre_OCSP_SINGLERESP_get_ext_by_NID +_libre_OCSP_SINGLERESP_get_ext_by_OBJ +_libre_OCSP_SINGLERESP_get_ext_by_critical +_libre_OCSP_SINGLERESP_get_ext +_libre_OCSP_SINGLERESP_delete_ext +_libre_OCSP_SINGLERESP_get1_ext_d2i +_libre_OCSP_SINGLERESP_add1_ext_i2d +_libre_OCSP_SINGLERESP_add_ext +_libre_OCSP_SINGLERESP_get0_id +_libre_OCSP_SINGLERESP_new +_libre_OCSP_SINGLERESP_free +_libre_d2i_OCSP_SINGLERESP +_libre_i2d_OCSP_SINGLERESP +_libre_OCSP_CERTSTATUS_new +_libre_OCSP_CERTSTATUS_free +_libre_d2i_OCSP_CERTSTATUS +_libre_i2d_OCSP_CERTSTATUS +_libre_OCSP_REVOKEDINFO_new +_libre_OCSP_REVOKEDINFO_free +_libre_d2i_OCSP_REVOKEDINFO +_libre_i2d_OCSP_REVOKEDINFO +_libre_OCSP_BASICRESP_new +_libre_OCSP_BASICRESP_free +_libre_d2i_OCSP_BASICRESP +_libre_i2d_OCSP_BASICRESP +_libre_OCSP_RESPDATA_new +_libre_OCSP_RESPDATA_free +_libre_d2i_OCSP_RESPDATA +_libre_i2d_OCSP_RESPDATA +_libre_OCSP_RESPID_new +_libre_OCSP_RESPID_free +_libre_d2i_OCSP_RESPID +_libre_i2d_OCSP_RESPID +_libre_OCSP_RESPONSE_new +_libre_OCSP_RESPONSE_free +_libre_d2i_OCSP_RESPONSE +_libre_i2d_OCSP_RESPONSE +_libre_d2i_OCSP_RESPONSE_bio +_libre_i2d_OCSP_RESPONSE_bio +_libre_OCSP_RESPBYTES_new +_libre_OCSP_RESPBYTES_free +_libre_d2i_OCSP_RESPBYTES +_libre_i2d_OCSP_RESPBYTES +_libre_OCSP_ONEREQ_new +_libre_OCSP_ONEREQ_free +_libre_d2i_OCSP_ONEREQ +_libre_i2d_OCSP_ONEREQ +_libre_OCSP_CERTID_new +_libre_OCSP_CERTID_free +_libre_d2i_OCSP_CERTID +_libre_i2d_OCSP_CERTID +_libre_OCSP_REQUEST_new +_libre_OCSP_REQUEST_free +_libre_d2i_OCSP_REQUEST +_libre_i2d_OCSP_REQUEST +_libre_d2i_OCSP_REQUEST_bio +_libre_i2d_OCSP_REQUEST_bio +_libre_OCSP_SIGNATURE_new +_libre_OCSP_SIGNATURE_free +_libre_d2i_OCSP_SIGNATURE +_libre_i2d_OCSP_SIGNATURE +_libre_OCSP_REQINFO_new +_libre_OCSP_REQINFO_free +_libre_d2i_OCSP_REQINFO +_libre_i2d_OCSP_REQINFO +_libre_OCSP_CRLID_new +_libre_OCSP_CRLID_free +_libre_d2i_OCSP_CRLID +_libre_i2d_OCSP_CRLID +_libre_OCSP_SERVICELOC_new +_libre_OCSP_SERVICELOC_free +_libre_d2i_OCSP_SERVICELOC +_libre_i2d_OCSP_SERVICELOC +_libre_OCSP_response_status_str +_libre_OCSP_cert_status_str +_libre_OCSP_crl_reason_str +_libre_OCSP_REQUEST_print +_libre_OCSP_RESPONSE_print +_libre_OCSP_basic_verify +_libre_ERR_load_OCSP_strings diff --git a/lib/libcrypto/cast/c_cfb64.c b/lib/libcrypto/cast/c_cfb64.c index 2b1883b1fbd..2acf7632e7b 100644 --- a/lib/libcrypto/cast/c_cfb64.c +++ b/lib/libcrypto/cast/c_cfb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_cfb64.c,v 1.7 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: c_cfb64.c,v 1.8 2023/07/08 10:43:59 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -121,3 +121,4 @@ CAST_cfb64_encrypt(const unsigned char *in, unsigned char *out, v0 = v1 = ti[0] = ti[1] = t=c = cc = 0; *num = n; } +LCRYPTO_ALIAS(CAST_cfb64_encrypt); diff --git a/lib/libcrypto/cast/c_ecb.c b/lib/libcrypto/cast/c_ecb.c index ea008985367..89338a18e5c 100644 --- a/lib/libcrypto/cast/c_ecb.c +++ b/lib/libcrypto/cast/c_ecb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ecb.c,v 1.9 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: c_ecb.c,v 1.10 2023/07/08 10:43:59 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -80,3 +80,4 @@ CAST_ecb_encrypt(const unsigned char *in, unsigned char *out, l2n(l, out); l = d[0] = d[1] = 0; } +LCRYPTO_ALIAS(CAST_ecb_encrypt); diff --git a/lib/libcrypto/cast/c_enc.c b/lib/libcrypto/cast/c_enc.c index 70cad75f318..34fe69f0a03 100644 --- a/lib/libcrypto/cast/c_enc.c +++ b/lib/libcrypto/cast/c_enc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_enc.c,v 1.9 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: c_enc.c,v 1.10 2023/07/08 10:43:59 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -92,6 +92,7 @@ CAST_encrypt(CAST_LONG *data, const CAST_KEY *key) data[1] = l&0xffffffffL; data[0] = r&0xffffffffL; } +LCRYPTO_ALIAS(CAST_encrypt); void CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) @@ -125,6 +126,7 @@ CAST_decrypt(CAST_LONG *data, const CAST_KEY *key) data[1] = l&0xffffffffL; data[0] = r&0xffffffffL; } +LCRYPTO_ALIAS(CAST_decrypt); #endif void @@ -202,3 +204,4 @@ CAST_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; tin[0] = tin[1] = 0; } +LCRYPTO_ALIAS(CAST_cbc_encrypt); diff --git a/lib/libcrypto/cast/c_ofb64.c b/lib/libcrypto/cast/c_ofb64.c index 7fd5444a054..48ebab90697 100644 --- a/lib/libcrypto/cast/c_ofb64.c +++ b/lib/libcrypto/cast/c_ofb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_ofb64.c,v 1.7 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: c_ofb64.c,v 1.8 2023/07/08 10:43:59 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -108,3 +108,4 @@ CAST_ofb64_encrypt(const unsigned char *in, unsigned char *out, t = v0 = v1 = ti[0] = ti[1] = 0; *num = n; } +LCRYPTO_ALIAS(CAST_ofb64_encrypt); diff --git a/lib/libcrypto/cast/c_skey.c b/lib/libcrypto/cast/c_skey.c index 1f876648fd3..ecce7bad7f2 100644 --- a/lib/libcrypto/cast/c_skey.c +++ b/lib/libcrypto/cast/c_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: c_skey.c,v 1.13 2023/07/08 07:25:43 jsing Exp $ */ +/* $OpenBSD: c_skey.c,v 1.14 2023/07/08 10:43:59 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -166,4 +166,4 @@ CAST_set_key(CAST_KEY *key, int len, const unsigned char *data) key->data[i*2 + 1] = ((k[i + 16]) + 16)&0x1f; } } - +LCRYPTO_ALIAS(CAST_set_key); diff --git a/lib/libcrypto/hidden/openssl/cast.h b/lib/libcrypto/hidden/openssl/cast.h new file mode 100644 index 00000000000..68cf618266e --- /dev/null +++ b/lib/libcrypto/hidden/openssl/cast.h @@ -0,0 +1,36 @@ +/* $OpenBSD: cast.h,v 1.1 2023/07/08 10:44:00 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBCRYPTO_CAST_H +#define _LIBCRYPTO_CAST_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/cast.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(CAST_set_key); +LCRYPTO_USED(CAST_ecb_encrypt); +LCRYPTO_USED(CAST_encrypt); +LCRYPTO_USED(CAST_decrypt); +LCRYPTO_USED(CAST_cbc_encrypt); +LCRYPTO_USED(CAST_cfb64_encrypt); +LCRYPTO_USED(CAST_ofb64_encrypt); + +#endif /* _LIBCRYPTO_CAST_H */ diff --git a/lib/libcrypto/hidden/openssl/idea.h b/lib/libcrypto/hidden/openssl/idea.h new file mode 100644 index 00000000000..f8c7caf6a35 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/idea.h @@ -0,0 +1,37 @@ +/* $OpenBSD: idea.h,v 1.1 2023/07/08 10:44:00 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBCRYPTO_IDEA_H +#define _LIBCRYPTO_IDEA_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/idea.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(idea_options); +LCRYPTO_USED(idea_ecb_encrypt); +LCRYPTO_USED(idea_set_encrypt_key); +LCRYPTO_USED(idea_set_decrypt_key); +LCRYPTO_USED(idea_cbc_encrypt); +LCRYPTO_USED(idea_cfb64_encrypt); +LCRYPTO_USED(idea_ofb64_encrypt); +LCRYPTO_USED(idea_encrypt); + +#endif /* _LIBCRYPTO_IDEA_H */ diff --git a/lib/libcrypto/hidden/openssl/ocsp.h b/lib/libcrypto/hidden/openssl/ocsp.h new file mode 100644 index 00000000000..654696224fe --- /dev/null +++ b/lib/libcrypto/hidden/openssl/ocsp.h @@ -0,0 +1,190 @@ +/* $OpenBSD: ocsp.h,v 1.1 2023/07/08 10:44:00 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck + * + * Permission to use, copy, modify, and distribute this software for any + * purpose with or without fee is hereby granted, provided that the above + * copyright notice and this permission notice appear in all copies. + * + * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + */ + +#ifndef _LIBCRYPTO_OCSP_H +#define _LIBCRYPTO_OCSP_H + +#ifndef _MSC_VER +#include_next +#else +#include "../include/openssl/ocsp.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(OCSP_RESPID_new); +LCRYPTO_USED(OCSP_RESPID_free); +LCRYPTO_USED(d2i_OCSP_RESPID); +LCRYPTO_USED(i2d_OCSP_RESPID); +LCRYPTO_USED(OCSP_CERTID_dup); +LCRYPTO_USED(OCSP_sendreq_bio); +LCRYPTO_USED(OCSP_sendreq_new); +LCRYPTO_USED(OCSP_sendreq_nbio); +LCRYPTO_USED(OCSP_REQ_CTX_free); +LCRYPTO_USED(OCSP_REQ_CTX_set1_req); +LCRYPTO_USED(OCSP_REQ_CTX_add1_header); +LCRYPTO_USED(OCSP_cert_to_id); +LCRYPTO_USED(OCSP_cert_id_new); +LCRYPTO_USED(OCSP_request_add0_id); +LCRYPTO_USED(OCSP_request_add1_nonce); +LCRYPTO_USED(OCSP_basic_add1_nonce); +LCRYPTO_USED(OCSP_check_nonce); +LCRYPTO_USED(OCSP_copy_nonce); +LCRYPTO_USED(OCSP_request_set1_name); +LCRYPTO_USED(OCSP_request_add1_cert); +LCRYPTO_USED(OCSP_request_sign); +LCRYPTO_USED(OCSP_response_status); +LCRYPTO_USED(OCSP_response_get1_basic); +LCRYPTO_USED(OCSP_resp_get0_signature); +LCRYPTO_USED(OCSP_resp_get0_tbs_sigalg); +LCRYPTO_USED(OCSP_resp_get0_respdata); +LCRYPTO_USED(OCSP_resp_get0_signer); +LCRYPTO_USED(OCSP_resp_count); +LCRYPTO_USED(OCSP_resp_get0); +LCRYPTO_USED(OCSP_resp_get0_produced_at); +LCRYPTO_USED(OCSP_resp_get0_certs); +LCRYPTO_USED(OCSP_resp_get0_id); +LCRYPTO_USED(OCSP_resp_find); +LCRYPTO_USED(OCSP_single_get0_status); +LCRYPTO_USED(OCSP_resp_find_status); +LCRYPTO_USED(OCSP_check_validity); +LCRYPTO_USED(OCSP_request_verify); +LCRYPTO_USED(OCSP_parse_url); +LCRYPTO_USED(OCSP_id_issuer_cmp); +LCRYPTO_USED(OCSP_id_cmp); +LCRYPTO_USED(OCSP_request_onereq_count); +LCRYPTO_USED(OCSP_request_onereq_get0); +LCRYPTO_USED(OCSP_onereq_get0_id); +LCRYPTO_USED(OCSP_id_get0_info); +LCRYPTO_USED(OCSP_request_is_signed); +LCRYPTO_USED(OCSP_response_create); +LCRYPTO_USED(OCSP_basic_add1_status); +LCRYPTO_USED(OCSP_basic_add1_cert); +LCRYPTO_USED(OCSP_basic_sign); +LCRYPTO_USED(OCSP_crlID_new); +LCRYPTO_USED(OCSP_accept_responses_new); +LCRYPTO_USED(OCSP_archive_cutoff_new); +LCRYPTO_USED(OCSP_url_svcloc_new); +LCRYPTO_USED(OCSP_REQUEST_get_ext_count); +LCRYPTO_USED(OCSP_REQUEST_get_ext_by_NID); +LCRYPTO_USED(OCSP_REQUEST_get_ext_by_OBJ); +LCRYPTO_USED(OCSP_REQUEST_get_ext_by_critical); +LCRYPTO_USED(OCSP_REQUEST_get_ext); +LCRYPTO_USED(OCSP_REQUEST_delete_ext); +LCRYPTO_USED(OCSP_REQUEST_get1_ext_d2i); +LCRYPTO_USED(OCSP_REQUEST_add1_ext_i2d); +LCRYPTO_USED(OCSP_REQUEST_add_ext); +LCRYPTO_USED(OCSP_ONEREQ_get_ext_count); +LCRYPTO_USED(OCSP_ONEREQ_get_ext_by_NID); +LCRYPTO_USED(OCSP_ONEREQ_get_ext_by_OBJ); +LCRYPTO_USED(OCSP_ONEREQ_get_ext_by_critical); +LCRYPTO_USED(OCSP_ONEREQ_get_ext); +LCRYPTO_USED(OCSP_ONEREQ_delete_ext); +LCRYPTO_USED(OCSP_ONEREQ_get1_ext_d2i); +LCRYPTO_USED(OCSP_ONEREQ_add1_ext_i2d); +LCRYPTO_USED(OCSP_ONEREQ_add_ext); +LCRYPTO_USED(OCSP_BASICRESP_get_ext_count); +LCRYPTO_USED(OCSP_BASICRESP_get_ext_by_NID); +LCRYPTO_USED(OCSP_BASICRESP_get_ext_by_OBJ); +LCRYPTO_USED(OCSP_BASICRESP_get_ext_by_critical); +LCRYPTO_USED(OCSP_BASICRESP_get_ext); +LCRYPTO_USED(OCSP_BASICRESP_delete_ext); +LCRYPTO_USED(OCSP_BASICRESP_get1_ext_d2i); +LCRYPTO_USED(OCSP_BASICRESP_add1_ext_i2d); +LCRYPTO_USED(OCSP_BASICRESP_add_ext); +LCRYPTO_USED(OCSP_SINGLERESP_get_ext_count); +LCRYPTO_USED(OCSP_SINGLERESP_get_ext_by_NID); +LCRYPTO_USED(OCSP_SINGLERESP_get_ext_by_OBJ); +LCRYPTO_USED(OCSP_SINGLERESP_get_ext_by_critical); +LCRYPTO_USED(OCSP_SINGLERESP_get_ext); +LCRYPTO_USED(OCSP_SINGLERESP_delete_ext); +LCRYPTO_USED(OCSP_SINGLERESP_get1_ext_d2i); +LCRYPTO_USED(OCSP_SINGLERESP_add1_ext_i2d); +LCRYPTO_USED(OCSP_SINGLERESP_add_ext); +LCRYPTO_USED(OCSP_SINGLERESP_get0_id); +LCRYPTO_USED(OCSP_SINGLERESP_new); +LCRYPTO_USED(OCSP_SINGLERESP_free); +LCRYPTO_USED(d2i_OCSP_SINGLERESP); +LCRYPTO_USED(i2d_OCSP_SINGLERESP); +LCRYPTO_USED(OCSP_CERTSTATUS_new); +LCRYPTO_USED(OCSP_CERTSTATUS_free); +LCRYPTO_USED(d2i_OCSP_CERTSTATUS); +LCRYPTO_USED(i2d_OCSP_CERTSTATUS); +LCRYPTO_USED(OCSP_REVOKEDINFO_new); +LCRYPTO_USED(OCSP_REVOKEDINFO_free); +LCRYPTO_USED(d2i_OCSP_REVOKEDINFO); +LCRYPTO_USED(i2d_OCSP_REVOKEDINFO); +LCRYPTO_USED(OCSP_BASICRESP_new); +LCRYPTO_USED(OCSP_BASICRESP_free); +LCRYPTO_USED(d2i_OCSP_BASICRESP); +LCRYPTO_USED(i2d_OCSP_BASICRESP); +LCRYPTO_USED(OCSP_RESPDATA_new); +LCRYPTO_USED(OCSP_RESPDATA_free); +LCRYPTO_USED(d2i_OCSP_RESPDATA); +LCRYPTO_USED(i2d_OCSP_RESPDATA); +LCRYPTO_USED(OCSP_RESPID_new); +LCRYPTO_USED(OCSP_RESPID_free); +LCRYPTO_USED(d2i_OCSP_RESPID); +LCRYPTO_USED(i2d_OCSP_RESPID); +LCRYPTO_USED(OCSP_RESPONSE_new); +LCRYPTO_USED(OCSP_RESPONSE_free); +LCRYPTO_USED(d2i_OCSP_RESPONSE); +LCRYPTO_USED(i2d_OCSP_RESPONSE); +LCRYPTO_USED(d2i_OCSP_RESPONSE_bio); +LCRYPTO_USED(i2d_OCSP_RESPONSE_bio); +LCRYPTO_USED(OCSP_RESPBYTES_new); +LCRYPTO_USED(OCSP_RESPBYTES_free); +LCRYPTO_USED(d2i_OCSP_RESPBYTES); +LCRYPTO_USED(i2d_OCSP_RESPBYTES); +LCRYPTO_USED(OCSP_ONEREQ_new); +LCRYPTO_USED(OCSP_ONEREQ_free); +LCRYPTO_USED(d2i_OCSP_ONEREQ); +LCRYPTO_USED(i2d_OCSP_ONEREQ); +LCRYPTO_USED(OCSP_CERTID_new); +LCRYPTO_USED(OCSP_CERTID_free); +LCRYPTO_USED(d2i_OCSP_CERTID); +LCRYPTO_USED(i2d_OCSP_CERTID); +LCRYPTO_USED(OCSP_REQUEST_new); +LCRYPTO_USED(OCSP_REQUEST_free); +LCRYPTO_USED(d2i_OCSP_REQUEST); +LCRYPTO_USED(i2d_OCSP_REQUEST); +LCRYPTO_USED(d2i_OCSP_REQUEST_bio); +LCRYPTO_USED(i2d_OCSP_REQUEST_bio); +LCRYPTO_USED(OCSP_SIGNATURE_new); +LCRYPTO_USED(OCSP_SIGNATURE_free); +LCRYPTO_USED(d2i_OCSP_SIGNATURE); +LCRYPTO_USED(i2d_OCSP_SIGNATURE); +LCRYPTO_USED(OCSP_REQINFO_new); +LCRYPTO_USED(OCSP_REQINFO_free); +LCRYPTO_USED(d2i_OCSP_REQINFO); +LCRYPTO_USED(i2d_OCSP_REQINFO); +LCRYPTO_USED(OCSP_CRLID_new); +LCRYPTO_USED(OCSP_CRLID_free); +LCRYPTO_USED(d2i_OCSP_CRLID); +LCRYPTO_USED(i2d_OCSP_CRLID); +LCRYPTO_USED(OCSP_SERVICELOC_new); +LCRYPTO_USED(OCSP_SERVICELOC_free); +LCRYPTO_USED(d2i_OCSP_SERVICELOC); +LCRYPTO_USED(i2d_OCSP_SERVICELOC); +LCRYPTO_USED(OCSP_response_status_str); +LCRYPTO_USED(OCSP_cert_status_str); +LCRYPTO_USED(OCSP_crl_reason_str); +LCRYPTO_USED(OCSP_REQUEST_print); +LCRYPTO_USED(OCSP_RESPONSE_print); +LCRYPTO_USED(OCSP_basic_verify); +LCRYPTO_USED(ERR_load_OCSP_strings); + +#endif /* _LIBCRYPTO_OCSP_H */ diff --git a/lib/libcrypto/idea/i_cbc.c b/lib/libcrypto/idea/i_cbc.c index a9de41d647d..d75134063cb 100644 --- a/lib/libcrypto/idea/i_cbc.c +++ b/lib/libcrypto/idea/i_cbc.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i_cbc.c,v 1.5 2023/07/07 12:51:58 beck Exp $ */ +/* $OpenBSD: i_cbc.c,v 1.6 2023/07/08 10:44:00 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -136,6 +136,7 @@ idea_cbc_encrypt(const unsigned char *in, unsigned char *out, long length, tin0 = tin1 = tout0 = tout1 = xor0 = xor1 = 0; tin[0] = tin[1] = 0; } +LCRYPTO_ALIAS(idea_cbc_encrypt); void idea_encrypt(unsigned long *d, IDEA_KEY_SCHEDULE *key) @@ -172,3 +173,4 @@ idea_encrypt(unsigned long *d, IDEA_KEY_SCHEDULE *key) d[0] = (t0 & 0xffff)|((x1 & 0xffff) << 16); d[1] = (x4 & 0xffff)|((t1 & 0xffff) << 16); } +LCRYPTO_ALIAS(idea_encrypt); diff --git a/lib/libcrypto/idea/i_cfb64.c b/lib/libcrypto/idea/i_cfb64.c index f284684502e..a1a543f6196 100644 --- a/lib/libcrypto/idea/i_cfb64.c +++ b/lib/libcrypto/idea/i_cfb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i_cfb64.c,v 1.5 2023/07/07 12:51:58 beck Exp $ */ +/* $OpenBSD: i_cfb64.c,v 1.6 2023/07/08 10:44:00 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -121,3 +121,4 @@ idea_cfb64_encrypt(const unsigned char *in, unsigned char *out, v0 = v1 = ti[0] = ti[1] = t = c = cc = 0; *num = n; } +LCRYPTO_ALIAS(idea_cfb64_encrypt); diff --git a/lib/libcrypto/idea/i_ecb.c b/lib/libcrypto/idea/i_ecb.c index ce67edba664..19521a75363 100644 --- a/lib/libcrypto/idea/i_ecb.c +++ b/lib/libcrypto/idea/i_ecb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i_ecb.c,v 1.5 2023/07/07 12:51:58 beck Exp $ */ +/* $OpenBSD: i_ecb.c,v 1.6 2023/07/08 10:44:00 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -68,6 +68,7 @@ idea_options(void) else return ("idea(short)"); } +LCRYPTO_ALIAS(idea_options); void idea_ecb_encrypt(const unsigned char *in, unsigned char *out, @@ -86,3 +87,4 @@ idea_ecb_encrypt(const unsigned char *in, unsigned char *out, l2n(l1, out); l0 = l1 = d[0] = d[1] = 0; } +LCRYPTO_ALIAS(idea_ecb_encrypt); diff --git a/lib/libcrypto/idea/i_ofb64.c b/lib/libcrypto/idea/i_ofb64.c index 27d85e5a37b..5af394ef703 100644 --- a/lib/libcrypto/idea/i_ofb64.c +++ b/lib/libcrypto/idea/i_ofb64.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i_ofb64.c,v 1.5 2023/07/07 12:51:58 beck Exp $ */ +/* $OpenBSD: i_ofb64.c,v 1.6 2023/07/08 10:44:00 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -108,3 +108,4 @@ idea_ofb64_encrypt(const unsigned char *in, unsigned char *out, t = v0 = v1 = ti[0] = ti[1] = 0; *num = n; } +LCRYPTO_ALIAS(idea_ofb64_encrypt); diff --git a/lib/libcrypto/idea/i_skey.c b/lib/libcrypto/idea/i_skey.c index 481c50ba55f..ad349bba578 100644 --- a/lib/libcrypto/idea/i_skey.c +++ b/lib/libcrypto/idea/i_skey.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i_skey.c,v 1.6 2023/07/07 12:51:58 beck Exp $ */ +/* $OpenBSD: i_skey.c,v 1.7 2023/07/08 10:44:00 beck Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -102,6 +102,7 @@ idea_set_encrypt_key(const unsigned char *key, IDEA_KEY_SCHEDULE *ks) kf += 8; } } +LCRYPTO_ALIAS(idea_set_encrypt_key); void idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk) @@ -133,6 +134,7 @@ idea_set_decrypt_key(IDEA_KEY_SCHEDULE *ek, IDEA_KEY_SCHEDULE *dk) tp[49] = tp[50]; tp[50] = t; } +LCRYPTO_ALIAS(idea_set_decrypt_key); /* taken directly from the 'paper' I'll have a look at it later */ static IDEA_INT diff --git a/lib/libcrypto/ocsp/ocsp_asn.c b/lib/libcrypto/ocsp/ocsp_asn.c index 3f00fca1055..4fbdd5fd7f2 100644 --- a/lib/libcrypto/ocsp/ocsp_asn.c +++ b/lib/libcrypto/ocsp/ocsp_asn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_asn.c,v 1.10 2022/01/07 09:45:52 tb Exp $ */ +/* $OpenBSD: ocsp_asn.c,v 1.11 2023/07/08 10:44:00 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -102,24 +102,28 @@ d2i_OCSP_SIGNATURE(OCSP_SIGNATURE **a, const unsigned char **in, long len) return (OCSP_SIGNATURE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_SIGNATURE_it); } +LCRYPTO_ALIAS(d2i_OCSP_SIGNATURE); int i2d_OCSP_SIGNATURE(OCSP_SIGNATURE *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_SIGNATURE_it); } +LCRYPTO_ALIAS(i2d_OCSP_SIGNATURE); OCSP_SIGNATURE * OCSP_SIGNATURE_new(void) { return (OCSP_SIGNATURE *)ASN1_item_new(&OCSP_SIGNATURE_it); } +LCRYPTO_ALIAS(OCSP_SIGNATURE_new); void OCSP_SIGNATURE_free(OCSP_SIGNATURE *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_SIGNATURE_it); } +LCRYPTO_ALIAS(OCSP_SIGNATURE_free); static const ASN1_TEMPLATE OCSP_CERTID_seq_tt[] = { { @@ -169,24 +173,28 @@ d2i_OCSP_CERTID(OCSP_CERTID **a, const unsigned char **in, long len) return (OCSP_CERTID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_CERTID_it); } +LCRYPTO_ALIAS(d2i_OCSP_CERTID); int i2d_OCSP_CERTID(OCSP_CERTID *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_CERTID_it); } +LCRYPTO_ALIAS(i2d_OCSP_CERTID); OCSP_CERTID * OCSP_CERTID_new(void) { return (OCSP_CERTID *)ASN1_item_new(&OCSP_CERTID_it); } +LCRYPTO_ALIAS(OCSP_CERTID_new); void OCSP_CERTID_free(OCSP_CERTID *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_CERTID_it); } +LCRYPTO_ALIAS(OCSP_CERTID_free); static const ASN1_TEMPLATE OCSP_ONEREQ_seq_tt[] = { { @@ -222,24 +230,28 @@ d2i_OCSP_ONEREQ(OCSP_ONEREQ **a, const unsigned char **in, long len) return (OCSP_ONEREQ *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_ONEREQ_it); } +LCRYPTO_ALIAS(d2i_OCSP_ONEREQ); int i2d_OCSP_ONEREQ(OCSP_ONEREQ *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_ONEREQ_it); } +LCRYPTO_ALIAS(i2d_OCSP_ONEREQ); OCSP_ONEREQ * OCSP_ONEREQ_new(void) { return (OCSP_ONEREQ *)ASN1_item_new(&OCSP_ONEREQ_it); } +LCRYPTO_ALIAS(OCSP_ONEREQ_new); void OCSP_ONEREQ_free(OCSP_ONEREQ *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_ONEREQ_it); } +LCRYPTO_ALIAS(OCSP_ONEREQ_free); static const ASN1_TEMPLATE OCSP_REQINFO_seq_tt[] = { { @@ -289,24 +301,28 @@ d2i_OCSP_REQINFO(OCSP_REQINFO **a, const unsigned char **in, long len) return (OCSP_REQINFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_REQINFO_it); } +LCRYPTO_ALIAS(d2i_OCSP_REQINFO); int i2d_OCSP_REQINFO(OCSP_REQINFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_REQINFO_it); } +LCRYPTO_ALIAS(i2d_OCSP_REQINFO); OCSP_REQINFO * OCSP_REQINFO_new(void) { return (OCSP_REQINFO *)ASN1_item_new(&OCSP_REQINFO_it); } +LCRYPTO_ALIAS(OCSP_REQINFO_new); void OCSP_REQINFO_free(OCSP_REQINFO *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_REQINFO_it); } +LCRYPTO_ALIAS(OCSP_REQINFO_free); static const ASN1_TEMPLATE OCSP_REQUEST_seq_tt[] = { { @@ -341,36 +357,42 @@ d2i_OCSP_REQUEST(OCSP_REQUEST **a, const unsigned char **in, long len) return (OCSP_REQUEST *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_REQUEST_it); } +LCRYPTO_ALIAS(d2i_OCSP_REQUEST); int i2d_OCSP_REQUEST(OCSP_REQUEST *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_REQUEST_it); } +LCRYPTO_ALIAS(i2d_OCSP_REQUEST); OCSP_REQUEST * d2i_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST **a) { return ASN1_item_d2i_bio(&OCSP_REQUEST_it, bp, a); } +LCRYPTO_ALIAS(d2i_OCSP_REQUEST_bio); int i2d_OCSP_REQUEST_bio(BIO *bp, OCSP_REQUEST *a) { return ASN1_item_i2d_bio(&OCSP_REQUEST_it, bp, a); } +LCRYPTO_ALIAS(i2d_OCSP_REQUEST_bio); OCSP_REQUEST * OCSP_REQUEST_new(void) { return (OCSP_REQUEST *)ASN1_item_new(&OCSP_REQUEST_it); } +LCRYPTO_ALIAS(OCSP_REQUEST_new); void OCSP_REQUEST_free(OCSP_REQUEST *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_REQUEST_it); } +LCRYPTO_ALIAS(OCSP_REQUEST_free); /* OCSP_RESPONSE templates */ @@ -408,24 +430,28 @@ d2i_OCSP_RESPBYTES(OCSP_RESPBYTES **a, const unsigned char **in, long len) return (OCSP_RESPBYTES *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_RESPBYTES_it); } +LCRYPTO_ALIAS(d2i_OCSP_RESPBYTES); int i2d_OCSP_RESPBYTES(OCSP_RESPBYTES *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_RESPBYTES_it); } +LCRYPTO_ALIAS(i2d_OCSP_RESPBYTES); OCSP_RESPBYTES * OCSP_RESPBYTES_new(void) { return (OCSP_RESPBYTES *)ASN1_item_new(&OCSP_RESPBYTES_it); } +LCRYPTO_ALIAS(OCSP_RESPBYTES_new); void OCSP_RESPBYTES_free(OCSP_RESPBYTES *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPBYTES_it); } +LCRYPTO_ALIAS(OCSP_RESPBYTES_free); static const ASN1_TEMPLATE OCSP_RESPONSE_seq_tt[] = { { @@ -461,36 +487,42 @@ d2i_OCSP_RESPONSE(OCSP_RESPONSE **a, const unsigned char **in, long len) return (OCSP_RESPONSE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_RESPONSE_it); } +LCRYPTO_ALIAS(d2i_OCSP_RESPONSE); int i2d_OCSP_RESPONSE(OCSP_RESPONSE *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_RESPONSE_it); } +LCRYPTO_ALIAS(i2d_OCSP_RESPONSE); OCSP_RESPONSE * d2i_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE **a) { return ASN1_item_d2i_bio(&OCSP_RESPONSE_it, bp, a); } +LCRYPTO_ALIAS(d2i_OCSP_RESPONSE_bio); int i2d_OCSP_RESPONSE_bio(BIO *bp, OCSP_RESPONSE *a) { return ASN1_item_i2d_bio(&OCSP_RESPONSE_it, bp, a); } +LCRYPTO_ALIAS(i2d_OCSP_RESPONSE_bio); OCSP_RESPONSE * OCSP_RESPONSE_new(void) { return (OCSP_RESPONSE *)ASN1_item_new(&OCSP_RESPONSE_it); } +LCRYPTO_ALIAS(OCSP_RESPONSE_new); void OCSP_RESPONSE_free(OCSP_RESPONSE *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPONSE_it); } +LCRYPTO_ALIAS(OCSP_RESPONSE_free); static const ASN1_TEMPLATE OCSP_RESPID_ch_tt[] = { { @@ -526,24 +558,28 @@ d2i_OCSP_RESPID(OCSP_RESPID **a, const unsigned char **in, long len) return (OCSP_RESPID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_RESPID_it); } +LCRYPTO_ALIAS(d2i_OCSP_RESPID); int i2d_OCSP_RESPID(OCSP_RESPID *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_RESPID_it); } +LCRYPTO_ALIAS(i2d_OCSP_RESPID); OCSP_RESPID * OCSP_RESPID_new(void) { return (OCSP_RESPID *)ASN1_item_new(&OCSP_RESPID_it); } +LCRYPTO_ALIAS(OCSP_RESPID_new); void OCSP_RESPID_free(OCSP_RESPID *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPID_it); } +LCRYPTO_ALIAS(OCSP_RESPID_free); static const ASN1_TEMPLATE OCSP_REVOKEDINFO_seq_tt[] = { { @@ -579,24 +615,28 @@ d2i_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO **a, const unsigned char **in, long len) return (OCSP_REVOKEDINFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_REVOKEDINFO_it); } +LCRYPTO_ALIAS(d2i_OCSP_REVOKEDINFO); int i2d_OCSP_REVOKEDINFO(OCSP_REVOKEDINFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_REVOKEDINFO_it); } +LCRYPTO_ALIAS(i2d_OCSP_REVOKEDINFO); OCSP_REVOKEDINFO * OCSP_REVOKEDINFO_new(void) { return (OCSP_REVOKEDINFO *)ASN1_item_new(&OCSP_REVOKEDINFO_it); } +LCRYPTO_ALIAS(OCSP_REVOKEDINFO_new); void OCSP_REVOKEDINFO_free(OCSP_REVOKEDINFO *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_REVOKEDINFO_it); } +LCRYPTO_ALIAS(OCSP_REVOKEDINFO_free); static const ASN1_TEMPLATE OCSP_CERTSTATUS_ch_tt[] = { { @@ -639,24 +679,28 @@ d2i_OCSP_CERTSTATUS(OCSP_CERTSTATUS **a, const unsigned char **in, long len) return (OCSP_CERTSTATUS *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_CERTSTATUS_it); } +LCRYPTO_ALIAS(d2i_OCSP_CERTSTATUS); int i2d_OCSP_CERTSTATUS(OCSP_CERTSTATUS *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_CERTSTATUS_it); } +LCRYPTO_ALIAS(i2d_OCSP_CERTSTATUS); OCSP_CERTSTATUS * OCSP_CERTSTATUS_new(void) { return (OCSP_CERTSTATUS *)ASN1_item_new(&OCSP_CERTSTATUS_it); } +LCRYPTO_ALIAS(OCSP_CERTSTATUS_new); void OCSP_CERTSTATUS_free(OCSP_CERTSTATUS *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_CERTSTATUS_it); } +LCRYPTO_ALIAS(OCSP_CERTSTATUS_free); static const ASN1_TEMPLATE OCSP_SINGLERESP_seq_tt[] = { { @@ -713,24 +757,28 @@ d2i_OCSP_SINGLERESP(OCSP_SINGLERESP **a, const unsigned char **in, long len) return (OCSP_SINGLERESP *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_SINGLERESP_it); } +LCRYPTO_ALIAS(d2i_OCSP_SINGLERESP); int i2d_OCSP_SINGLERESP(OCSP_SINGLERESP *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_SINGLERESP_it); } +LCRYPTO_ALIAS(i2d_OCSP_SINGLERESP); OCSP_SINGLERESP * OCSP_SINGLERESP_new(void) { return (OCSP_SINGLERESP *)ASN1_item_new(&OCSP_SINGLERESP_it); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_new); void OCSP_SINGLERESP_free(OCSP_SINGLERESP *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_SINGLERESP_it); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_free); static const ASN1_TEMPLATE OCSP_RESPDATA_seq_tt[] = { { @@ -787,24 +835,28 @@ d2i_OCSP_RESPDATA(OCSP_RESPDATA **a, const unsigned char **in, long len) return (OCSP_RESPDATA *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_RESPDATA_it); } +LCRYPTO_ALIAS(d2i_OCSP_RESPDATA); int i2d_OCSP_RESPDATA(OCSP_RESPDATA *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_RESPDATA_it); } +LCRYPTO_ALIAS(i2d_OCSP_RESPDATA); OCSP_RESPDATA * OCSP_RESPDATA_new(void) { return (OCSP_RESPDATA *)ASN1_item_new(&OCSP_RESPDATA_it); } +LCRYPTO_ALIAS(OCSP_RESPDATA_new); void OCSP_RESPDATA_free(OCSP_RESPDATA *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_RESPDATA_it); } +LCRYPTO_ALIAS(OCSP_RESPDATA_free); static const ASN1_TEMPLATE OCSP_BASICRESP_seq_tt[] = { { @@ -854,24 +906,28 @@ d2i_OCSP_BASICRESP(OCSP_BASICRESP **a, const unsigned char **in, long len) return (OCSP_BASICRESP *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_BASICRESP_it); } +LCRYPTO_ALIAS(d2i_OCSP_BASICRESP); int i2d_OCSP_BASICRESP(OCSP_BASICRESP *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_BASICRESP_it); } +LCRYPTO_ALIAS(i2d_OCSP_BASICRESP); OCSP_BASICRESP * OCSP_BASICRESP_new(void) { return (OCSP_BASICRESP *)ASN1_item_new(&OCSP_BASICRESP_it); } +LCRYPTO_ALIAS(OCSP_BASICRESP_new); void OCSP_BASICRESP_free(OCSP_BASICRESP *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_BASICRESP_it); } +LCRYPTO_ALIAS(OCSP_BASICRESP_free); static const ASN1_TEMPLATE OCSP_CRLID_seq_tt[] = { { @@ -914,24 +970,28 @@ d2i_OCSP_CRLID(OCSP_CRLID **a, const unsigned char **in, long len) return (OCSP_CRLID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_CRLID_it); } +LCRYPTO_ALIAS(d2i_OCSP_CRLID); int i2d_OCSP_CRLID(OCSP_CRLID *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_CRLID_it); } +LCRYPTO_ALIAS(i2d_OCSP_CRLID); OCSP_CRLID * OCSP_CRLID_new(void) { return (OCSP_CRLID *)ASN1_item_new(&OCSP_CRLID_it); } +LCRYPTO_ALIAS(OCSP_CRLID_new); void OCSP_CRLID_free(OCSP_CRLID *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_CRLID_it); } +LCRYPTO_ALIAS(OCSP_CRLID_free); static const ASN1_TEMPLATE OCSP_SERVICELOC_seq_tt[] = { { @@ -967,21 +1027,25 @@ d2i_OCSP_SERVICELOC(OCSP_SERVICELOC **a, const unsigned char **in, long len) return (OCSP_SERVICELOC *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &OCSP_SERVICELOC_it); } +LCRYPTO_ALIAS(d2i_OCSP_SERVICELOC); int i2d_OCSP_SERVICELOC(OCSP_SERVICELOC *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &OCSP_SERVICELOC_it); } +LCRYPTO_ALIAS(i2d_OCSP_SERVICELOC); OCSP_SERVICELOC * OCSP_SERVICELOC_new(void) { return (OCSP_SERVICELOC *)ASN1_item_new(&OCSP_SERVICELOC_it); } +LCRYPTO_ALIAS(OCSP_SERVICELOC_new); void OCSP_SERVICELOC_free(OCSP_SERVICELOC *a) { ASN1_item_free((ASN1_VALUE *)a, &OCSP_SERVICELOC_it); } +LCRYPTO_ALIAS(OCSP_SERVICELOC_free); diff --git a/lib/libcrypto/ocsp/ocsp_cl.c b/lib/libcrypto/ocsp/ocsp_cl.c index 7747020221b..89113f78b87 100644 --- a/lib/libcrypto/ocsp/ocsp_cl.c +++ b/lib/libcrypto/ocsp/ocsp_cl.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_cl.c,v 1.22 2022/12/26 07:18:52 jmc Exp $ */ +/* $OpenBSD: ocsp_cl.c,v 1.23 2023/07/08 10:44:00 beck Exp $ */ /* Written by Tom Titchener for the OpenSSL * project. */ @@ -99,6 +99,7 @@ OCSP_request_add0_id(OCSP_REQUEST *req, OCSP_CERTID *cid) OCSP_ONEREQ_free(one); return NULL; } +LCRYPTO_ALIAS(OCSP_request_add0_id); /* Set requestorName from an X509_NAME structure */ int @@ -119,6 +120,7 @@ OCSP_request_set1_name(OCSP_REQUEST *req, X509_NAME *nm) req->tbsRequest->requestorName = gen; return 1; } +LCRYPTO_ALIAS(OCSP_request_set1_name); /* Add a certificate to an OCSP request */ int @@ -141,6 +143,7 @@ OCSP_request_add1_cert(OCSP_REQUEST *req, X509 *cert) X509_up_ref(cert); return 1; } +LCRYPTO_ALIAS(OCSP_request_add1_cert); /* Sign an OCSP request set the requestorName to the subject * name of an optional signers certificate and include one @@ -186,6 +189,7 @@ err: req->optionalSignature = NULL; return 0; } +LCRYPTO_ALIAS(OCSP_request_sign); /* Get response status */ int @@ -193,6 +197,7 @@ OCSP_response_status(OCSP_RESPONSE *resp) { return ASN1_ENUMERATED_get(resp->responseStatus); } +LCRYPTO_ALIAS(OCSP_response_status); /* Extract basic response from OCSP_RESPONSE or NULL if * no basic response present. @@ -214,6 +219,7 @@ OCSP_response_get1_basic(OCSP_RESPONSE *resp) return ASN1_item_unpack(rb->response, &OCSP_BASICRESP_it); } +LCRYPTO_ALIAS(OCSP_response_get1_basic); /* Return number of OCSP_SINGLERESP responses present in * a basic response. @@ -225,6 +231,7 @@ OCSP_resp_count(OCSP_BASICRESP *bs) return -1; return sk_OCSP_SINGLERESP_num(bs->tbsResponseData->responses); } +LCRYPTO_ALIAS(OCSP_resp_count); /* Extract an OCSP_SINGLERESP response with a given index */ OCSP_SINGLERESP * @@ -234,18 +241,21 @@ OCSP_resp_get0(OCSP_BASICRESP *bs, int idx) return NULL; return sk_OCSP_SINGLERESP_value(bs->tbsResponseData->responses, idx); } +LCRYPTO_ALIAS(OCSP_resp_get0); const ASN1_GENERALIZEDTIME * OCSP_resp_get0_produced_at(const OCSP_BASICRESP *bs) { return bs->tbsResponseData->producedAt; } +LCRYPTO_ALIAS(OCSP_resp_get0_produced_at); const STACK_OF(X509) * OCSP_resp_get0_certs(const OCSP_BASICRESP *bs) { return bs->certs; } +LCRYPTO_ALIAS(OCSP_resp_get0_certs); int OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, @@ -265,24 +275,28 @@ OCSP_resp_get0_id(const OCSP_BASICRESP *bs, const ASN1_OCTET_STRING **pid, return 1; } +LCRYPTO_ALIAS(OCSP_resp_get0_id); const ASN1_OCTET_STRING * OCSP_resp_get0_signature(const OCSP_BASICRESP *bs) { return bs->signature; } +LCRYPTO_ALIAS(OCSP_resp_get0_signature); const X509_ALGOR * OCSP_resp_get0_tbs_sigalg(const OCSP_BASICRESP *bs) { return bs->signatureAlgorithm; } +LCRYPTO_ALIAS(OCSP_resp_get0_tbs_sigalg); const OCSP_RESPDATA * OCSP_resp_get0_respdata(const OCSP_BASICRESP *bs) { return bs->tbsResponseData; } +LCRYPTO_ALIAS(OCSP_resp_get0_respdata); /* Look single response matching a given certificate ID */ int @@ -306,6 +320,7 @@ OCSP_resp_find(OCSP_BASICRESP *bs, OCSP_CERTID *id, int last) } return -1; } +LCRYPTO_ALIAS(OCSP_resp_find); /* Extract status information from an OCSP_SINGLERESP structure. * Note: the revtime and reason values are only set if the @@ -343,6 +358,7 @@ OCSP_single_get0_status(OCSP_SINGLERESP *single, int *reason, *nextupd = single->nextUpdate; return ret; } +LCRYPTO_ALIAS(OCSP_single_get0_status); /* This function combines the previous ones: look up a certificate ID and * if found extract status information. Return 0 is successful. @@ -365,6 +381,7 @@ OCSP_resp_find_status(OCSP_BASICRESP *bs, OCSP_CERTID *id, int *status, *status = i; return 1; } +LCRYPTO_ALIAS(OCSP_resp_find_status); /* Check validity of thisUpdate and nextUpdate fields. It is possible that the request will * take a few seconds to process and/or the time wont be totally accurate. Therefore to avoid @@ -442,9 +459,11 @@ OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, return 1; } +LCRYPTO_ALIAS(OCSP_check_validity); const OCSP_CERTID * OCSP_SINGLERESP_get0_id(const OCSP_SINGLERESP *single) { return single->certId; } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get0_id); diff --git a/lib/libcrypto/ocsp/ocsp_err.c b/lib/libcrypto/ocsp/ocsp_err.c index 7cf5b7e8a15..865091f5429 100644 --- a/lib/libcrypto/ocsp/ocsp_err.c +++ b/lib/libcrypto/ocsp/ocsp_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_err.c,v 1.9 2022/07/12 14:42:49 kn Exp $ */ +/* $OpenBSD: ocsp_err.c,v 1.10 2023/07/08 10:44:00 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2006 The OpenSSL Project. All rights reserved. * @@ -116,3 +116,4 @@ ERR_load_OCSP_strings(void) } #endif } +LCRYPTO_ALIAS(ERR_load_OCSP_strings); diff --git a/lib/libcrypto/ocsp/ocsp_ext.c b/lib/libcrypto/ocsp/ocsp_ext.c index 9605d859b4d..9f8cb74b6a4 100644 --- a/lib/libcrypto/ocsp/ocsp_ext.c +++ b/lib/libcrypto/ocsp/ocsp_ext.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_ext.c,v 1.22 2022/12/26 07:18:52 jmc Exp $ */ +/* $OpenBSD: ocsp_ext.c,v 1.23 2023/07/08 10:44:00 beck Exp $ */ /* Written by Tom Titchener for the OpenSSL * project. */ @@ -82,6 +82,7 @@ OCSP_REQUEST_get_ext_count(OCSP_REQUEST *x) { return X509v3_get_ext_count(x->tbsRequest->requestExtensions); } +LCRYPTO_ALIAS(OCSP_REQUEST_get_ext_count); int OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos) @@ -89,6 +90,7 @@ OCSP_REQUEST_get_ext_by_NID(OCSP_REQUEST *x, int nid, int lastpos) return X509v3_get_ext_by_NID(x->tbsRequest->requestExtensions, nid, lastpos); } +LCRYPTO_ALIAS(OCSP_REQUEST_get_ext_by_NID); int OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj, @@ -97,6 +99,7 @@ OCSP_REQUEST_get_ext_by_OBJ(OCSP_REQUEST *x, const ASN1_OBJECT *obj, return X509v3_get_ext_by_OBJ(x->tbsRequest->requestExtensions, obj, lastpos); } +LCRYPTO_ALIAS(OCSP_REQUEST_get_ext_by_OBJ); int OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos) @@ -104,24 +107,28 @@ OCSP_REQUEST_get_ext_by_critical(OCSP_REQUEST *x, int crit, int lastpos) return X509v3_get_ext_by_critical(x->tbsRequest->requestExtensions, crit, lastpos); } +LCRYPTO_ALIAS(OCSP_REQUEST_get_ext_by_critical); X509_EXTENSION * OCSP_REQUEST_get_ext(OCSP_REQUEST *x, int loc) { return X509v3_get_ext(x->tbsRequest->requestExtensions, loc); } +LCRYPTO_ALIAS(OCSP_REQUEST_get_ext); X509_EXTENSION * OCSP_REQUEST_delete_ext(OCSP_REQUEST *x, int loc) { return X509v3_delete_ext(x->tbsRequest->requestExtensions, loc); } +LCRYPTO_ALIAS(OCSP_REQUEST_delete_ext); void * OCSP_REQUEST_get1_ext_d2i(OCSP_REQUEST *x, int nid, int *crit, int *idx) { return X509V3_get_d2i(x->tbsRequest->requestExtensions, nid, crit, idx); } +LCRYPTO_ALIAS(OCSP_REQUEST_get1_ext_d2i); int OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, @@ -130,6 +137,7 @@ OCSP_REQUEST_add1_ext_i2d(OCSP_REQUEST *x, int nid, void *value, int crit, return X509V3_add1_i2d(&x->tbsRequest->requestExtensions, nid, value, crit, flags); } +LCRYPTO_ALIAS(OCSP_REQUEST_add1_ext_i2d); int OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc) @@ -137,6 +145,7 @@ OCSP_REQUEST_add_ext(OCSP_REQUEST *x, X509_EXTENSION *ex, int loc) return X509v3_add_ext(&(x->tbsRequest->requestExtensions), ex, loc) != NULL; } +LCRYPTO_ALIAS(OCSP_REQUEST_add_ext); /* Single extensions */ @@ -145,18 +154,21 @@ OCSP_ONEREQ_get_ext_count(OCSP_ONEREQ *x) { return X509v3_get_ext_count(x->singleRequestExtensions); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get_ext_count); int OCSP_ONEREQ_get_ext_by_NID(OCSP_ONEREQ *x, int nid, int lastpos) { return X509v3_get_ext_by_NID(x->singleRequestExtensions, nid, lastpos); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get_ext_by_NID); int OCSP_ONEREQ_get_ext_by_OBJ(OCSP_ONEREQ *x, const ASN1_OBJECT *obj, int lastpos) { return X509v3_get_ext_by_OBJ(x->singleRequestExtensions, obj, lastpos); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get_ext_by_OBJ); int OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos) @@ -164,24 +176,28 @@ OCSP_ONEREQ_get_ext_by_critical(OCSP_ONEREQ *x, int crit, int lastpos) return X509v3_get_ext_by_critical(x->singleRequestExtensions, crit, lastpos); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get_ext_by_critical); X509_EXTENSION * OCSP_ONEREQ_get_ext(OCSP_ONEREQ *x, int loc) { return X509v3_get_ext(x->singleRequestExtensions, loc); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get_ext); X509_EXTENSION * OCSP_ONEREQ_delete_ext(OCSP_ONEREQ *x, int loc) { return X509v3_delete_ext(x->singleRequestExtensions, loc); } +LCRYPTO_ALIAS(OCSP_ONEREQ_delete_ext); void * OCSP_ONEREQ_get1_ext_d2i(OCSP_ONEREQ *x, int nid, int *crit, int *idx) { return X509V3_get_d2i(x->singleRequestExtensions, nid, crit, idx); } +LCRYPTO_ALIAS(OCSP_ONEREQ_get1_ext_d2i); int OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, @@ -190,12 +206,14 @@ OCSP_ONEREQ_add1_ext_i2d(OCSP_ONEREQ *x, int nid, void *value, int crit, return X509V3_add1_i2d(&x->singleRequestExtensions, nid, value, crit, flags); } +LCRYPTO_ALIAS(OCSP_ONEREQ_add1_ext_i2d); int OCSP_ONEREQ_add_ext(OCSP_ONEREQ *x, X509_EXTENSION *ex, int loc) { return X509v3_add_ext(&(x->singleRequestExtensions), ex, loc) != NULL; } +LCRYPTO_ALIAS(OCSP_ONEREQ_add_ext); /* OCSP Basic response */ @@ -204,6 +222,7 @@ OCSP_BASICRESP_get_ext_count(OCSP_BASICRESP *x) { return X509v3_get_ext_count(x->tbsResponseData->responseExtensions); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get_ext_count); int OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos) @@ -211,6 +230,7 @@ OCSP_BASICRESP_get_ext_by_NID(OCSP_BASICRESP *x, int nid, int lastpos) return X509v3_get_ext_by_NID(x->tbsResponseData->responseExtensions, nid, lastpos); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get_ext_by_NID); int OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj, @@ -219,6 +239,7 @@ OCSP_BASICRESP_get_ext_by_OBJ(OCSP_BASICRESP *x, const ASN1_OBJECT *obj, return X509v3_get_ext_by_OBJ(x->tbsResponseData->responseExtensions, obj, lastpos); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get_ext_by_OBJ); int OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int lastpos) @@ -226,18 +247,21 @@ OCSP_BASICRESP_get_ext_by_critical(OCSP_BASICRESP *x, int crit, int lastpos) return X509v3_get_ext_by_critical( x->tbsResponseData->responseExtensions, crit, lastpos); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get_ext_by_critical); X509_EXTENSION * OCSP_BASICRESP_get_ext(OCSP_BASICRESP *x, int loc) { return X509v3_get_ext(x->tbsResponseData->responseExtensions, loc); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get_ext); X509_EXTENSION * OCSP_BASICRESP_delete_ext(OCSP_BASICRESP *x, int loc) { return X509v3_delete_ext(x->tbsResponseData->responseExtensions, loc); } +LCRYPTO_ALIAS(OCSP_BASICRESP_delete_ext); void * OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, int *idx) @@ -245,6 +269,7 @@ OCSP_BASICRESP_get1_ext_d2i(OCSP_BASICRESP *x, int nid, int *crit, int *idx) return X509V3_get_d2i(x->tbsResponseData->responseExtensions, nid, crit, idx); } +LCRYPTO_ALIAS(OCSP_BASICRESP_get1_ext_d2i); int OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, int crit, @@ -253,6 +278,7 @@ OCSP_BASICRESP_add1_ext_i2d(OCSP_BASICRESP *x, int nid, void *value, int crit, return X509V3_add1_i2d(&x->tbsResponseData->responseExtensions, nid, value, crit, flags); } +LCRYPTO_ALIAS(OCSP_BASICRESP_add1_ext_i2d); int OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc) @@ -260,6 +286,7 @@ OCSP_BASICRESP_add_ext(OCSP_BASICRESP *x, X509_EXTENSION *ex, int loc) return X509v3_add_ext(&(x->tbsResponseData->responseExtensions), ex, loc) != NULL; } +LCRYPTO_ALIAS(OCSP_BASICRESP_add_ext); /* OCSP single response extensions */ @@ -268,12 +295,14 @@ OCSP_SINGLERESP_get_ext_count(OCSP_SINGLERESP *x) { return X509v3_get_ext_count(x->singleExtensions); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get_ext_count); int OCSP_SINGLERESP_get_ext_by_NID(OCSP_SINGLERESP *x, int nid, int lastpos) { return X509v3_get_ext_by_NID(x->singleExtensions, nid, lastpos); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get_ext_by_NID); int OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj, @@ -281,30 +310,35 @@ OCSP_SINGLERESP_get_ext_by_OBJ(OCSP_SINGLERESP *x, const ASN1_OBJECT *obj, { return X509v3_get_ext_by_OBJ(x->singleExtensions, obj, lastpos); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get_ext_by_OBJ); int OCSP_SINGLERESP_get_ext_by_critical(OCSP_SINGLERESP *x, int crit, int lastpos) { return X509v3_get_ext_by_critical(x->singleExtensions, crit, lastpos); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get_ext_by_critical); X509_EXTENSION * OCSP_SINGLERESP_get_ext(OCSP_SINGLERESP *x, int loc) { return X509v3_get_ext(x->singleExtensions, loc); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get_ext); X509_EXTENSION * OCSP_SINGLERESP_delete_ext(OCSP_SINGLERESP *x, int loc) { return X509v3_delete_ext(x->singleExtensions, loc); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_delete_ext); void * OCSP_SINGLERESP_get1_ext_d2i(OCSP_SINGLERESP *x, int nid, int *crit, int *idx) { return X509V3_get_d2i(x->singleExtensions, nid, crit, idx); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_get1_ext_d2i); int OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, int crit, @@ -312,12 +346,14 @@ OCSP_SINGLERESP_add1_ext_i2d(OCSP_SINGLERESP *x, int nid, void *value, int crit, { return X509V3_add1_i2d(&x->singleExtensions, nid, value, crit, flags); } +LCRYPTO_ALIAS(OCSP_SINGLERESP_add1_ext_i2d); int OCSP_SINGLERESP_add_ext(OCSP_SINGLERESP *x, X509_EXTENSION *ex, int loc) { return X509v3_add_ext(&(x->singleExtensions), ex, loc) != NULL; } +LCRYPTO_ALIAS(OCSP_SINGLERESP_add_ext); /* Nonce handling functions */ @@ -367,6 +403,7 @@ OCSP_request_add1_nonce(OCSP_REQUEST *req, unsigned char *val, int len) { return ocsp_add1_nonce(&req->tbsRequest->requestExtensions, val, len); } +LCRYPTO_ALIAS(OCSP_request_add1_nonce); /* Same as above but for a response */ int @@ -375,6 +412,7 @@ OCSP_basic_add1_nonce(OCSP_BASICRESP *resp, unsigned char *val, int len) return ocsp_add1_nonce(&resp->tbsResponseData->responseExtensions, val, len); } +LCRYPTO_ALIAS(OCSP_basic_add1_nonce); /* Check nonce validity in a request and response. * Return value reflects result: @@ -420,6 +458,7 @@ OCSP_check_nonce(OCSP_REQUEST *req, OCSP_BASICRESP *bs) return 0; return 1; } +LCRYPTO_ALIAS(OCSP_check_nonce); /* Copy the nonce value (if any) from an OCSP request to * a response. @@ -438,6 +477,7 @@ OCSP_copy_nonce(OCSP_BASICRESP *resp, OCSP_REQUEST *req) req_ext = OCSP_REQUEST_get_ext(req, req_idx); return OCSP_BASICRESP_add_ext(resp, req_ext, -1); } +LCRYPTO_ALIAS(OCSP_copy_nonce); X509_EXTENSION * OCSP_crlID_new(const char *url, long *n, char *tim) @@ -472,6 +512,7 @@ err: OCSP_CRLID_free(cid); return x; } +LCRYPTO_ALIAS(OCSP_crlID_new); /* AcceptableResponses ::= SEQUENCE OF OBJECT IDENTIFIER */ X509_EXTENSION * @@ -497,6 +538,7 @@ OCSP_accept_responses_new(char **oids) sk_ASN1_OBJECT_pop_free(sk, ASN1_OBJECT_free); return x; } +LCRYPTO_ALIAS(OCSP_accept_responses_new); /* ArchiveCutoff ::= GeneralizedTime */ X509_EXTENSION * @@ -516,6 +558,7 @@ err: ASN1_GENERALIZEDTIME_free(gt); return x; } +LCRYPTO_ALIAS(OCSP_archive_cutoff_new); /* per ACCESS_DESCRIPTION parameter are oids, of which there are currently * two--NID_ad_ocsp, NID_id_ad_caIssuers--and GeneralName value. This @@ -566,3 +609,4 @@ err: OCSP_SERVICELOC_free(sloc); return x; } +LCRYPTO_ALIAS(OCSP_url_svcloc_new); diff --git a/lib/libcrypto/ocsp/ocsp_ht.c b/lib/libcrypto/ocsp/ocsp_ht.c index 255f8903977..bf735c72a21 100644 --- a/lib/libcrypto/ocsp/ocsp_ht.c +++ b/lib/libcrypto/ocsp/ocsp_ht.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_ht.c,v 1.25 2018/05/13 10:42:03 tb Exp $ */ +/* $OpenBSD: ocsp_ht.c,v 1.26 2023/07/08 10:44:00 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2006. */ @@ -115,6 +115,7 @@ OCSP_REQ_CTX_free(OCSP_REQ_CTX *rctx) free(rctx->iobuf); free(rctx); } +LCRYPTO_ALIAS(OCSP_REQ_CTX_free); int OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req) @@ -128,6 +129,7 @@ OCSP_REQ_CTX_set1_req(OCSP_REQ_CTX *rctx, OCSP_REQUEST *req) rctx->asn1_len = BIO_get_mem_data(rctx->mem, NULL); return 1; } +LCRYPTO_ALIAS(OCSP_REQ_CTX_set1_req); int OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name, @@ -147,6 +149,7 @@ OCSP_REQ_CTX_add1_header(OCSP_REQ_CTX *rctx, const char *name, return 0; return 1; } +LCRYPTO_ALIAS(OCSP_REQ_CTX_add1_header); OCSP_REQ_CTX * OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, int maxline) @@ -192,6 +195,7 @@ OCSP_sendreq_new(BIO *io, const char *path, OCSP_REQUEST *req, int maxline) return rctx; } +LCRYPTO_ALIAS(OCSP_sendreq_new); /* Parse the HTTP response. This will look like this: * "HTTP/1.0 200 OK". We need to obtain the numeric code and @@ -437,6 +441,7 @@ next_line: return 0; } +LCRYPTO_ALIAS(OCSP_sendreq_nbio); /* Blocking OCSP request handler: now a special case of non-blocking I/O */ OCSP_RESPONSE * @@ -461,3 +466,4 @@ OCSP_sendreq_bio(BIO *b, const char *path, OCSP_REQUEST *req) return NULL; } +LCRYPTO_ALIAS(OCSP_sendreq_bio); diff --git a/lib/libcrypto/ocsp/ocsp_lib.c b/lib/libcrypto/ocsp/ocsp_lib.c index 09bccc0cfdd..d3eada2ba69 100644 --- a/lib/libcrypto/ocsp/ocsp_lib.c +++ b/lib/libcrypto/ocsp/ocsp_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_lib.c,v 1.25 2022/01/22 00:31:23 inoguchi Exp $ */ +/* $OpenBSD: ocsp_lib.c,v 1.26 2023/07/08 10:44:00 beck Exp $ */ /* Written by Tom Titchener for the OpenSSL * project. */ @@ -101,6 +101,7 @@ OCSP_cert_to_id(const EVP_MD *dgst, const X509 *subject, const X509 *issuer) return OCSP_cert_id_new(dgst, iname, ikey, serial); } +LCRYPTO_ALIAS(OCSP_cert_to_id); OCSP_CERTID * OCSP_cert_id_new(const EVP_MD *dgst, const X509_NAME *issuerName, @@ -154,6 +155,7 @@ err: OCSP_CERTID_free(cid); return NULL; } +LCRYPTO_ALIAS(OCSP_cert_id_new); int OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b) @@ -168,6 +170,7 @@ OCSP_id_issuer_cmp(OCSP_CERTID *a, OCSP_CERTID *b) return ret; return ASN1_OCTET_STRING_cmp(a->issuerKeyHash, b->issuerKeyHash); } +LCRYPTO_ALIAS(OCSP_id_issuer_cmp); int OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b) @@ -179,6 +182,7 @@ OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b) return ret; return ASN1_INTEGER_cmp(a->serialNumber, b->serialNumber); } +LCRYPTO_ALIAS(OCSP_id_cmp); /* Parse a URL and split it up into host, port and path components and whether * it is SSL. @@ -235,9 +239,11 @@ OCSP_parse_url(const char *url, char **phost, char **pport, char **ppath, *pport = port; return 1; } +LCRYPTO_ALIAS(OCSP_parse_url); OCSP_CERTID * OCSP_CERTID_dup(OCSP_CERTID *x) { return ASN1_item_dup(&OCSP_CERTID_it, x); } +LCRYPTO_ALIAS(OCSP_CERTID_dup); diff --git a/lib/libcrypto/ocsp/ocsp_prn.c b/lib/libcrypto/ocsp/ocsp_prn.c index fecd14bbfd7..7e3175b6135 100644 --- a/lib/libcrypto/ocsp/ocsp_prn.c +++ b/lib/libcrypto/ocsp/ocsp_prn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_prn.c,v 1.9 2022/01/07 09:45:52 tb Exp $ */ +/* $OpenBSD: ocsp_prn.c,v 1.10 2023/07/08 10:44:00 beck Exp $ */ /* Written by Tom Titchener for the OpenSSL * project. */ @@ -114,6 +114,7 @@ OCSP_response_status_str(long s) }; return table2string(s, rstat_tbl, 6); } +LCRYPTO_ALIAS(OCSP_response_status_str); const char * OCSP_cert_status_str(long s) @@ -125,6 +126,7 @@ OCSP_cert_status_str(long s) }; return table2string(s, cstat_tbl, 3); } +LCRYPTO_ALIAS(OCSP_cert_status_str); const char * OCSP_crl_reason_str(long s) @@ -141,6 +143,7 @@ OCSP_crl_reason_str(long s) }; return table2string(s, reason_tbl, 8); } +LCRYPTO_ALIAS(OCSP_crl_reason_str); int OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST* o, unsigned long flags) @@ -192,6 +195,7 @@ OCSP_REQUEST_print(BIO *bp, OCSP_REQUEST* o, unsigned long flags) err: return 0; } +LCRYPTO_ALIAS(OCSP_REQUEST_print); int OCSP_RESPONSE_print(BIO *bp, OCSP_RESPONSE* o, unsigned long flags) @@ -312,3 +316,4 @@ err: OCSP_BASICRESP_free(br); return ret; } +LCRYPTO_ALIAS(OCSP_RESPONSE_print); diff --git a/lib/libcrypto/ocsp/ocsp_srv.c b/lib/libcrypto/ocsp/ocsp_srv.c index d23520708c9..77c5e2e0fd6 100644 --- a/lib/libcrypto/ocsp/ocsp_srv.c +++ b/lib/libcrypto/ocsp/ocsp_srv.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_srv.c,v 1.12 2022/01/07 09:45:52 tb Exp $ */ +/* $OpenBSD: ocsp_srv.c,v 1.13 2023/07/08 10:44:00 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2001. */ @@ -76,18 +76,21 @@ OCSP_request_onereq_count(OCSP_REQUEST *req) { return sk_OCSP_ONEREQ_num(req->tbsRequest->requestList); } +LCRYPTO_ALIAS(OCSP_request_onereq_count); OCSP_ONEREQ * OCSP_request_onereq_get0(OCSP_REQUEST *req, int i) { return sk_OCSP_ONEREQ_value(req->tbsRequest->requestList, i); } +LCRYPTO_ALIAS(OCSP_request_onereq_get0); OCSP_CERTID * OCSP_onereq_get0_id(OCSP_ONEREQ *one) { return one->reqCert; } +LCRYPTO_ALIAS(OCSP_onereq_get0_id); int OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, @@ -105,6 +108,7 @@ OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, *pserial = cid->serialNumber; return 1; } +LCRYPTO_ALIAS(OCSP_id_get0_info); int OCSP_request_is_signed(OCSP_REQUEST *req) @@ -113,6 +117,7 @@ OCSP_request_is_signed(OCSP_REQUEST *req) return 1; return 0; } +LCRYPTO_ALIAS(OCSP_request_is_signed); /* Create an OCSP response and encode an optional basic response */ OCSP_RESPONSE * @@ -139,6 +144,7 @@ err: OCSP_RESPONSE_free(rsp); return NULL; } +LCRYPTO_ALIAS(OCSP_response_create); OCSP_SINGLERESP * OCSP_basic_add1_status(OCSP_BASICRESP *rsp, OCSP_CERTID *cid, int status, @@ -205,6 +211,7 @@ err: OCSP_SINGLERESP_free(single); return NULL; } +LCRYPTO_ALIAS(OCSP_basic_add1_status); /* Add a certificate to an OCSP request */ int @@ -218,6 +225,7 @@ OCSP_basic_add1_cert(OCSP_BASICRESP *resp, X509 *cert) X509_up_ref(cert); return 1; } +LCRYPTO_ALIAS(OCSP_basic_add1_cert); int OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, @@ -274,3 +282,4 @@ OCSP_basic_sign(OCSP_BASICRESP *brsp, X509 *signer, EVP_PKEY *key, err: return 0; } +LCRYPTO_ALIAS(OCSP_basic_sign); diff --git a/lib/libcrypto/ocsp/ocsp_vfy.c b/lib/libcrypto/ocsp/ocsp_vfy.c index 3c12318857c..d197fe4ea7b 100644 --- a/lib/libcrypto/ocsp/ocsp_vfy.c +++ b/lib/libcrypto/ocsp/ocsp_vfy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ocsp_vfy.c,v 1.22 2022/11/26 16:08:53 tb Exp $ */ +/* $OpenBSD: ocsp_vfy.c,v 1.23 2023/07/08 10:44:00 beck Exp $ */ /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL * project 2000. */ @@ -183,6 +183,7 @@ end: sk_X509_free(untrusted); return ret; } +LCRYPTO_ALIAS(OCSP_basic_verify); int OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, @@ -190,6 +191,7 @@ OCSP_resp_get0_signer(OCSP_BASICRESP *bs, X509 **signer, { return ocsp_find_signer(signer, bs, extra_certs, NULL, 0) > 0; } +LCRYPTO_ALIAS(OCSP_resp_get0_signer); static int ocsp_find_signer(X509 **psigner, OCSP_BASICRESP *bs, STACK_OF(X509) *certs, @@ -448,6 +450,7 @@ OCSP_request_verify(OCSP_REQUEST *req, STACK_OF(X509) *certs, X509_STORE *store, } return 1; } +LCRYPTO_ALIAS(OCSP_request_verify); static int ocsp_req_find_signer(X509 **psigner, OCSP_REQUEST *req, X509_NAME *nm, -- 2.20.1