diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2023-07-07 07:25:22 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2023-07-07 07:25:22 +0000 |
commit | a26bdf5494d834bad106471ab9f09c4561271f67 (patch) | |
tree | 4bb90e00afaa2943dd4f09ca13df74c9d99c640e /lib | |
parent | 775b243805a491c1abf4185994b28629f57eb2c8 (diff) |
Hide symbols in ts
ok jsing@
Diffstat (limited to 'lib')
-rw-r--r-- | lib/libcrypto/Symbols.namespace | 190 | ||||
-rw-r--r-- | lib/libcrypto/hidden/openssl/ts.h | 219 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_asn1.c | 64 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_conf.c | 20 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_err.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_lib.c | 7 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_req_print.c | 3 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_req_utils.c | 25 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_rsp_print.c | 5 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_rsp_sign.c | 22 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_rsp_utils.c | 44 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_rsp_verify.c | 5 | ||||
-rw-r--r-- | lib/libcrypto/ts/ts_verify_ctx.c | 12 |
13 files changed, 608 insertions, 11 deletions
diff --git a/lib/libcrypto/Symbols.namespace b/lib/libcrypto/Symbols.namespace index d6c1610db96..cbf06b4d236 100644 --- a/lib/libcrypto/Symbols.namespace +++ b/lib/libcrypto/Symbols.namespace @@ -1263,3 +1263,193 @@ _libre_BIO_vprintf _libre_BIO_snprintf _libre_BIO_vsnprintf _libre_ERR_load_BIO_strings +_libre_TS_REQ_new +_libre_TS_REQ_free +_libre_i2d_TS_REQ +_libre_d2i_TS_REQ +_libre_TS_REQ_dup +_libre_d2i_TS_REQ_fp +_libre_i2d_TS_REQ_fp +_libre_d2i_TS_REQ_bio +_libre_i2d_TS_REQ_bio +_libre_TS_MSG_IMPRINT_new +_libre_TS_MSG_IMPRINT_free +_libre_i2d_TS_MSG_IMPRINT +_libre_d2i_TS_MSG_IMPRINT +_libre_TS_MSG_IMPRINT_dup +_libre_d2i_TS_MSG_IMPRINT_fp +_libre_i2d_TS_MSG_IMPRINT_fp +_libre_d2i_TS_MSG_IMPRINT_bio +_libre_i2d_TS_MSG_IMPRINT_bio +_libre_TS_RESP_new +_libre_TS_RESP_free +_libre_i2d_TS_RESP +_libre_d2i_TS_RESP +_libre_PKCS7_to_TS_TST_INFO +_libre_TS_RESP_dup +_libre_d2i_TS_RESP_fp +_libre_i2d_TS_RESP_fp +_libre_d2i_TS_RESP_bio +_libre_i2d_TS_RESP_bio +_libre_TS_STATUS_INFO_new +_libre_TS_STATUS_INFO_free +_libre_i2d_TS_STATUS_INFO +_libre_d2i_TS_STATUS_INFO +_libre_TS_STATUS_INFO_dup +_libre_TS_TST_INFO_new +_libre_TS_TST_INFO_free +_libre_i2d_TS_TST_INFO +_libre_d2i_TS_TST_INFO +_libre_TS_TST_INFO_dup +_libre_d2i_TS_TST_INFO_fp +_libre_i2d_TS_TST_INFO_fp +_libre_d2i_TS_TST_INFO_bio +_libre_i2d_TS_TST_INFO_bio +_libre_TS_ACCURACY_new +_libre_TS_ACCURACY_free +_libre_i2d_TS_ACCURACY +_libre_d2i_TS_ACCURACY +_libre_TS_ACCURACY_dup +_libre_ESS_ISSUER_SERIAL_new +_libre_ESS_ISSUER_SERIAL_free +_libre_i2d_ESS_ISSUER_SERIAL +_libre_d2i_ESS_ISSUER_SERIAL +_libre_ESS_ISSUER_SERIAL_dup +_libre_ESS_CERT_ID_new +_libre_ESS_CERT_ID_free +_libre_i2d_ESS_CERT_ID +_libre_d2i_ESS_CERT_ID +_libre_ESS_CERT_ID_dup +_libre_ESS_SIGNING_CERT_new +_libre_ESS_SIGNING_CERT_free +_libre_i2d_ESS_SIGNING_CERT +_libre_d2i_ESS_SIGNING_CERT +_libre_ESS_SIGNING_CERT_dup +_libre_TS_REQ_set_version +_libre_TS_REQ_get_version +_libre_TS_REQ_set_msg_imprint +_libre_TS_REQ_get_msg_imprint +_libre_TS_MSG_IMPRINT_set_algo +_libre_TS_MSG_IMPRINT_get_algo +_libre_TS_MSG_IMPRINT_set_msg +_libre_TS_MSG_IMPRINT_get_msg +_libre_TS_REQ_set_policy_id +_libre_TS_REQ_get_policy_id +_libre_TS_REQ_set_nonce +_libre_TS_REQ_get_nonce +_libre_TS_REQ_set_cert_req +_libre_TS_REQ_get_cert_req +_libre_TS_REQ_get_exts +_libre_TS_REQ_ext_free +_libre_TS_REQ_get_ext_count +_libre_TS_REQ_get_ext_by_NID +_libre_TS_REQ_get_ext_by_OBJ +_libre_TS_REQ_get_ext_by_critical +_libre_TS_REQ_get_ext +_libre_TS_REQ_delete_ext +_libre_TS_REQ_add_ext +_libre_TS_REQ_get_ext_d2i +_libre_TS_REQ_print_bio +_libre_TS_RESP_set_status_info +_libre_TS_RESP_get_status_info +_libre_TS_STATUS_INFO_get0_failure_info +_libre_TS_STATUS_INFO_get0_text +_libre_TS_STATUS_INFO_get0_status +_libre_TS_STATUS_INFO_set_status +_libre_TS_RESP_set_tst_info +_libre_TS_RESP_get_token +_libre_TS_RESP_get_tst_info +_libre_TS_TST_INFO_set_version +_libre_TS_TST_INFO_get_version +_libre_TS_TST_INFO_set_policy_id +_libre_TS_TST_INFO_get_policy_id +_libre_TS_TST_INFO_set_msg_imprint +_libre_TS_TST_INFO_get_msg_imprint +_libre_TS_TST_INFO_set_serial +_libre_TS_TST_INFO_get_serial +_libre_TS_TST_INFO_set_time +_libre_TS_TST_INFO_get_time +_libre_TS_TST_INFO_set_accuracy +_libre_TS_TST_INFO_get_accuracy +_libre_TS_ACCURACY_set_seconds +_libre_TS_ACCURACY_get_seconds +_libre_TS_ACCURACY_set_millis +_libre_TS_ACCURACY_get_millis +_libre_TS_ACCURACY_set_micros +_libre_TS_ACCURACY_get_micros +_libre_TS_TST_INFO_set_ordering +_libre_TS_TST_INFO_get_ordering +_libre_TS_TST_INFO_set_nonce +_libre_TS_TST_INFO_get_nonce +_libre_TS_TST_INFO_set_tsa +_libre_TS_TST_INFO_get_tsa +_libre_TS_TST_INFO_get_exts +_libre_TS_TST_INFO_ext_free +_libre_TS_TST_INFO_get_ext_count +_libre_TS_TST_INFO_get_ext_by_NID +_libre_TS_TST_INFO_get_ext_by_OBJ +_libre_TS_TST_INFO_get_ext_by_critical +_libre_TS_TST_INFO_get_ext +_libre_TS_TST_INFO_delete_ext +_libre_TS_TST_INFO_add_ext +_libre_TS_TST_INFO_get_ext_d2i +_libre_TS_RESP_CTX_new +_libre_TS_RESP_CTX_free +_libre_TS_RESP_CTX_set_signer_cert +_libre_TS_RESP_CTX_set_signer_key +_libre_TS_RESP_CTX_set_def_policy +_libre_TS_RESP_CTX_set_certs +_libre_TS_RESP_CTX_add_policy +_libre_TS_RESP_CTX_add_md +_libre_TS_RESP_CTX_set_accuracy +_libre_TS_RESP_CTX_set_clock_precision_digits +_libre_TS_RESP_CTX_add_flags +_libre_TS_RESP_CTX_set_serial_cb +_libre_TS_RESP_CTX_set_time_cb +_libre_TS_RESP_CTX_set_extension_cb +_libre_TS_RESP_CTX_set_status_info +_libre_TS_RESP_CTX_set_status_info_cond +_libre_TS_RESP_CTX_add_failure_info +_libre_TS_RESP_CTX_get_request +_libre_TS_RESP_CTX_get_tst_info +_libre_TS_RESP_create_response +_libre_TS_RESP_verify_signature +_libre_TS_RESP_verify_response +_libre_TS_RESP_verify_token +_libre_TS_VERIFY_CTX_new +_libre_TS_VERIFY_CTX_free +_libre_TS_VERIFY_CTX_cleanup +_libre_TS_VERIFY_CTX_add_flags +_libre_TS_VERIFY_CTX_set_flags +_libre_TS_VERIFY_CTX_set_data +_libre_TS_VERIFY_CTX_set_store +_libre_TS_VERIFY_CTX_set_certs +_libre_TS_VERIFY_CTX_set_imprint +_libre_TS_REQ_to_TS_VERIFY_CTX +_libre_TS_RESP_print_bio +_libre_TS_STATUS_INFO_print_bio +_libre_TS_TST_INFO_print_bio +_libre_TS_ASN1_INTEGER_print_bio +_libre_TS_OBJ_print_bio +_libre_TS_ext_print_bio +_libre_TS_X509_ALGOR_print_bio +_libre_TS_MSG_IMPRINT_print_bio +_libre_TS_CONF_load_cert +_libre_TS_CONF_load_certs +_libre_TS_CONF_load_key +_libre_TS_CONF_get_tsa_section +_libre_TS_CONF_set_serial +_libre_TS_CONF_set_crypto_device +_libre_TS_CONF_set_default_engine +_libre_TS_CONF_set_signer_cert +_libre_TS_CONF_set_certs +_libre_TS_CONF_set_signer_key +_libre_TS_CONF_set_def_policy +_libre_TS_CONF_set_policies +_libre_TS_CONF_set_digests +_libre_TS_CONF_set_accuracy +_libre_TS_CONF_set_clock_precision_digits +_libre_TS_CONF_set_ordering +_libre_TS_CONF_set_tsa_name +_libre_TS_CONF_set_ess_cert_id_chain +_libre_ERR_load_TS_strings diff --git a/lib/libcrypto/hidden/openssl/ts.h b/lib/libcrypto/hidden/openssl/ts.h new file mode 100644 index 00000000000..de336ef93b1 --- /dev/null +++ b/lib/libcrypto/hidden/openssl/ts.h @@ -0,0 +1,219 @@ +/* $OpenBSD: ts.h,v 1.1 2023/07/07 07:25:21 beck Exp $ */ +/* + * Copyright (c) 2023 Bob Beck <beck@openbsd.org> + * + * 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_TS_H +#define _LIBCRYPTO_TS_H + +#ifndef _MSC_VER +#include_next <openssl/ts.h> +#else +#include "../include/openssl/ts.h" +#endif +#include "crypto_namespace.h" + +LCRYPTO_USED(TS_REQ_new); +LCRYPTO_USED(TS_REQ_free); +LCRYPTO_USED(i2d_TS_REQ); +LCRYPTO_USED(d2i_TS_REQ); +LCRYPTO_USED(TS_REQ_dup); +LCRYPTO_USED(d2i_TS_REQ_fp); +LCRYPTO_USED(i2d_TS_REQ_fp); +LCRYPTO_USED(d2i_TS_REQ_bio); +LCRYPTO_USED(i2d_TS_REQ_bio); +LCRYPTO_USED(TS_MSG_IMPRINT_new); +LCRYPTO_USED(TS_MSG_IMPRINT_free); +LCRYPTO_USED(i2d_TS_MSG_IMPRINT); +LCRYPTO_USED(d2i_TS_MSG_IMPRINT); +LCRYPTO_USED(TS_MSG_IMPRINT_dup); +LCRYPTO_USED(d2i_TS_MSG_IMPRINT_fp); +LCRYPTO_USED(i2d_TS_MSG_IMPRINT_fp); +LCRYPTO_USED(d2i_TS_MSG_IMPRINT_bio); +LCRYPTO_USED(i2d_TS_MSG_IMPRINT_bio); +LCRYPTO_USED(TS_RESP_new); +LCRYPTO_USED(TS_RESP_free); +LCRYPTO_USED(i2d_TS_RESP); +LCRYPTO_USED(d2i_TS_RESP); +LCRYPTO_USED(PKCS7_to_TS_TST_INFO); +LCRYPTO_USED(TS_RESP_dup); +LCRYPTO_USED(d2i_TS_RESP_fp); +LCRYPTO_USED(i2d_TS_RESP_fp); +LCRYPTO_USED(d2i_TS_RESP_bio); +LCRYPTO_USED(i2d_TS_RESP_bio); +LCRYPTO_USED(TS_STATUS_INFO_new); +LCRYPTO_USED(TS_STATUS_INFO_free); +LCRYPTO_USED(i2d_TS_STATUS_INFO); +LCRYPTO_USED(d2i_TS_STATUS_INFO); +LCRYPTO_USED(TS_STATUS_INFO_dup); +LCRYPTO_USED(TS_TST_INFO_new); +LCRYPTO_USED(TS_TST_INFO_free); +LCRYPTO_USED(i2d_TS_TST_INFO); +LCRYPTO_USED(d2i_TS_TST_INFO); +LCRYPTO_USED(TS_TST_INFO_dup); +LCRYPTO_USED(d2i_TS_TST_INFO_fp); +LCRYPTO_USED(i2d_TS_TST_INFO_fp); +LCRYPTO_USED(d2i_TS_TST_INFO_bio); +LCRYPTO_USED(i2d_TS_TST_INFO_bio); +LCRYPTO_USED(TS_ACCURACY_new); +LCRYPTO_USED(TS_ACCURACY_free); +LCRYPTO_USED(i2d_TS_ACCURACY); +LCRYPTO_USED(d2i_TS_ACCURACY); +LCRYPTO_USED(TS_ACCURACY_dup); +LCRYPTO_USED(ESS_ISSUER_SERIAL_new); +LCRYPTO_USED(ESS_ISSUER_SERIAL_free); +LCRYPTO_USED(i2d_ESS_ISSUER_SERIAL); +LCRYPTO_USED(d2i_ESS_ISSUER_SERIAL); +LCRYPTO_USED(ESS_ISSUER_SERIAL_dup); +LCRYPTO_USED(ESS_CERT_ID_new); +LCRYPTO_USED(ESS_CERT_ID_free); +LCRYPTO_USED(i2d_ESS_CERT_ID); +LCRYPTO_USED(d2i_ESS_CERT_ID); +LCRYPTO_USED(ESS_CERT_ID_dup); +LCRYPTO_USED(ESS_SIGNING_CERT_new); +LCRYPTO_USED(ESS_SIGNING_CERT_free); +LCRYPTO_USED(i2d_ESS_SIGNING_CERT); +LCRYPTO_USED(d2i_ESS_SIGNING_CERT); +LCRYPTO_USED(ESS_SIGNING_CERT_dup); +LCRYPTO_USED(TS_REQ_set_version); +LCRYPTO_USED(TS_REQ_get_version); +LCRYPTO_USED(TS_REQ_set_msg_imprint); +LCRYPTO_USED(TS_REQ_get_msg_imprint); +LCRYPTO_USED(TS_MSG_IMPRINT_set_algo); +LCRYPTO_USED(TS_MSG_IMPRINT_get_algo); +LCRYPTO_USED(TS_MSG_IMPRINT_set_msg); +LCRYPTO_USED(TS_MSG_IMPRINT_get_msg); +LCRYPTO_USED(TS_REQ_set_policy_id); +LCRYPTO_USED(TS_REQ_get_policy_id); +LCRYPTO_USED(TS_REQ_set_nonce); +LCRYPTO_USED(TS_REQ_get_nonce); +LCRYPTO_USED(TS_REQ_set_cert_req); +LCRYPTO_USED(TS_REQ_get_cert_req); +LCRYPTO_USED(TS_REQ_get_exts); +LCRYPTO_USED(TS_REQ_ext_free); +LCRYPTO_USED(TS_REQ_get_ext_count); +LCRYPTO_USED(TS_REQ_get_ext_by_NID); +LCRYPTO_USED(TS_REQ_get_ext_by_OBJ); +LCRYPTO_USED(TS_REQ_get_ext_by_critical); +LCRYPTO_USED(TS_REQ_get_ext); +LCRYPTO_USED(TS_REQ_delete_ext); +LCRYPTO_USED(TS_REQ_add_ext); +LCRYPTO_USED(TS_REQ_get_ext_d2i); +LCRYPTO_USED(TS_REQ_print_bio); +LCRYPTO_USED(TS_RESP_set_status_info); +LCRYPTO_USED(TS_RESP_get_status_info); +LCRYPTO_USED(TS_STATUS_INFO_get0_failure_info); +LCRYPTO_USED(TS_STATUS_INFO_get0_text); +LCRYPTO_USED(TS_STATUS_INFO_get0_status); +LCRYPTO_USED(TS_STATUS_INFO_set_status); +LCRYPTO_USED(TS_RESP_set_tst_info); +LCRYPTO_USED(TS_RESP_get_token); +LCRYPTO_USED(TS_RESP_get_tst_info); +LCRYPTO_USED(TS_TST_INFO_set_version); +LCRYPTO_USED(TS_TST_INFO_get_version); +LCRYPTO_USED(TS_TST_INFO_set_policy_id); +LCRYPTO_USED(TS_TST_INFO_get_policy_id); +LCRYPTO_USED(TS_TST_INFO_set_msg_imprint); +LCRYPTO_USED(TS_TST_INFO_get_msg_imprint); +LCRYPTO_USED(TS_TST_INFO_set_serial); +LCRYPTO_USED(TS_TST_INFO_get_serial); +LCRYPTO_USED(TS_TST_INFO_set_time); +LCRYPTO_USED(TS_TST_INFO_get_time); +LCRYPTO_USED(TS_TST_INFO_set_accuracy); +LCRYPTO_USED(TS_TST_INFO_get_accuracy); +LCRYPTO_USED(TS_ACCURACY_set_seconds); +LCRYPTO_USED(TS_ACCURACY_get_seconds); +LCRYPTO_USED(TS_ACCURACY_set_millis); +LCRYPTO_USED(TS_ACCURACY_get_millis); +LCRYPTO_USED(TS_ACCURACY_set_micros); +LCRYPTO_USED(TS_ACCURACY_get_micros); +LCRYPTO_USED(TS_TST_INFO_set_ordering); +LCRYPTO_USED(TS_TST_INFO_get_ordering); +LCRYPTO_USED(TS_TST_INFO_set_nonce); +LCRYPTO_USED(TS_TST_INFO_get_nonce); +LCRYPTO_USED(TS_TST_INFO_set_tsa); +LCRYPTO_USED(TS_TST_INFO_get_tsa); +LCRYPTO_USED(TS_TST_INFO_get_exts); +LCRYPTO_USED(TS_TST_INFO_ext_free); +LCRYPTO_USED(TS_TST_INFO_get_ext_count); +LCRYPTO_USED(TS_TST_INFO_get_ext_by_NID); +LCRYPTO_USED(TS_TST_INFO_get_ext_by_OBJ); +LCRYPTO_USED(TS_TST_INFO_get_ext_by_critical); +LCRYPTO_USED(TS_TST_INFO_get_ext); +LCRYPTO_USED(TS_TST_INFO_delete_ext); +LCRYPTO_USED(TS_TST_INFO_add_ext); +LCRYPTO_USED(TS_TST_INFO_get_ext_d2i); +LCRYPTO_USED(TS_RESP_CTX_new); +LCRYPTO_USED(TS_RESP_CTX_free); +LCRYPTO_USED(TS_RESP_CTX_set_signer_cert); +LCRYPTO_USED(TS_RESP_CTX_set_signer_key); +LCRYPTO_USED(TS_RESP_CTX_set_def_policy); +LCRYPTO_USED(TS_RESP_CTX_set_certs); +LCRYPTO_USED(TS_RESP_CTX_add_policy); +LCRYPTO_USED(TS_RESP_CTX_add_md); +LCRYPTO_USED(TS_RESP_CTX_set_accuracy); +LCRYPTO_USED(TS_RESP_CTX_set_clock_precision_digits); +LCRYPTO_USED(TS_RESP_CTX_add_flags); +LCRYPTO_USED(TS_RESP_CTX_set_serial_cb); +LCRYPTO_USED(TS_RESP_CTX_set_time_cb); +LCRYPTO_USED(TS_RESP_CTX_set_extension_cb); +LCRYPTO_USED(TS_RESP_CTX_set_status_info); +LCRYPTO_USED(TS_RESP_CTX_set_status_info_cond); +LCRYPTO_USED(TS_RESP_CTX_add_failure_info); +LCRYPTO_USED(TS_RESP_CTX_get_request); +LCRYPTO_USED(TS_RESP_CTX_get_tst_info); +LCRYPTO_USED(TS_RESP_create_response); +LCRYPTO_USED(TS_RESP_verify_signature); +LCRYPTO_USED(TS_RESP_verify_response); +LCRYPTO_USED(TS_RESP_verify_token); +LCRYPTO_USED(TS_VERIFY_CTX_new); +LCRYPTO_USED(TS_VERIFY_CTX_free); +LCRYPTO_USED(TS_VERIFY_CTX_cleanup); +LCRYPTO_USED(TS_VERIFY_CTX_add_flags); +LCRYPTO_USED(TS_VERIFY_CTX_set_flags); +LCRYPTO_USED(TS_VERIFY_CTX_set_data); +LCRYPTO_USED(TS_VERIFY_CTX_set_store); +LCRYPTO_USED(TS_VERIFY_CTX_set_certs); +LCRYPTO_USED(TS_VERIFY_CTX_set_imprint); +LCRYPTO_USED(TS_REQ_to_TS_VERIFY_CTX); +LCRYPTO_USED(TS_RESP_print_bio); +LCRYPTO_USED(TS_STATUS_INFO_print_bio); +LCRYPTO_USED(TS_TST_INFO_print_bio); +LCRYPTO_USED(TS_ASN1_INTEGER_print_bio); +LCRYPTO_USED(TS_OBJ_print_bio); +LCRYPTO_USED(TS_ext_print_bio); +LCRYPTO_USED(TS_X509_ALGOR_print_bio); +LCRYPTO_USED(TS_MSG_IMPRINT_print_bio); +LCRYPTO_USED(TS_CONF_load_cert); +LCRYPTO_USED(TS_CONF_load_certs); +LCRYPTO_USED(TS_CONF_load_key); +LCRYPTO_USED(TS_CONF_get_tsa_section); +LCRYPTO_USED(TS_CONF_set_serial); +LCRYPTO_USED(TS_CONF_set_crypto_device); +LCRYPTO_USED(TS_CONF_set_default_engine); +LCRYPTO_USED(TS_CONF_set_signer_cert); +LCRYPTO_USED(TS_CONF_set_certs); +LCRYPTO_USED(TS_CONF_set_signer_key); +LCRYPTO_USED(TS_CONF_set_def_policy); +LCRYPTO_USED(TS_CONF_set_policies); +LCRYPTO_USED(TS_CONF_set_digests); +LCRYPTO_USED(TS_CONF_set_accuracy); +LCRYPTO_USED(TS_CONF_set_clock_precision_digits); +LCRYPTO_USED(TS_CONF_set_ordering); +LCRYPTO_USED(TS_CONF_set_tsa_name); +LCRYPTO_USED(TS_CONF_set_ess_cert_id_chain); +LCRYPTO_USED(ERR_load_TS_strings); + +#endif /* _LIBCRYPTO_TS_H */ diff --git a/lib/libcrypto/ts/ts_asn1.c b/lib/libcrypto/ts/ts_asn1.c index 6537f1c85a1..60ee0b81cb4 100644 --- a/lib/libcrypto/ts/ts_asn1.c +++ b/lib/libcrypto/ts/ts_asn1.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_asn1.c,v 1.13 2022/07/24 08:16:47 tb Exp $ */ +/* $OpenBSD: ts_asn1.c,v 1.14 2023/07/07 07:25:21 beck Exp $ */ /* Written by Nils Larsch for the OpenSSL project 2004. */ /* ==================================================================== @@ -97,30 +97,35 @@ d2i_TS_MSG_IMPRINT(TS_MSG_IMPRINT **a, const unsigned char **in, long len) return (TS_MSG_IMPRINT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_MSG_IMPRINT_it); } +LCRYPTO_ALIAS(d2i_TS_MSG_IMPRINT); int i2d_TS_MSG_IMPRINT(const TS_MSG_IMPRINT *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_MSG_IMPRINT_it); } +LCRYPTO_ALIAS(i2d_TS_MSG_IMPRINT); TS_MSG_IMPRINT * TS_MSG_IMPRINT_new(void) { return (TS_MSG_IMPRINT *)ASN1_item_new(&TS_MSG_IMPRINT_it); } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_new); void TS_MSG_IMPRINT_free(TS_MSG_IMPRINT *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_MSG_IMPRINT_it); } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_free); TS_MSG_IMPRINT * TS_MSG_IMPRINT_dup(TS_MSG_IMPRINT *x) { return ASN1_item_dup(&TS_MSG_IMPRINT_it, x); } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_dup); #ifndef OPENSSL_NO_BIO TS_MSG_IMPRINT * @@ -128,12 +133,14 @@ d2i_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT **a) { return ASN1_item_d2i_bio(&TS_MSG_IMPRINT_it, bp, a); } +LCRYPTO_ALIAS(d2i_TS_MSG_IMPRINT_bio); int i2d_TS_MSG_IMPRINT_bio(BIO *bp, TS_MSG_IMPRINT *a) { return ASN1_item_i2d_bio(&TS_MSG_IMPRINT_it, bp, a); } +LCRYPTO_ALIAS(i2d_TS_MSG_IMPRINT_bio); #endif TS_MSG_IMPRINT * @@ -141,12 +148,14 @@ d2i_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT **a) { return ASN1_item_d2i_fp(&TS_MSG_IMPRINT_it, fp, a); } +LCRYPTO_ALIAS(d2i_TS_MSG_IMPRINT_fp); int i2d_TS_MSG_IMPRINT_fp(FILE *fp, TS_MSG_IMPRINT *a) { return ASN1_item_i2d_fp(&TS_MSG_IMPRINT_it, fp, a); } +LCRYPTO_ALIAS(i2d_TS_MSG_IMPRINT_fp); static const ASN1_TEMPLATE TS_REQ_seq_tt[] = { { @@ -210,30 +219,35 @@ d2i_TS_REQ(TS_REQ **a, const unsigned char **in, long len) return (TS_REQ *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_REQ_it); } +LCRYPTO_ALIAS(d2i_TS_REQ); int i2d_TS_REQ(const TS_REQ *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_REQ_it); } +LCRYPTO_ALIAS(i2d_TS_REQ); TS_REQ * TS_REQ_new(void) { return (TS_REQ *)ASN1_item_new(&TS_REQ_it); } +LCRYPTO_ALIAS(TS_REQ_new); void TS_REQ_free(TS_REQ *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_REQ_it); } +LCRYPTO_ALIAS(TS_REQ_free); TS_REQ * TS_REQ_dup(TS_REQ *x) { return ASN1_item_dup(&TS_REQ_it, x); } +LCRYPTO_ALIAS(TS_REQ_dup); #ifndef OPENSSL_NO_BIO TS_REQ * @@ -241,12 +255,14 @@ d2i_TS_REQ_bio(BIO *bp, TS_REQ **a) { return ASN1_item_d2i_bio(&TS_REQ_it, bp, a); } +LCRYPTO_ALIAS(d2i_TS_REQ_bio); int i2d_TS_REQ_bio(BIO *bp, TS_REQ *a) { return ASN1_item_i2d_bio(&TS_REQ_it, bp, a); } +LCRYPTO_ALIAS(i2d_TS_REQ_bio); #endif TS_REQ * @@ -254,12 +270,14 @@ d2i_TS_REQ_fp(FILE *fp, TS_REQ **a) { return ASN1_item_d2i_fp(&TS_REQ_it, fp, a); } +LCRYPTO_ALIAS(d2i_TS_REQ_fp); int i2d_TS_REQ_fp(FILE *fp, TS_REQ *a) { return ASN1_item_i2d_fp(&TS_REQ_it, fp, a); } +LCRYPTO_ALIAS(i2d_TS_REQ_fp); static const ASN1_TEMPLATE TS_ACCURACY_seq_tt[] = { { @@ -302,30 +320,35 @@ d2i_TS_ACCURACY(TS_ACCURACY **a, const unsigned char **in, long len) return (TS_ACCURACY *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_ACCURACY_it); } +LCRYPTO_ALIAS(d2i_TS_ACCURACY); int i2d_TS_ACCURACY(const TS_ACCURACY *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_ACCURACY_it); } +LCRYPTO_ALIAS(i2d_TS_ACCURACY); TS_ACCURACY * TS_ACCURACY_new(void) { return (TS_ACCURACY *)ASN1_item_new(&TS_ACCURACY_it); } +LCRYPTO_ALIAS(TS_ACCURACY_new); void TS_ACCURACY_free(TS_ACCURACY *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_ACCURACY_it); } +LCRYPTO_ALIAS(TS_ACCURACY_free); TS_ACCURACY * TS_ACCURACY_dup(TS_ACCURACY *x) { return ASN1_item_dup(&TS_ACCURACY_it, x); } +LCRYPTO_ALIAS(TS_ACCURACY_dup); static const ASN1_TEMPLATE TS_TST_INFO_seq_tt[] = { { @@ -417,30 +440,35 @@ d2i_TS_TST_INFO(TS_TST_INFO **a, const unsigned char **in, long len) return (TS_TST_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_TST_INFO_it); } +LCRYPTO_ALIAS(d2i_TS_TST_INFO); int i2d_TS_TST_INFO(const TS_TST_INFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_TST_INFO_it); } +LCRYPTO_ALIAS(i2d_TS_TST_INFO); TS_TST_INFO * TS_TST_INFO_new(void) { return (TS_TST_INFO *)ASN1_item_new(&TS_TST_INFO_it); } +LCRYPTO_ALIAS(TS_TST_INFO_new); void TS_TST_INFO_free(TS_TST_INFO *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_TST_INFO_it); } +LCRYPTO_ALIAS(TS_TST_INFO_free); TS_TST_INFO * TS_TST_INFO_dup(TS_TST_INFO *x) { return ASN1_item_dup(&TS_TST_INFO_it, x); } +LCRYPTO_ALIAS(TS_TST_INFO_dup); #ifndef OPENSSL_NO_BIO TS_TST_INFO * @@ -448,12 +476,14 @@ d2i_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO **a) { return ASN1_item_d2i_bio(&TS_TST_INFO_it, bp, a); } +LCRYPTO_ALIAS(d2i_TS_TST_INFO_bio); int i2d_TS_TST_INFO_bio(BIO *bp, TS_TST_INFO *a) { return ASN1_item_i2d_bio(&TS_TST_INFO_it, bp, a); } +LCRYPTO_ALIAS(i2d_TS_TST_INFO_bio); #endif TS_TST_INFO * @@ -461,12 +491,14 @@ d2i_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO **a) { return ASN1_item_d2i_fp(&TS_TST_INFO_it, fp, a); } +LCRYPTO_ALIAS(d2i_TS_TST_INFO_fp); int i2d_TS_TST_INFO_fp(FILE *fp, TS_TST_INFO *a) { return ASN1_item_i2d_fp(&TS_TST_INFO_it, fp, a); } +LCRYPTO_ALIAS(i2d_TS_TST_INFO_fp); static const ASN1_TEMPLATE TS_STATUS_INFO_seq_tt[] = { { @@ -509,30 +541,35 @@ d2i_TS_STATUS_INFO(TS_STATUS_INFO **a, const unsigned char **in, long len) return (TS_STATUS_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_STATUS_INFO_it); } +LCRYPTO_ALIAS(d2i_TS_STATUS_INFO); int i2d_TS_STATUS_INFO(const TS_STATUS_INFO *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_STATUS_INFO_it); } +LCRYPTO_ALIAS(i2d_TS_STATUS_INFO); TS_STATUS_INFO * TS_STATUS_INFO_new(void) { return (TS_STATUS_INFO *)ASN1_item_new(&TS_STATUS_INFO_it); } +LCRYPTO_ALIAS(TS_STATUS_INFO_new); void TS_STATUS_INFO_free(TS_STATUS_INFO *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_STATUS_INFO_it); } +LCRYPTO_ALIAS(TS_STATUS_INFO_free); TS_STATUS_INFO * TS_STATUS_INFO_dup(TS_STATUS_INFO *x) { return ASN1_item_dup(&TS_STATUS_INFO_it, x); } +LCRYPTO_ALIAS(TS_STATUS_INFO_dup); static int ts_resp_set_tst_info(TS_RESP *a) @@ -620,30 +657,35 @@ d2i_TS_RESP(TS_RESP **a, const unsigned char **in, long len) return (TS_RESP *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &TS_RESP_it); } +LCRYPTO_ALIAS(d2i_TS_RESP); int i2d_TS_RESP(const TS_RESP *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &TS_RESP_it); } +LCRYPTO_ALIAS(i2d_TS_RESP); TS_RESP * TS_RESP_new(void) { return (TS_RESP *)ASN1_item_new(&TS_RESP_it); } +LCRYPTO_ALIAS(TS_RESP_new); void TS_RESP_free(TS_RESP *a) { ASN1_item_free((ASN1_VALUE *)a, &TS_RESP_it); } +LCRYPTO_ALIAS(TS_RESP_free); TS_RESP * TS_RESP_dup(TS_RESP *x) { return ASN1_item_dup(&TS_RESP_it, x); } +LCRYPTO_ALIAS(TS_RESP_dup); #ifndef OPENSSL_NO_BIO TS_RESP * @@ -651,12 +693,14 @@ d2i_TS_RESP_bio(BIO *bp, TS_RESP **a) { return ASN1_item_d2i_bio(&TS_RESP_it, bp, a); } +LCRYPTO_ALIAS(d2i_TS_RESP_bio); int i2d_TS_RESP_bio(BIO *bp, TS_RESP *a) { return ASN1_item_i2d_bio(&TS_RESP_it, bp, a); } +LCRYPTO_ALIAS(i2d_TS_RESP_bio); #endif TS_RESP * @@ -664,12 +708,14 @@ d2i_TS_RESP_fp(FILE *fp, TS_RESP **a) { return ASN1_item_d2i_fp(&TS_RESP_it, fp, a); } +LCRYPTO_ALIAS(d2i_TS_RESP_fp); int i2d_TS_RESP_fp(FILE *fp, TS_RESP *a) { return ASN1_item_i2d_fp(&TS_RESP_it, fp, a); } +LCRYPTO_ALIAS(i2d_TS_RESP_fp); static const ASN1_TEMPLATE ESS_ISSUER_SERIAL_seq_tt[] = { { @@ -705,30 +751,35 @@ d2i_ESS_ISSUER_SERIAL(ESS_ISSUER_SERIAL **a, const unsigned char **in, long len) return (ESS_ISSUER_SERIAL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ESS_ISSUER_SERIAL_it); } +LCRYPTO_ALIAS(d2i_ESS_ISSUER_SERIAL); int i2d_ESS_ISSUER_SERIAL(const ESS_ISSUER_SERIAL *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_ISSUER_SERIAL_it); } +LCRYPTO_ALIAS(i2d_ESS_ISSUER_SERIAL); ESS_ISSUER_SERIAL * ESS_ISSUER_SERIAL_new(void) { return (ESS_ISSUER_SERIAL *)ASN1_item_new(&ESS_ISSUER_SERIAL_it); } +LCRYPTO_ALIAS(ESS_ISSUER_SERIAL_new); void ESS_ISSUER_SERIAL_free(ESS_ISSUER_SERIAL *a) { ASN1_item_free((ASN1_VALUE *)a, &ESS_ISSUER_SERIAL_it); } +LCRYPTO_ALIAS(ESS_ISSUER_SERIAL_free); ESS_ISSUER_SERIAL * ESS_ISSUER_SERIAL_dup(ESS_ISSUER_SERIAL *x) { return ASN1_item_dup(&ESS_ISSUER_SERIAL_it, x); } +LCRYPTO_ALIAS(ESS_ISSUER_SERIAL_dup); static const ASN1_TEMPLATE ESS_CERT_ID_seq_tt[] = { { @@ -764,30 +815,35 @@ d2i_ESS_CERT_ID(ESS_CERT_ID **a, const unsigned char **in, long len) return (ESS_CERT_ID *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ESS_CERT_ID_it); } +LCRYPTO_ALIAS(d2i_ESS_CERT_ID); int i2d_ESS_CERT_ID(const ESS_CERT_ID *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_CERT_ID_it); } +LCRYPTO_ALIAS(i2d_ESS_CERT_ID); ESS_CERT_ID * ESS_CERT_ID_new(void) { return (ESS_CERT_ID *)ASN1_item_new(&ESS_CERT_ID_it); } +LCRYPTO_ALIAS(ESS_CERT_ID_new); void ESS_CERT_ID_free(ESS_CERT_ID *a) { ASN1_item_free((ASN1_VALUE *)a, &ESS_CERT_ID_it); } +LCRYPTO_ALIAS(ESS_CERT_ID_free); ESS_CERT_ID * ESS_CERT_ID_dup(ESS_CERT_ID *x) { return ASN1_item_dup(&ESS_CERT_ID_it, x); } +LCRYPTO_ALIAS(ESS_CERT_ID_dup); static const ASN1_TEMPLATE ESS_SIGNING_CERT_seq_tt[] = { { @@ -823,30 +879,35 @@ d2i_ESS_SIGNING_CERT(ESS_SIGNING_CERT **a, const unsigned char **in, long len) return (ESS_SIGNING_CERT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ESS_SIGNING_CERT_it); } +LCRYPTO_ALIAS(d2i_ESS_SIGNING_CERT); int i2d_ESS_SIGNING_CERT(const ESS_SIGNING_CERT *a, unsigned char **out) { return ASN1_item_i2d((ASN1_VALUE *)a, out, &ESS_SIGNING_CERT_it); } +LCRYPTO_ALIAS(i2d_ESS_SIGNING_CERT); ESS_SIGNING_CERT * ESS_SIGNING_CERT_new(void) { return (ESS_SIGNING_CERT *)ASN1_item_new(&ESS_SIGNING_CERT_it); } +LCRYPTO_ALIAS(ESS_SIGNING_CERT_new); void ESS_SIGNING_CERT_free(ESS_SIGNING_CERT *a) { ASN1_item_free((ASN1_VALUE *)a, &ESS_SIGNING_CERT_it); } +LCRYPTO_ALIAS(ESS_SIGNING_CERT_free); ESS_SIGNING_CERT * ESS_SIGNING_CERT_dup(ESS_SIGNING_CERT *x) { return ASN1_item_dup(&ESS_SIGNING_CERT_it, x); } +LCRYPTO_ALIAS(ESS_SIGNING_CERT_dup); static const ASN1_TEMPLATE ESS_CERT_ID_V2_seq_tt[] = { { @@ -1013,3 +1074,4 @@ PKCS7_to_TS_TST_INFO(PKCS7 *token) p = tst_info_der->data; return d2i_TS_TST_INFO(NULL, &p, tst_info_der->length); } +LCRYPTO_ALIAS(PKCS7_to_TS_TST_INFO); diff --git a/lib/libcrypto/ts/ts_conf.c b/lib/libcrypto/ts/ts_conf.c index 41d185ee5a0..103d4302729 100644 --- a/lib/libcrypto/ts/ts_conf.c +++ b/lib/libcrypto/ts/ts_conf.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_conf.c,v 1.11 2018/04/14 07:18:37 tb Exp $ */ +/* $OpenBSD: ts_conf.c,v 1.12 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -110,6 +110,7 @@ end: BIO_free(cert); return x; } +LCRYPTO_ALIAS(TS_CONF_load_cert); STACK_OF(X509) * TS_CONF_load_certs(const char *file) @@ -144,6 +145,7 @@ end: BIO_free(certs); return othercerts; } +LCRYPTO_ALIAS(TS_CONF_load_certs); EVP_PKEY * TS_CONF_load_key(const char *file, const char *pass) @@ -161,6 +163,7 @@ end: BIO_free(key); return pkey; } +LCRYPTO_ALIAS(TS_CONF_load_key); /* Function definitions for handling configuration options. */ @@ -186,6 +189,7 @@ TS_CONF_get_tsa_section(CONF *conf, const char *section) } return section; } +LCRYPTO_ALIAS(TS_CONF_get_tsa_section); int TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, @@ -205,6 +209,7 @@ TS_CONF_set_serial(CONF *conf, const char *section, TS_serial_cb cb, err: return ret; } +LCRYPTO_ALIAS(TS_CONF_set_serial); #ifndef OPENSSL_NO_ENGINE @@ -225,6 +230,7 @@ TS_CONF_set_crypto_device(CONF *conf, const char *section, const char *device) err: return ret; } +LCRYPTO_ALIAS(TS_CONF_set_crypto_device); int TS_CONF_set_default_engine(const char *name) @@ -251,6 +257,7 @@ err: ENGINE_free(e); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_default_engine); #endif @@ -278,6 +285,7 @@ err: X509_free(cert_obj); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_signer_cert); int TS_CONF_set_certs(CONF *conf, const char *section, const char *certs, @@ -302,6 +310,7 @@ err: sk_X509_pop_free(certs_obj, X509_free); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_certs); int TS_CONF_set_signer_key(CONF *conf, const char *section, const char *key, @@ -327,6 +336,7 @@ err: EVP_PKEY_free(key_obj); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_signer_key); int TS_CONF_set_def_policy(CONF *conf, const char *section, const char *policy, @@ -354,6 +364,7 @@ err: ASN1_OBJECT_free(policy_obj); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_def_policy); int TS_CONF_set_policies(CONF *conf, const char *section, TS_RESP_CTX *ctx) @@ -387,6 +398,7 @@ err: sk_CONF_VALUE_pop_free(list, X509V3_conf_free); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_policies); int TS_CONF_set_digests(CONF *conf, const char *section, TS_RESP_CTX *ctx) @@ -426,6 +438,7 @@ err: sk_CONF_VALUE_pop_free(list, X509V3_conf_free); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_digests); int TS_CONF_set_accuracy(CONF *conf, const char *section, TS_RESP_CTX *ctx) @@ -465,6 +478,7 @@ err: sk_CONF_VALUE_pop_free(list, X509V3_conf_free); return ret; } +LCRYPTO_ALIAS(TS_CONF_set_accuracy); int TS_CONF_set_clock_precision_digits(CONF *conf, const char *section, @@ -490,6 +504,7 @@ TS_CONF_set_clock_precision_digits(CONF *conf, const char *section, err: return ret; } +LCRYPTO_ALIAS(TS_CONF_set_clock_precision_digits); static int TS_CONF_add_flag(CONF *conf, const char *section, const char *field, int flag, @@ -515,12 +530,14 @@ TS_CONF_set_ordering(CONF *conf, const char *section, TS_RESP_CTX *ctx) { return TS_CONF_add_flag(conf, section, ENV_ORDERING, TS_ORDERING, ctx); } +LCRYPTO_ALIAS(TS_CONF_set_ordering); int TS_CONF_set_tsa_name(CONF *conf, const char *section, TS_RESP_CTX *ctx) { return TS_CONF_add_flag(conf, section, ENV_TSA_NAME, TS_TSA_NAME, ctx); } +LCRYPTO_ALIAS(TS_CONF_set_tsa_name); int TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, TS_RESP_CTX *ctx) @@ -528,3 +545,4 @@ TS_CONF_set_ess_cert_id_chain(CONF *conf, const char *section, TS_RESP_CTX *ctx) return TS_CONF_add_flag(conf, section, ENV_ESS_CERT_ID_CHAIN, TS_ESS_CERT_ID_CHAIN, ctx); } +LCRYPTO_ALIAS(TS_CONF_set_ess_cert_id_chain); diff --git a/lib/libcrypto/ts/ts_err.c b/lib/libcrypto/ts/ts_err.c index ddd532a6a73..bb8209a85c2 100644 --- a/lib/libcrypto/ts/ts_err.c +++ b/lib/libcrypto/ts/ts_err.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_err.c,v 1.6 2022/07/12 14:42:50 kn Exp $ */ +/* $OpenBSD: ts_err.c,v 1.7 2023/07/07 07:25:21 beck Exp $ */ /* ==================================================================== * Copyright (c) 1999-2007 The OpenSSL Project. All rights reserved. * @@ -121,3 +121,4 @@ ERR_load_TS_strings(void) } #endif } +LCRYPTO_ALIAS(ERR_load_TS_strings); diff --git a/lib/libcrypto/ts/ts_lib.c b/lib/libcrypto/ts/ts_lib.c index ae715fb6c90..1e94922aa19 100644 --- a/lib/libcrypto/ts/ts_lib.c +++ b/lib/libcrypto/ts/ts_lib.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_lib.c,v 1.13 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: ts_lib.c,v 1.14 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -89,6 +89,7 @@ TS_ASN1_INTEGER_print_bio(BIO *bio, const ASN1_INTEGER *num) return result; } +LCRYPTO_ALIAS(TS_ASN1_INTEGER_print_bio); int TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj) @@ -102,6 +103,7 @@ TS_OBJ_print_bio(BIO *bio, const ASN1_OBJECT *obj) BIO_write(bio, "\n", 1); return 1; } +LCRYPTO_ALIAS(TS_OBJ_print_bio); int TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions) @@ -127,6 +129,7 @@ TS_ext_print_bio(BIO *bio, const STACK_OF(X509_EXTENSION) *extensions) return 1; } +LCRYPTO_ALIAS(TS_ext_print_bio); int TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg) @@ -136,6 +139,7 @@ TS_X509_ALGOR_print_bio(BIO *bio, const X509_ALGOR *alg) return BIO_printf(bio, "Hash Algorithm: %s\n", (i == NID_undef) ? "UNKNOWN" : OBJ_nid2ln(i)); } +LCRYPTO_ALIAS(TS_X509_ALGOR_print_bio); int TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a) @@ -151,3 +155,4 @@ TS_MSG_IMPRINT_print_bio(BIO *bio, TS_MSG_IMPRINT *a) return 1; } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_print_bio); diff --git a/lib/libcrypto/ts/ts_req_print.c b/lib/libcrypto/ts/ts_req_print.c index 64a8133a58d..ddcdda97a39 100644 --- a/lib/libcrypto/ts/ts_req_print.c +++ b/lib/libcrypto/ts/ts_req_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_req_print.c,v 1.4 2014/07/11 08:44:49 jsing Exp $ */ +/* $OpenBSD: ts_req_print.c,v 1.5 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -102,3 +102,4 @@ TS_REQ_print_bio(BIO *bio, TS_REQ *a) return 1; } +LCRYPTO_ALIAS(TS_REQ_print_bio); diff --git a/lib/libcrypto/ts/ts_req_utils.c b/lib/libcrypto/ts/ts_req_utils.c index 8d9d6f3e613..f331219373a 100644 --- a/lib/libcrypto/ts/ts_req_utils.c +++ b/lib/libcrypto/ts/ts_req_utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_req_utils.c,v 1.7 2022/07/24 08:16:47 tb Exp $ */ +/* $OpenBSD: ts_req_utils.c,v 1.8 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -70,12 +70,14 @@ TS_REQ_set_version(TS_REQ *a, long version) { return ASN1_INTEGER_set(a->version, version); } +LCRYPTO_ALIAS(TS_REQ_set_version); long TS_REQ_get_version(const TS_REQ *a) { return ASN1_INTEGER_get(a->version); } +LCRYPTO_ALIAS(TS_REQ_get_version); int TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint) @@ -93,12 +95,14 @@ TS_REQ_set_msg_imprint(TS_REQ *a, TS_MSG_IMPRINT *msg_imprint) a->msg_imprint = new_msg_imprint; return 1; } +LCRYPTO_ALIAS(TS_REQ_set_msg_imprint); TS_MSG_IMPRINT * TS_REQ_get_msg_imprint(TS_REQ *a) { return a->msg_imprint; } +LCRYPTO_ALIAS(TS_REQ_get_msg_imprint); int TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg) @@ -116,24 +120,28 @@ TS_MSG_IMPRINT_set_algo(TS_MSG_IMPRINT *a, X509_ALGOR *alg) a->hash_algo = new_alg; return 1; } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_set_algo); X509_ALGOR * TS_MSG_IMPRINT_get_algo(TS_MSG_IMPRINT *a) { return a->hash_algo; } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_get_algo); int TS_MSG_IMPRINT_set_msg(TS_MSG_IMPRINT *a, unsigned char *d, int len) { return ASN1_OCTET_STRING_set(a->hashed_msg, d, len); } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_set_msg); ASN1_OCTET_STRING * TS_MSG_IMPRINT_get_msg(TS_MSG_IMPRINT *a) { return a->hashed_msg; } +LCRYPTO_ALIAS(TS_MSG_IMPRINT_get_msg); int TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy) @@ -151,12 +159,14 @@ TS_REQ_set_policy_id(TS_REQ *a, const ASN1_OBJECT *policy) a->policy_id = new_policy; return 1; } +LCRYPTO_ALIAS(TS_REQ_set_policy_id); ASN1_OBJECT * TS_REQ_get_policy_id(TS_REQ *a) { return a->policy_id; } +LCRYPTO_ALIAS(TS_REQ_get_policy_id); int TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce) @@ -174,12 +184,14 @@ TS_REQ_set_nonce(TS_REQ *a, const ASN1_INTEGER *nonce) a->nonce = new_nonce; return 1; } +LCRYPTO_ALIAS(TS_REQ_set_nonce); const ASN1_INTEGER * TS_REQ_get_nonce(const TS_REQ *a) { return a->nonce; } +LCRYPTO_ALIAS(TS_REQ_get_nonce); int TS_REQ_set_cert_req(TS_REQ *a, int cert_req) @@ -187,12 +199,14 @@ TS_REQ_set_cert_req(TS_REQ *a, int cert_req) a->cert_req = cert_req ? 0xFF : 0x00; return 1; } +LCRYPTO_ALIAS(TS_REQ_set_cert_req); int TS_REQ_get_cert_req(const TS_REQ *a) { return a->cert_req ? 1 : 0; } +LCRYPTO_ALIAS(TS_REQ_get_cert_req); STACK_OF(X509_EXTENSION) *TS_REQ_get_exts(TS_REQ *a) { @@ -207,51 +221,60 @@ TS_REQ_ext_free(TS_REQ *a) sk_X509_EXTENSION_pop_free(a->extensions, X509_EXTENSION_free); a->extensions = NULL; } +LCRYPTO_ALIAS(TS_REQ_ext_free); int TS_REQ_get_ext_count(TS_REQ *a) { return X509v3_get_ext_count(a->extensions); } +LCRYPTO_ALIAS(TS_REQ_get_ext_count); int TS_REQ_get_ext_by_NID(TS_REQ *a, int nid, int lastpos) { return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); } +LCRYPTO_ALIAS(TS_REQ_get_ext_by_NID); int TS_REQ_get_ext_by_OBJ(TS_REQ *a, const ASN1_OBJECT *obj, int lastpos) { return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); } +LCRYPTO_ALIAS(TS_REQ_get_ext_by_OBJ); int TS_REQ_get_ext_by_critical(TS_REQ *a, int crit, int lastpos) { return X509v3_get_ext_by_critical(a->extensions, crit, lastpos); } +LCRYPTO_ALIAS(TS_REQ_get_ext_by_critical); X509_EXTENSION * TS_REQ_get_ext(TS_REQ *a, int loc) { return X509v3_get_ext(a->extensions, loc); } +LCRYPTO_ALIAS(TS_REQ_get_ext); X509_EXTENSION * TS_REQ_delete_ext(TS_REQ *a, int loc) { return X509v3_delete_ext(a->extensions, loc); } +LCRYPTO_ALIAS(TS_REQ_delete_ext); int TS_REQ_add_ext(TS_REQ *a, X509_EXTENSION *ex, int loc) { return X509v3_add_ext(&a->extensions, ex, loc) != NULL; } +LCRYPTO_ALIAS(TS_REQ_add_ext); void * TS_REQ_get_ext_d2i(TS_REQ *a, int nid, int *crit, int *idx) { return X509V3_get_d2i(a->extensions, nid, crit, idx); } +LCRYPTO_ALIAS(TS_REQ_get_ext_d2i); diff --git a/lib/libcrypto/ts/ts_rsp_print.c b/lib/libcrypto/ts/ts_rsp_print.c index cfff955cd66..c65d2266868 100644 --- a/lib/libcrypto/ts/ts_rsp_print.c +++ b/lib/libcrypto/ts/ts_rsp_print.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_rsp_print.c,v 1.6 2022/07/24 08:16:47 tb Exp $ */ +/* $OpenBSD: ts_rsp_print.c,v 1.7 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -95,6 +95,7 @@ TS_RESP_print_bio(BIO *bio, TS_RESP *a) return 1; } +LCRYPTO_ALIAS(TS_RESP_print_bio); int TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a) @@ -177,6 +178,7 @@ TS_STATUS_INFO_print_bio(BIO *bio, TS_STATUS_INFO *a) return 1; } +LCRYPTO_ALIAS(TS_STATUS_INFO_print_bio); static int TS_status_map_print(BIO *bio, struct status_map_st *a, ASN1_BIT_STRING *v) @@ -275,6 +277,7 @@ TS_TST_INFO_print_bio(BIO *bio, TS_TST_INFO *a) return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_print_bio); static int TS_ACCURACY_print_bio(BIO *bio, const TS_ACCURACY *accuracy) diff --git a/lib/libcrypto/ts/ts_rsp_sign.c b/lib/libcrypto/ts/ts_rsp_sign.c index 7ebadb10491..84a69931060 100644 --- a/lib/libcrypto/ts/ts_rsp_sign.c +++ b/lib/libcrypto/ts/ts_rsp_sign.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_rsp_sign.c,v 1.30 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: ts_rsp_sign.c,v 1.31 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -149,6 +149,7 @@ TS_RESP_CTX_set_time_cb(TS_RESP_CTX *ctx, TS_time_cb cb, void *data) ctx->time_cb = cb; ctx->time_cb_data = data; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_time_cb); /* TS_RESP_CTX management functions. */ @@ -169,6 +170,7 @@ TS_RESP_CTX_new(void) return ctx; } +LCRYPTO_ALIAS(TS_RESP_CTX_new); void TS_RESP_CTX_free(TS_RESP_CTX *ctx) @@ -187,6 +189,7 @@ TS_RESP_CTX_free(TS_RESP_CTX *ctx) ASN1_INTEGER_free(ctx->micros); free(ctx); } +LCRYPTO_ALIAS(TS_RESP_CTX_free); int TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer) @@ -200,6 +203,7 @@ TS_RESP_CTX_set_signer_cert(TS_RESP_CTX *ctx, X509 *signer) CRYPTO_add(&ctx->signer_cert->references, +1, CRYPTO_LOCK_X509); return 1; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_signer_cert); int TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key) @@ -210,6 +214,7 @@ TS_RESP_CTX_set_signer_key(TS_RESP_CTX *ctx, EVP_PKEY *key) return 1; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_signer_key); int TS_RESP_CTX_set_def_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *def_policy) @@ -224,6 +229,7 @@ err: TSerror(ERR_R_MALLOC_FAILURE); return 0; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_def_policy); int TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs) @@ -247,6 +253,7 @@ TS_RESP_CTX_set_certs(TS_RESP_CTX *ctx, STACK_OF(X509) *certs) return 1; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_certs); int TS_RESP_CTX_add_policy(TS_RESP_CTX *ctx, const ASN1_OBJECT *policy) @@ -268,6 +275,7 @@ err: ASN1_OBJECT_free(copy); return 0; } +LCRYPTO_ALIAS(TS_RESP_CTX_add_policy); int TS_RESP_CTX_add_md(TS_RESP_CTX *ctx, const EVP_MD *md) @@ -285,6 +293,7 @@ err: TSerror(ERR_R_MALLOC_FAILURE); return 0; } +LCRYPTO_ALIAS(TS_RESP_CTX_add_md); #define TS_RESP_CTX_accuracy_free(ctx) \ ASN1_INTEGER_free(ctx->seconds); \ @@ -315,12 +324,14 @@ err: TSerror(ERR_R_MALLOC_FAILURE); return 0; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_accuracy); void TS_RESP_CTX_add_flags(TS_RESP_CTX *ctx, int flags) { ctx->flags |= flags; } +LCRYPTO_ALIAS(TS_RESP_CTX_add_flags); void TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data) @@ -328,6 +339,7 @@ TS_RESP_CTX_set_serial_cb(TS_RESP_CTX *ctx, TS_serial_cb cb, void *data) ctx->serial_cb = cb; ctx->serial_cb_data = data; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_serial_cb); void TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, TS_extension_cb cb, void *data) @@ -335,6 +347,7 @@ TS_RESP_CTX_set_extension_cb(TS_RESP_CTX *ctx, TS_extension_cb cb, void *data) ctx->extension_cb = cb; ctx->extension_cb_data = data; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_extension_cb); int TS_RESP_CTX_set_status_info(TS_RESP_CTX *ctx, int status, const char *text) @@ -368,6 +381,7 @@ err: ASN1_UTF8STRING_free(utf8_text); return ret; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_status_info); int TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, int status, const char *text) @@ -381,6 +395,7 @@ TS_RESP_CTX_set_status_info_cond(TS_RESP_CTX *ctx, int status, const char *text) } return ret; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_status_info_cond); int TS_RESP_CTX_add_failure_info(TS_RESP_CTX *ctx, int failure) @@ -397,18 +412,21 @@ err: TSerror(ERR_R_MALLOC_FAILURE); return 0; } +LCRYPTO_ALIAS(TS_RESP_CTX_add_failure_info); TS_REQ * TS_RESP_CTX_get_request(TS_RESP_CTX *ctx) { return ctx->request; } +LCRYPTO_ALIAS(TS_RESP_CTX_get_request); TS_TST_INFO * TS_RESP_CTX_get_tst_info(TS_RESP_CTX *ctx) { return ctx->tst_info; } +LCRYPTO_ALIAS(TS_RESP_CTX_get_tst_info); int TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, unsigned precision) @@ -418,6 +436,7 @@ TS_RESP_CTX_set_clock_precision_digits(TS_RESP_CTX *ctx, unsigned precision) ctx->clock_precision_digits = precision; return 1; } +LCRYPTO_ALIAS(TS_RESP_CTX_set_clock_precision_digits); /* Main entry method of the response generation. */ TS_RESP * @@ -488,6 +507,7 @@ end: TS_RESP_CTX_cleanup(ctx); return response; } +LCRYPTO_ALIAS(TS_RESP_create_response); /* Initializes the variable part of the context. */ static void diff --git a/lib/libcrypto/ts/ts_rsp_utils.c b/lib/libcrypto/ts/ts_rsp_utils.c index 2e37f26fdae..4449c4a94c0 100644 --- a/lib/libcrypto/ts/ts_rsp_utils.c +++ b/lib/libcrypto/ts/ts_rsp_utils.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_rsp_utils.c,v 1.9 2022/07/24 19:25:36 tb Exp $ */ +/* $OpenBSD: ts_rsp_utils.c,v 1.10 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -84,36 +84,42 @@ TS_RESP_set_status_info(TS_RESP *a, TS_STATUS_INFO *status_info) return 1; } +LCRYPTO_ALIAS(TS_RESP_set_status_info); TS_STATUS_INFO * TS_RESP_get_status_info(TS_RESP *a) { return a->status_info; } +LCRYPTO_ALIAS(TS_RESP_get_status_info); const ASN1_UTF8STRING * TS_STATUS_INFO_get0_failure_info(const TS_STATUS_INFO *si) { return si->failure_info; } +LCRYPTO_ALIAS(TS_STATUS_INFO_get0_failure_info); const STACK_OF(ASN1_UTF8STRING) * TS_STATUS_INFO_get0_text(const TS_STATUS_INFO *si) { return si->text; } +LCRYPTO_ALIAS(TS_STATUS_INFO_get0_text); const ASN1_INTEGER * TS_STATUS_INFO_get0_status(const TS_STATUS_INFO *si) { return si->status; } +LCRYPTO_ALIAS(TS_STATUS_INFO_get0_status); int TS_STATUS_INFO_set_status(TS_STATUS_INFO *si, int i) { return ASN1_INTEGER_set(si->status, i); } +LCRYPTO_ALIAS(TS_STATUS_INFO_set_status); /* Caller loses ownership of PKCS7 and TS_TST_INFO objects. */ void @@ -125,30 +131,35 @@ TS_RESP_set_tst_info(TS_RESP *a, PKCS7 *p7, TS_TST_INFO *tst_info) TS_TST_INFO_free(a->tst_info); a->tst_info = tst_info; } +LCRYPTO_ALIAS(TS_RESP_set_tst_info); PKCS7 * TS_RESP_get_token(TS_RESP *a) { return a->token; } +LCRYPTO_ALIAS(TS_RESP_get_token); TS_TST_INFO * TS_RESP_get_tst_info(TS_RESP *a) { return a->tst_info; } +LCRYPTO_ALIAS(TS_RESP_get_tst_info); int TS_TST_INFO_set_version(TS_TST_INFO *a, long version) { return ASN1_INTEGER_set(a->version, version); } +LCRYPTO_ALIAS(TS_TST_INFO_set_version); long TS_TST_INFO_get_version(const TS_TST_INFO *a) { return ASN1_INTEGER_get(a->version); } +LCRYPTO_ALIAS(TS_TST_INFO_get_version); int TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy) @@ -166,12 +177,14 @@ TS_TST_INFO_set_policy_id(TS_TST_INFO *a, ASN1_OBJECT *policy) a->policy_id = new_policy; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_policy_id); ASN1_OBJECT * TS_TST_INFO_get_policy_id(TS_TST_INFO *a) { return a->policy_id; } +LCRYPTO_ALIAS(TS_TST_INFO_get_policy_id); int TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint) @@ -189,12 +202,14 @@ TS_TST_INFO_set_msg_imprint(TS_TST_INFO *a, TS_MSG_IMPRINT *msg_imprint) a->msg_imprint = new_msg_imprint; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_msg_imprint); TS_MSG_IMPRINT * TS_TST_INFO_get_msg_imprint(TS_TST_INFO *a) { return a->msg_imprint; } +LCRYPTO_ALIAS(TS_TST_INFO_get_msg_imprint); int TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial) @@ -212,12 +227,14 @@ TS_TST_INFO_set_serial(TS_TST_INFO *a, const ASN1_INTEGER *serial) a->serial = new_serial; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_serial); const ASN1_INTEGER * TS_TST_INFO_get_serial(const TS_TST_INFO *a) { return a->serial; } +LCRYPTO_ALIAS(TS_TST_INFO_get_serial); int TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime) @@ -235,12 +252,14 @@ TS_TST_INFO_set_time(TS_TST_INFO *a, const ASN1_GENERALIZEDTIME *gtime) a->time = new_time; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_time); const ASN1_GENERALIZEDTIME * TS_TST_INFO_get_time(const TS_TST_INFO *a) { return a->time; } +LCRYPTO_ALIAS(TS_TST_INFO_get_time); int TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy) @@ -258,12 +277,14 @@ TS_TST_INFO_set_accuracy(TS_TST_INFO *a, TS_ACCURACY *accuracy) a->accuracy = new_accuracy; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_accuracy); TS_ACCURACY * TS_TST_INFO_get_accuracy(TS_TST_INFO *a) { return a->accuracy; } +LCRYPTO_ALIAS(TS_TST_INFO_get_accuracy); int TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds) @@ -281,12 +302,14 @@ TS_ACCURACY_set_seconds(TS_ACCURACY *a, const ASN1_INTEGER *seconds) a->seconds = new_seconds; return 1; } +LCRYPTO_ALIAS(TS_ACCURACY_set_seconds); const ASN1_INTEGER * TS_ACCURACY_get_seconds(const TS_ACCURACY *a) { return a->seconds; } +LCRYPTO_ALIAS(TS_ACCURACY_get_seconds); int TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis) @@ -306,12 +329,14 @@ TS_ACCURACY_set_millis(TS_ACCURACY *a, const ASN1_INTEGER *millis) a->millis = new_millis; return 1; } +LCRYPTO_ALIAS(TS_ACCURACY_set_millis); const ASN1_INTEGER * TS_ACCURACY_get_millis(const TS_ACCURACY *a) { return a->millis; } +LCRYPTO_ALIAS(TS_ACCURACY_get_millis); int TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros) @@ -331,12 +356,14 @@ TS_ACCURACY_set_micros(TS_ACCURACY *a, const ASN1_INTEGER *micros) a->micros = new_micros; return 1; } +LCRYPTO_ALIAS(TS_ACCURACY_set_micros); const ASN1_INTEGER * TS_ACCURACY_get_micros(const TS_ACCURACY *a) { return a->micros; } +LCRYPTO_ALIAS(TS_ACCURACY_get_micros); int TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering) @@ -344,12 +371,14 @@ TS_TST_INFO_set_ordering(TS_TST_INFO *a, int ordering) a->ordering = ordering ? 0xFF : 0x00; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_ordering); int TS_TST_INFO_get_ordering(const TS_TST_INFO *a) { return a->ordering ? 1 : 0; } +LCRYPTO_ALIAS(TS_TST_INFO_get_ordering); int TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce) @@ -367,12 +396,14 @@ TS_TST_INFO_set_nonce(TS_TST_INFO *a, const ASN1_INTEGER *nonce) a->nonce = new_nonce; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_nonce); const ASN1_INTEGER * TS_TST_INFO_get_nonce(const TS_TST_INFO *a) { return a->nonce; } +LCRYPTO_ALIAS(TS_TST_INFO_get_nonce); int TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa) @@ -390,12 +421,14 @@ TS_TST_INFO_set_tsa(TS_TST_INFO *a, GENERAL_NAME *tsa) a->tsa = new_tsa; return 1; } +LCRYPTO_ALIAS(TS_TST_INFO_set_tsa); GENERAL_NAME * TS_TST_INFO_get_tsa(TS_TST_INFO *a) { return a->tsa; } +LCRYPTO_ALIAS(TS_TST_INFO_get_tsa); STACK_OF(X509_EXTENSION) *TS_TST_INFO_get_exts(TS_TST_INFO *a) { @@ -410,51 +443,60 @@ TS_TST_INFO_ext_free(TS_TST_INFO *a) sk_X509_EXTENSION_pop_free(a->extensions, X509_EXTENSION_free); a->extensions = NULL; } +LCRYPTO_ALIAS(TS_TST_INFO_ext_free); int TS_TST_INFO_get_ext_count(TS_TST_INFO *a) { return X509v3_get_ext_count(a->extensions); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext_count); int TS_TST_INFO_get_ext_by_NID(TS_TST_INFO *a, int nid, int lastpos) { return X509v3_get_ext_by_NID(a->extensions, nid, lastpos); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext_by_NID); int TS_TST_INFO_get_ext_by_OBJ(TS_TST_INFO *a, const ASN1_OBJECT *obj, int lastpos) { return X509v3_get_ext_by_OBJ(a->extensions, obj, lastpos); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext_by_OBJ); int TS_TST_INFO_get_ext_by_critical(TS_TST_INFO *a, int crit, int lastpos) { return X509v3_get_ext_by_critical(a->extensions, crit, lastpos); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext_by_critical); X509_EXTENSION * TS_TST_INFO_get_ext(TS_TST_INFO *a, int loc) { return X509v3_get_ext(a->extensions, loc); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext); X509_EXTENSION * TS_TST_INFO_delete_ext(TS_TST_INFO *a, int loc) { return X509v3_delete_ext(a->extensions, loc); } +LCRYPTO_ALIAS(TS_TST_INFO_delete_ext); int TS_TST_INFO_add_ext(TS_TST_INFO *a, X509_EXTENSION *ex, int loc) { return X509v3_add_ext(&a->extensions, ex, loc) != NULL; } +LCRYPTO_ALIAS(TS_TST_INFO_add_ext); void * TS_TST_INFO_get_ext_d2i(TS_TST_INFO *a, int nid, int *crit, int *idx) { return X509V3_get_d2i(a->extensions, nid, crit, idx); } +LCRYPTO_ALIAS(TS_TST_INFO_get_ext_d2i); diff --git a/lib/libcrypto/ts/ts_rsp_verify.c b/lib/libcrypto/ts/ts_rsp_verify.c index dc467d86043..69236f68abd 100644 --- a/lib/libcrypto/ts/ts_rsp_verify.c +++ b/lib/libcrypto/ts/ts_rsp_verify.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_rsp_verify.c,v 1.29 2022/11/26 16:08:54 tb Exp $ */ +/* $OpenBSD: ts_rsp_verify.c,v 1.30 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2002. */ @@ -230,6 +230,7 @@ err: return ret; } +LCRYPTO_ALIAS(TS_RESP_verify_signature); /* * The certificate chain is returned in chain. Caller is responsible for @@ -485,6 +486,7 @@ TS_RESP_verify_response(TS_VERIFY_CTX *ctx, TS_RESP *response) err: return ret; } +LCRYPTO_ALIAS(TS_RESP_verify_response); /* * Tries to extract a TS_TST_INFO structure from the PKCS7 token and @@ -502,6 +504,7 @@ TS_RESP_verify_token(TS_VERIFY_CTX *ctx, PKCS7 *token) } return ret; } +LCRYPTO_ALIAS(TS_RESP_verify_token); /* * Verifies whether the 'token' contains a valid time stamp token diff --git a/lib/libcrypto/ts/ts_verify_ctx.c b/lib/libcrypto/ts/ts_verify_ctx.c index a7b90f9e4cf..5a2d95c680e 100644 --- a/lib/libcrypto/ts/ts_verify_ctx.c +++ b/lib/libcrypto/ts/ts_verify_ctx.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ts_verify_ctx.c,v 1.13 2023/04/25 17:52:54 tb Exp $ */ +/* $OpenBSD: ts_verify_ctx.c,v 1.14 2023/07/07 07:25:21 beck Exp $ */ /* Written by Zoltan Glozik (zglozik@stones.com) for the OpenSSL * project 2003. */ @@ -74,6 +74,7 @@ TS_VERIFY_CTX_new(void) return ctx; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_new); void TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx) @@ -84,6 +85,7 @@ TS_VERIFY_CTX_free(TS_VERIFY_CTX *ctx) TS_VERIFY_CTX_cleanup(ctx); free(ctx); } +LCRYPTO_ALIAS(TS_VERIFY_CTX_free); void TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx) @@ -107,6 +109,7 @@ TS_VERIFY_CTX_cleanup(TS_VERIFY_CTX *ctx) memset(ctx, 0, sizeof(*ctx)); } +LCRYPTO_ALIAS(TS_VERIFY_CTX_cleanup); /* * XXX: The following accessors demonstrate the amount of care and thought that @@ -127,6 +130,7 @@ TS_VERIFY_CTX_add_flags(TS_VERIFY_CTX *ctx, int flags) return ctx->flags; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_add_flags); int TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int flags) @@ -135,6 +139,7 @@ TS_VERIFY_CTX_set_flags(TS_VERIFY_CTX *ctx, int flags) return ctx->flags; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_set_flags); BIO * TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *bio) @@ -143,6 +148,7 @@ TS_VERIFY_CTX_set_data(TS_VERIFY_CTX *ctx, BIO *bio) return ctx->data; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_set_data); X509_STORE * TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *store) @@ -151,6 +157,7 @@ TS_VERIFY_CTX_set_store(TS_VERIFY_CTX *ctx, X509_STORE *store) return ctx->store; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_set_store); STACK_OF(X509) * TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs) @@ -159,6 +166,7 @@ TS_VERIFY_CTX_set_certs(TS_VERIFY_CTX *ctx, STACK_OF(X509) *certs) return ctx->certs; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_set_certs); unsigned char * TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, unsigned char *imprint, @@ -171,6 +179,7 @@ TS_VERIFY_CTX_set_imprint(TS_VERIFY_CTX *ctx, unsigned char *imprint, return ctx->imprint; } +LCRYPTO_ALIAS(TS_VERIFY_CTX_set_imprint); TS_VERIFY_CTX * TS_REQ_to_TS_VERIFY_CTX(TS_REQ *req, TS_VERIFY_CTX *ctx) @@ -224,3 +233,4 @@ err: TS_VERIFY_CTX_free(ret); return NULL; } +LCRYPTO_ALIAS(TS_REQ_to_TS_VERIFY_CTX); |