Hide symbols in libcrypto/pkcs7
authorbeck <beck@openbsd.org>
Sat, 12 Nov 2022 12:11:14 +0000 (12:11 +0000)
committerbeck <beck@openbsd.org>
Sat, 12 Nov 2022 12:11:14 +0000 (12:11 +0000)
This applies the guentherizer 9000(tm) to pkcs7, after moving
several pkcs7 funcitions back to pkcs7 that were in x509/x_all.c
for reasons known only to the miasma.

ok jsing@

lib/libcrypto/Symbols.namespace
lib/libcrypto/hidden/openssl/pkcs7.h [new file with mode: 0644]
lib/libcrypto/pkcs7/bio_pk7.c
lib/libcrypto/pkcs7/pk7_asn1.c
lib/libcrypto/pkcs7/pk7_attr.c
lib/libcrypto/pkcs7/pk7_doit.c
lib/libcrypto/pkcs7/pk7_lib.c
lib/libcrypto/pkcs7/pk7_mime.c
lib/libcrypto/pkcs7/pk7_smime.c
lib/libcrypto/pkcs7/pkcs7err.c
lib/libcrypto/x509/x_all.c

index 6ec4d6f..db529f4 100644 (file)
@@ -28,3 +28,103 @@ _libre_sk_set_cmp_func
 _libre_sk_dup
 _libre_sk_sort
 _libre_sk_is_sorted
+_libre_PKCS7_ISSUER_AND_SERIAL_new
+_libre_PKCS7_ISSUER_AND_SERIAL_free
+_libre_d2i_PKCS7_ISSUER_AND_SERIAL
+_libre_i2d_PKCS7_ISSUER_AND_SERIAL
+_libre_PKCS7_ISSUER_AND_SERIAL_digest
+_libre_d2i_PKCS7_fp
+_libre_i2d_PKCS7_fp
+_libre_PKCS7_dup
+_libre_d2i_PKCS7_bio
+_libre_i2d_PKCS7_bio
+_libre_i2d_PKCS7_bio_stream
+_libre_PEM_write_bio_PKCS7_stream
+_libre_PKCS7_SIGNER_INFO_new
+_libre_PKCS7_SIGNER_INFO_free
+_libre_d2i_PKCS7_SIGNER_INFO
+_libre_i2d_PKCS7_SIGNER_INFO
+_libre_PKCS7_RECIP_INFO_new
+_libre_PKCS7_RECIP_INFO_free
+_libre_d2i_PKCS7_RECIP_INFO
+_libre_i2d_PKCS7_RECIP_INFO
+_libre_PKCS7_SIGNED_new
+_libre_PKCS7_SIGNED_free
+_libre_d2i_PKCS7_SIGNED
+_libre_i2d_PKCS7_SIGNED
+_libre_PKCS7_ENC_CONTENT_new
+_libre_PKCS7_ENC_CONTENT_free
+_libre_d2i_PKCS7_ENC_CONTENT
+_libre_i2d_PKCS7_ENC_CONTENT
+_libre_PKCS7_ENVELOPE_new
+_libre_PKCS7_ENVELOPE_free
+_libre_d2i_PKCS7_ENVELOPE
+_libre_i2d_PKCS7_ENVELOPE
+_libre_PKCS7_SIGN_ENVELOPE_new
+_libre_PKCS7_SIGN_ENVELOPE_free
+_libre_d2i_PKCS7_SIGN_ENVELOPE
+_libre_i2d_PKCS7_SIGN_ENVELOPE
+_libre_PKCS7_DIGEST_new
+_libre_PKCS7_DIGEST_free
+_libre_d2i_PKCS7_DIGEST
+_libre_i2d_PKCS7_DIGEST
+_libre_PKCS7_ENCRYPT_new
+_libre_PKCS7_ENCRYPT_free
+_libre_d2i_PKCS7_ENCRYPT
+_libre_i2d_PKCS7_ENCRYPT
+_libre_PKCS7_new
+_libre_PKCS7_free
+_libre_d2i_PKCS7
+_libre_i2d_PKCS7
+_libre_i2d_PKCS7_NDEF
+_libre_PKCS7_print_ctx
+_libre_PKCS7_ctrl
+_libre_PKCS7_set_type
+_libre_PKCS7_set0_type_other
+_libre_PKCS7_set_content
+_libre_PKCS7_SIGNER_INFO_set
+_libre_PKCS7_SIGNER_INFO_sign
+_libre_PKCS7_add_signer
+_libre_PKCS7_add_certificate
+_libre_PKCS7_add_crl
+_libre_PKCS7_content_new
+_libre_PKCS7_dataVerify
+_libre_PKCS7_signatureVerify
+_libre_PKCS7_dataInit
+_libre_PKCS7_dataFinal
+_libre_PKCS7_dataDecode
+_libre_PKCS7_add_signature
+_libre_PKCS7_cert_from_signer_info
+_libre_PKCS7_set_digest
+_libre_PKCS7_get_signer_info
+_libre_PKCS7_add_recipient
+_libre_PKCS7_SIGNER_INFO_get0_algs
+_libre_PKCS7_RECIP_INFO_get0_alg
+_libre_PKCS7_add_recipient_info
+_libre_PKCS7_RECIP_INFO_set
+_libre_PKCS7_set_cipher
+_libre_PKCS7_stream
+_libre_PKCS7_get_issuer_and_serial
+_libre_PKCS7_digest_from_attributes
+_libre_PKCS7_add_signed_attribute
+_libre_PKCS7_get_attribute
+_libre_PKCS7_get_signed_attribute
+_libre_PKCS7_set_signed_attributes
+_libre_PKCS7_set_attributes
+_libre_PKCS7_sign
+_libre_PKCS7_sign_add_signer
+_libre_PKCS7_final
+_libre_PKCS7_verify
+_libre_PKCS7_get0_signers
+_libre_PKCS7_encrypt
+_libre_PKCS7_decrypt
+_libre_PKCS7_add_attrib_smimecap
+_libre_PKCS7_get_smimecap
+_libre_PKCS7_simple_smimecap
+_libre_PKCS7_add_attrib_content_type
+_libre_PKCS7_add0_attrib_signing_time
+_libre_PKCS7_add1_attrib_digest
+_libre_SMIME_write_PKCS7
+_libre_SMIME_read_PKCS7
+_libre_BIO_new_PKCS7
+_libre_ERR_load_PKCS7_strings
diff --git a/lib/libcrypto/hidden/openssl/pkcs7.h b/lib/libcrypto/hidden/openssl/pkcs7.h
new file mode 100644 (file)
index 0000000..147047b
--- /dev/null
@@ -0,0 +1,126 @@
+/* $OpenBSD: pkcs7.h,v 1.1 2022/11/12 12:11:14 beck Exp $ */
+/*
+ * Copyright (c) 2022 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_PKCS7_H
+#define _LIBCRYPTO_PKCS7_H
+
+#include_next <openssl/pkcs7.h>
+#include "crypto_namespace.h"
+
+LCRYPTO_USED(PKCS7_ISSUER_AND_SERIAL_new);
+LCRYPTO_USED(PKCS7_ISSUER_AND_SERIAL_free);
+LCRYPTO_USED(d2i_PKCS7_ISSUER_AND_SERIAL);
+LCRYPTO_USED(i2d_PKCS7_ISSUER_AND_SERIAL);
+LCRYPTO_USED(PKCS7_ISSUER_AND_SERIAL_digest);
+LCRYPTO_USED(d2i_PKCS7_fp);
+LCRYPTO_USED(i2d_PKCS7_fp);
+LCRYPTO_USED(PKCS7_dup);
+LCRYPTO_USED(d2i_PKCS7_bio);
+LCRYPTO_USED(i2d_PKCS7_bio);
+LCRYPTO_USED(i2d_PKCS7_bio_stream);
+LCRYPTO_USED(PEM_write_bio_PKCS7_stream);
+LCRYPTO_USED(PKCS7_SIGNER_INFO_new);
+LCRYPTO_USED(PKCS7_SIGNER_INFO_free);
+LCRYPTO_USED(d2i_PKCS7_SIGNER_INFO);
+LCRYPTO_USED(i2d_PKCS7_SIGNER_INFO);
+LCRYPTO_USED(PKCS7_RECIP_INFO_new);
+LCRYPTO_USED(PKCS7_RECIP_INFO_free);
+LCRYPTO_USED(d2i_PKCS7_RECIP_INFO);
+LCRYPTO_USED(i2d_PKCS7_RECIP_INFO);
+LCRYPTO_USED(PKCS7_SIGNED_new);
+LCRYPTO_USED(PKCS7_SIGNED_free);
+LCRYPTO_USED(d2i_PKCS7_SIGNED);
+LCRYPTO_USED(i2d_PKCS7_SIGNED);
+LCRYPTO_USED(PKCS7_ENC_CONTENT_new);
+LCRYPTO_USED(PKCS7_ENC_CONTENT_free);
+LCRYPTO_USED(d2i_PKCS7_ENC_CONTENT);
+LCRYPTO_USED(i2d_PKCS7_ENC_CONTENT);
+LCRYPTO_USED(PKCS7_ENVELOPE_new);
+LCRYPTO_USED(PKCS7_ENVELOPE_free);
+LCRYPTO_USED(d2i_PKCS7_ENVELOPE);
+LCRYPTO_USED(i2d_PKCS7_ENVELOPE);
+LCRYPTO_USED(PKCS7_SIGN_ENVELOPE_new);
+LCRYPTO_USED(PKCS7_SIGN_ENVELOPE_free);
+LCRYPTO_USED(d2i_PKCS7_SIGN_ENVELOPE);
+LCRYPTO_USED(i2d_PKCS7_SIGN_ENVELOPE);
+LCRYPTO_USED(PKCS7_DIGEST_new);
+LCRYPTO_USED(PKCS7_DIGEST_free);
+LCRYPTO_USED(d2i_PKCS7_DIGEST);
+LCRYPTO_USED(i2d_PKCS7_DIGEST);
+LCRYPTO_USED(PKCS7_ENCRYPT_new);
+LCRYPTO_USED(PKCS7_ENCRYPT_free);
+LCRYPTO_USED(d2i_PKCS7_ENCRYPT);
+LCRYPTO_USED(i2d_PKCS7_ENCRYPT);
+LCRYPTO_USED(PKCS7_new);
+LCRYPTO_USED(PKCS7_free);
+LCRYPTO_USED(d2i_PKCS7);
+LCRYPTO_USED(i2d_PKCS7);
+LCRYPTO_USED(i2d_PKCS7_NDEF);
+LCRYPTO_USED(PKCS7_print_ctx);
+LCRYPTO_USED(PKCS7_ctrl);
+LCRYPTO_USED(PKCS7_set_type);
+LCRYPTO_USED(PKCS7_set0_type_other);
+LCRYPTO_USED(PKCS7_set_content);
+LCRYPTO_USED(PKCS7_SIGNER_INFO_set);
+LCRYPTO_USED(PKCS7_SIGNER_INFO_sign);
+LCRYPTO_USED(PKCS7_add_signer);
+LCRYPTO_USED(PKCS7_add_certificate);
+LCRYPTO_USED(PKCS7_add_crl);
+LCRYPTO_USED(PKCS7_content_new);
+LCRYPTO_USED(PKCS7_dataVerify);
+LCRYPTO_USED(PKCS7_signatureVerify);
+LCRYPTO_USED(PKCS7_dataInit);
+LCRYPTO_USED(PKCS7_dataFinal);
+LCRYPTO_USED(PKCS7_dataDecode);
+LCRYPTO_USED(PKCS7_add_signature);
+LCRYPTO_USED(PKCS7_cert_from_signer_info);
+LCRYPTO_USED(PKCS7_set_digest);
+LCRYPTO_USED(PKCS7_get_signer_info);
+LCRYPTO_USED(PKCS7_add_recipient);
+LCRYPTO_USED(PKCS7_SIGNER_INFO_get0_algs);
+LCRYPTO_USED(PKCS7_RECIP_INFO_get0_alg);
+LCRYPTO_USED(PKCS7_add_recipient_info);
+LCRYPTO_USED(PKCS7_RECIP_INFO_set);
+LCRYPTO_USED(PKCS7_set_cipher);
+LCRYPTO_USED(PKCS7_stream);
+LCRYPTO_USED(PKCS7_get_issuer_and_serial);
+LCRYPTO_USED(PKCS7_digest_from_attributes);
+LCRYPTO_USED(PKCS7_add_signed_attribute);
+LCRYPTO_USED(PKCS7_add_attribute);
+LCRYPTO_USED(PKCS7_get_attribute);
+LCRYPTO_USED(PKCS7_get_signed_attribute);
+LCRYPTO_USED(PKCS7_set_signed_attributes);
+LCRYPTO_USED(PKCS7_set_attributes);
+LCRYPTO_USED(PKCS7_sign);
+LCRYPTO_USED(PKCS7_sign_add_signer);
+LCRYPTO_USED(PKCS7_final);
+LCRYPTO_USED(PKCS7_verify);
+LCRYPTO_USED(PKCS7_get0_signers);
+LCRYPTO_USED(PKCS7_encrypt);
+LCRYPTO_USED(PKCS7_decrypt);
+LCRYPTO_USED(PKCS7_add_attrib_smimecap);
+LCRYPTO_USED(PKCS7_get_smimecap);
+LCRYPTO_USED(PKCS7_simple_smimecap);
+LCRYPTO_USED(PKCS7_add_attrib_content_type);
+LCRYPTO_USED(PKCS7_add0_attrib_signing_time);
+LCRYPTO_USED(PKCS7_add1_attrib_digest);
+LCRYPTO_USED(SMIME_write_PKCS7);
+LCRYPTO_USED(SMIME_read_PKCS7);
+LCRYPTO_USED(BIO_new_PKCS7);
+LCRYPTO_USED(ERR_load_PKCS7_strings);
+
+#endif /* _LIBCRYPTO_PKCS7_H */
index ad3c5e2..5f02535 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: bio_pk7.c,v 1.5 2016/12/30 15:38:13 jsing Exp $ */
+/* $OpenBSD: bio_pk7.c,v 1.6 2022/11/12 12:11:14 beck Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project.
  */
@@ -64,3 +64,4 @@ BIO_new_PKCS7(BIO *out, PKCS7 *p7)
 {
        return BIO_new_NDEF(out, (ASN1_VALUE *)p7, &PKCS7_it);
 }
+LCRYPTO_ALIAS(BIO_new_PKCS7)
index 6665905..b0c4ee8 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_asn1.c,v 1.13 2022/01/14 08:16:13 tb Exp $ */
+/* $OpenBSD: pk7_asn1.c,v 1.14 2022/11/12 12:11:14 beck Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2000.
  */
@@ -221,36 +221,42 @@ d2i_PKCS7(PKCS7 **a, const unsigned char **in, long len)
        return (PKCS7 *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7)
 
 int
 i2d_PKCS7(PKCS7 *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7)
 
 PKCS7 *
 PKCS7_new(void)
 {
        return (PKCS7 *)ASN1_item_new(&PKCS7_it);
 }
+LCRYPTO_ALIAS(PKCS7_new)
 
 void
 PKCS7_free(PKCS7 *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_it);
 }
+LCRYPTO_ALIAS(PKCS7_free)
 
 int
 i2d_PKCS7_NDEF(PKCS7 *a, unsigned char **out)
 {
        return ASN1_item_ndef_i2d((ASN1_VALUE *)a, out, &PKCS7_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_NDEF)
 
 PKCS7 *
 PKCS7_dup(PKCS7 *x)
 {
        return ASN1_item_dup(&PKCS7_it, x);
 }
+LCRYPTO_ALIAS(PKCS7_dup)
 
 static const ASN1_TEMPLATE PKCS7_SIGNED_seq_tt[] = {
        {
@@ -314,24 +320,28 @@ d2i_PKCS7_SIGNED(PKCS7_SIGNED **a, const unsigned char **in, long len)
        return (PKCS7_SIGNED *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_SIGNED_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_SIGNED)
 
 int
 i2d_PKCS7_SIGNED(PKCS7_SIGNED *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_SIGNED_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_SIGNED)
 
 PKCS7_SIGNED *
 PKCS7_SIGNED_new(void)
 {
        return (PKCS7_SIGNED *)ASN1_item_new(&PKCS7_SIGNED_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGNED_new)
 
 void
 PKCS7_SIGNED_free(PKCS7_SIGNED *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_SIGNED_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGNED_free)
 
 /* Minor tweak to operation: free up EVP_PKEY */
 static int
@@ -426,24 +436,28 @@ d2i_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO **a, const unsigned char **in, long len)
        return (PKCS7_SIGNER_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_SIGNER_INFO_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_SIGNER_INFO)
 
 int
 i2d_PKCS7_SIGNER_INFO(PKCS7_SIGNER_INFO *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_SIGNER_INFO_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_SIGNER_INFO)
 
 PKCS7_SIGNER_INFO *
 PKCS7_SIGNER_INFO_new(void)
 {
        return (PKCS7_SIGNER_INFO *)ASN1_item_new(&PKCS7_SIGNER_INFO_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGNER_INFO_new)
 
 void
 PKCS7_SIGNER_INFO_free(PKCS7_SIGNER_INFO *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_SIGNER_INFO_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGNER_INFO_free)
 
 static const ASN1_TEMPLATE PKCS7_ISSUER_AND_SERIAL_seq_tt[] = {
        {
@@ -479,24 +493,28 @@ d2i_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL **a, const unsigned char **i
        return (PKCS7_ISSUER_AND_SERIAL *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_ISSUER_AND_SERIAL_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_ISSUER_AND_SERIAL)
 
 int
 i2d_PKCS7_ISSUER_AND_SERIAL(PKCS7_ISSUER_AND_SERIAL *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ISSUER_AND_SERIAL_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_ISSUER_AND_SERIAL)
 
 PKCS7_ISSUER_AND_SERIAL *
 PKCS7_ISSUER_AND_SERIAL_new(void)
 {
        return (PKCS7_ISSUER_AND_SERIAL *)ASN1_item_new(&PKCS7_ISSUER_AND_SERIAL_it);
 }
+LCRYPTO_ALIAS(PKCS7_ISSUER_AND_SERIAL_new)
 
 void
 PKCS7_ISSUER_AND_SERIAL_free(PKCS7_ISSUER_AND_SERIAL *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_ISSUER_AND_SERIAL_it);
 }
+LCRYPTO_ALIAS(PKCS7_ISSUER_AND_SERIAL_free)
 
 static const ASN1_TEMPLATE PKCS7_ENVELOPE_seq_tt[] = {
        {
@@ -539,24 +557,28 @@ d2i_PKCS7_ENVELOPE(PKCS7_ENVELOPE **a, const unsigned char **in, long len)
        return (PKCS7_ENVELOPE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_ENVELOPE)
 
 int
 i2d_PKCS7_ENVELOPE(PKCS7_ENVELOPE *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_ENVELOPE)
 
 PKCS7_ENVELOPE *
 PKCS7_ENVELOPE_new(void)
 {
        return (PKCS7_ENVELOPE *)ASN1_item_new(&PKCS7_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENVELOPE_new)
 
 void
 PKCS7_ENVELOPE_free(PKCS7_ENVELOPE *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENVELOPE_free)
 
 /* Minor tweak to operation: free up X509 */
 static int
@@ -625,24 +647,28 @@ d2i_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO **a, const unsigned char **in, long len)
        return (PKCS7_RECIP_INFO *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_RECIP_INFO_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_RECIP_INFO)
 
 int
 i2d_PKCS7_RECIP_INFO(PKCS7_RECIP_INFO *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_RECIP_INFO_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_RECIP_INFO)
 
 PKCS7_RECIP_INFO *
 PKCS7_RECIP_INFO_new(void)
 {
        return (PKCS7_RECIP_INFO *)ASN1_item_new(&PKCS7_RECIP_INFO_it);
 }
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_new)
 
 void
 PKCS7_RECIP_INFO_free(PKCS7_RECIP_INFO *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_RECIP_INFO_it);
 }
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_free)
 
 static const ASN1_TEMPLATE PKCS7_ENC_CONTENT_seq_tt[] = {
        {
@@ -685,24 +711,28 @@ d2i_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT **a, const unsigned char **in, long len)
        return (PKCS7_ENC_CONTENT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_ENC_CONTENT_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_ENC_CONTENT)
 
 int
 i2d_PKCS7_ENC_CONTENT(PKCS7_ENC_CONTENT *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ENC_CONTENT_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_ENC_CONTENT)
 
 PKCS7_ENC_CONTENT *
 PKCS7_ENC_CONTENT_new(void)
 {
        return (PKCS7_ENC_CONTENT *)ASN1_item_new(&PKCS7_ENC_CONTENT_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENC_CONTENT_new)
 
 void
 PKCS7_ENC_CONTENT_free(PKCS7_ENC_CONTENT *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_ENC_CONTENT_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENC_CONTENT_free)
 
 static const ASN1_TEMPLATE PKCS7_SIGN_ENVELOPE_seq_tt[] = {
        {
@@ -773,24 +803,28 @@ d2i_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE **a, const unsigned char **in, long
        return (PKCS7_SIGN_ENVELOPE *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_SIGN_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_SIGN_ENVELOPE)
 
 int
 i2d_PKCS7_SIGN_ENVELOPE(PKCS7_SIGN_ENVELOPE *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_SIGN_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_SIGN_ENVELOPE)
 
 PKCS7_SIGN_ENVELOPE *
 PKCS7_SIGN_ENVELOPE_new(void)
 {
        return (PKCS7_SIGN_ENVELOPE *)ASN1_item_new(&PKCS7_SIGN_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGN_ENVELOPE_new)
 
 void
 PKCS7_SIGN_ENVELOPE_free(PKCS7_SIGN_ENVELOPE *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_SIGN_ENVELOPE_it);
 }
+LCRYPTO_ALIAS(PKCS7_SIGN_ENVELOPE_free)
 
 static const ASN1_TEMPLATE PKCS7_ENCRYPT_seq_tt[] = {
        {
@@ -826,24 +860,28 @@ d2i_PKCS7_ENCRYPT(PKCS7_ENCRYPT **a, const unsigned char **in, long len)
        return (PKCS7_ENCRYPT *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_ENCRYPT_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_ENCRYPT)
 
 int
 i2d_PKCS7_ENCRYPT(PKCS7_ENCRYPT *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_ENCRYPT_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_ENCRYPT)
 
 PKCS7_ENCRYPT *
 PKCS7_ENCRYPT_new(void)
 {
        return (PKCS7_ENCRYPT *)ASN1_item_new(&PKCS7_ENCRYPT_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENCRYPT_new)
 
 void
 PKCS7_ENCRYPT_free(PKCS7_ENCRYPT *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_ENCRYPT_it);
 }
+LCRYPTO_ALIAS(PKCS7_ENCRYPT_free)
 
 static const ASN1_TEMPLATE PKCS7_DIGEST_seq_tt[] = {
        {
@@ -893,24 +931,28 @@ d2i_PKCS7_DIGEST(PKCS7_DIGEST **a, const unsigned char **in, long len)
        return (PKCS7_DIGEST *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,
            &PKCS7_DIGEST_it);
 }
+LCRYPTO_ALIAS(d2i_PKCS7_DIGEST)
 
 int
 i2d_PKCS7_DIGEST(PKCS7_DIGEST *a, unsigned char **out)
 {
        return ASN1_item_i2d((ASN1_VALUE *)a, out, &PKCS7_DIGEST_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_DIGEST)
 
 PKCS7_DIGEST *
 PKCS7_DIGEST_new(void)
 {
        return (PKCS7_DIGEST *)ASN1_item_new(&PKCS7_DIGEST_it);
 }
+LCRYPTO_ALIAS(PKCS7_DIGEST_new)
 
 void
 PKCS7_DIGEST_free(PKCS7_DIGEST *a)
 {
        ASN1_item_free((ASN1_VALUE *)a, &PKCS7_DIGEST_it);
 }
+LCRYPTO_ALIAS(PKCS7_DIGEST_free)
 
 /* Specials for authenticated attributes */
 
@@ -965,3 +1007,41 @@ PKCS7_print_ctx(BIO *out, PKCS7 *x, int indent, const ASN1_PCTX *pctx)
        return ASN1_item_print(out, (ASN1_VALUE *)x, indent,
            &PKCS7_it, pctx);
 }
+LCRYPTO_ALIAS(PKCS7_print_ctx)
+
+PKCS7 *
+d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
+{
+       return ASN1_item_d2i_bio(&PKCS7_it, bp, p7);
+}
+LCRYPTO_ALIAS(d2i_PKCS7_bio)
+
+int
+i2d_PKCS7_bio(BIO *bp, PKCS7 *p7)
+{
+       return ASN1_item_i2d_bio(&PKCS7_it, bp, p7);
+}
+LCRYPTO_ALIAS(i2d_PKCS7_bio)
+
+PKCS7 *
+d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
+{
+       return ASN1_item_d2i_fp(&PKCS7_it, fp, p7);
+}
+LCRYPTO_ALIAS(d2i_PKCS7_fp)
+
+int
+i2d_PKCS7_fp(FILE *fp, PKCS7 *p7)
+{
+       return ASN1_item_i2d_fp(&PKCS7_it, fp, p7);
+}
+LCRYPTO_ALIAS(i2d_PKCS7_fp)
+
+int
+PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
+    const EVP_MD *type, unsigned char *md, unsigned int *len)
+{
+       return(ASN1_item_digest(&PKCS7_ISSUER_AND_SERIAL_it, type,
+           (char *)data, md, len));
+}
+LCRYPTO_ALIAS(PKCS7_ISSUER_AND_SERIAL_digest)
index f882ba7..1a5dc06 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_attr.c,v 1.12 2017/01/29 17:49:23 beck Exp $ */
+/* $OpenBSD: pk7_attr.c,v 1.13 2022/11/12 12:11:14 beck Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project 2001.
  */
@@ -79,6 +79,7 @@ PKCS7_add_attrib_smimecap(PKCS7_SIGNER_INFO *si, STACK_OF(X509_ALGOR) *cap)
        return PKCS7_add_signed_attribute(si, NID_SMIMECapabilities,
            V_ASN1_SEQUENCE, seq);
 }
+LCRYPTO_ALIAS(PKCS7_add_attrib_smimecap)
 
 STACK_OF(X509_ALGOR) *
 PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
@@ -94,6 +95,7 @@ PKCS7_get_smimecap(PKCS7_SIGNER_INFO *si)
        ASN1_item_d2i(NULL, &p, cap->value.sequence->length,
            &X509_ALGORS_it);
 }
+LCRYPTO_ALIAS(PKCS7_get_smimecap)
 
 /* Basic smime-capabilities OID and optional integer arg */
 int
@@ -130,6 +132,7 @@ err:
        X509_ALGOR_free(alg);
        return 0;
 }
+LCRYPTO_ALIAS(PKCS7_simple_smimecap)
 
 int
 PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
@@ -141,6 +144,7 @@ PKCS7_add_attrib_content_type(PKCS7_SIGNER_INFO *si, ASN1_OBJECT *coid)
        return PKCS7_add_signed_attribute(si, NID_pkcs9_contentType,
            V_ASN1_OBJECT, coid);
 }
+LCRYPTO_ALIAS(PKCS7_add_attrib_content_type)
 
 int
 PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t)
@@ -152,6 +156,7 @@ PKCS7_add0_attrib_signing_time(PKCS7_SIGNER_INFO *si, ASN1_TIME *t)
        return PKCS7_add_signed_attribute(si, NID_pkcs9_signingTime,
            V_ASN1_UTCTIME, t);
 }
+LCRYPTO_ALIAS(PKCS7_add0_attrib_signing_time)
 
 int
 PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, const unsigned char *md,
@@ -170,3 +175,4 @@ PKCS7_add1_attrib_digest(PKCS7_SIGNER_INFO *si, const unsigned char *md,
        }
        return 1;
 }
+LCRYPTO_ALIAS(PKCS7_add1_attrib_digest)
index b314069..643cb4c 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_doit.c,v 1.47 2022/05/09 19:19:33 jsing Exp $ */
+/* $OpenBSD: pk7_doit.c,v 1.48 2022/11/12 12:11:14 beck Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -404,6 +404,7 @@ err:
        }
        return (out);
 }
+LCRYPTO_ALIAS(PKCS7_dataInit)
 
 static int
 pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 *pcert)
@@ -629,6 +630,7 @@ err:
        }
        return (out);
 }
+LCRYPTO_ALIAS(PKCS7_dataDecode)
 
 static BIO *
 PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
@@ -857,6 +859,7 @@ err:
        EVP_MD_CTX_cleanup(&ctx_tmp);
        return (ret);
 }
+LCRYPTO_ALIAS(PKCS7_dataFinal)
 
 int
 PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
@@ -915,6 +918,7 @@ err:
        EVP_MD_CTX_cleanup(&mctx);
        return 0;
 }
+LCRYPTO_ALIAS(PKCS7_SIGNER_INFO_sign)
 
 int
 PKCS7_dataVerify(X509_STORE *cert_store, X509_STORE_CTX *ctx, BIO *bio,
@@ -976,6 +980,7 @@ err:
        
        return ret;
 }
+LCRYPTO_ALIAS(PKCS7_dataVerify)
 
 int
 PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, X509 *x509)
@@ -1082,6 +1087,7 @@ err:
        EVP_MD_CTX_cleanup(&mdc_tmp);
        return (ret);
 }
+LCRYPTO_ALIAS(PKCS7_signatureVerify)
 
 PKCS7_ISSUER_AND_SERIAL *
 PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx)
@@ -1104,18 +1110,21 @@ PKCS7_get_issuer_and_serial(PKCS7 *p7, int idx)
        ri = sk_PKCS7_RECIP_INFO_value(rsk, idx);
        return (ri->issuer_and_serial);
 }
+LCRYPTO_ALIAS(PKCS7_get_issuer_and_serial)
 
 ASN1_TYPE *
 PKCS7_get_signed_attribute(PKCS7_SIGNER_INFO *si, int nid)
 {
        return (get_attribute(si->auth_attr, nid));
 }
+LCRYPTO_ALIAS(PKCS7_get_signed_attribute)
 
 ASN1_TYPE *
 PKCS7_get_attribute(PKCS7_SIGNER_INFO *si, int nid)
 {
        return (get_attribute(si->unauth_attr, nid));
 }
+LCRYPTO_ALIAS(PKCS7_get_attribute)
 
 static ASN1_TYPE *
 get_attribute(STACK_OF(X509_ATTRIBUTE) *sk, int nid)
@@ -1146,6 +1155,7 @@ PKCS7_digest_from_attributes(STACK_OF(X509_ATTRIBUTE) *sk)
                return NULL;
        return astype->value.octet_string;
 }
+LCRYPTO_ALIAS(PKCS7_digest_from_attributes)
 
 int
 PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
@@ -1167,6 +1177,7 @@ PKCS7_set_signed_attributes(PKCS7_SIGNER_INFO *p7si,
        }
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_set_signed_attributes)
 
 int
 PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE) *sk)
@@ -1187,6 +1198,7 @@ PKCS7_set_attributes(PKCS7_SIGNER_INFO *p7si, STACK_OF(X509_ATTRIBUTE) *sk)
        }
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_set_attributes)
 
 int
 PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
@@ -1194,12 +1206,14 @@ PKCS7_add_signed_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype,
 {
        return (add_attribute(&(p7si->auth_attr), nid, atrtype, value));
 }
+LCRYPTO_ALIAS(PKCS7_add_signed_attribute)
 
 int
 PKCS7_add_attribute(PKCS7_SIGNER_INFO *p7si, int nid, int atrtype, void *value)
 {
        return (add_attribute(&(p7si->unauth_attr), nid, atrtype, value));
 }
+LCRYPTO_ALIAS(PKCS7_add_attribute)
 
 static int
 add_attribute(STACK_OF(X509_ATTRIBUTE) **sk, int nid, int atrtype, void *value)
index 7e92df1..82268f6 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_lib.c,v 1.23 2021/12/12 21:30:14 tb Exp $ */
+/* $OpenBSD: pk7_lib.c,v 1.24 2022/11/12 12:11:14 beck Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -109,6 +109,7 @@ PKCS7_ctrl(PKCS7 *p7, int cmd, long larg, char *parg)
        }
        return (ret);
 }
+LCRYPTO_ALIAS(PKCS7_ctrl)
 
 int
 PKCS7_content_new(PKCS7 *p7, int type)
@@ -128,6 +129,7 @@ err:
                PKCS7_free(ret);
        return (0);
 }
+LCRYPTO_ALIAS(PKCS7_content_new)
 
 int
 PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data)
@@ -158,6 +160,7 @@ PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data)
 err:
        return (0);
 }
+LCRYPTO_ALIAS(PKCS7_set_content)
 
 int
 PKCS7_set_type(PKCS7 *p7, int type)
@@ -227,6 +230,7 @@ PKCS7_set_type(PKCS7 *p7, int type)
 err:
        return (0);
 }
+LCRYPTO_ALIAS(PKCS7_set_type)
 
 int
 PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other)
@@ -235,6 +239,7 @@ PKCS7_set0_type_other(PKCS7 *p7, int type, ASN1_TYPE *other)
        p7->d.other = other;
        return 1;
 }
+LCRYPTO_ALIAS(PKCS7_set0_type_other)
 
 int
 PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *psi)
@@ -290,6 +295,7 @@ PKCS7_add_signer(PKCS7 *p7, PKCS7_SIGNER_INFO *psi)
                return 0;
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_add_signer)
 
 int
 PKCS7_add_certificate(PKCS7 *p7, X509 *x509)
@@ -323,6 +329,7 @@ PKCS7_add_certificate(PKCS7 *p7, X509 *x509)
        }
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_add_certificate)
 
 int
 PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl)
@@ -357,6 +364,7 @@ PKCS7_add_crl(PKCS7 *p7, X509_CRL *crl)
        }
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_add_crl)
 
 int
 PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
@@ -401,6 +409,7 @@ PKCS7_SIGNER_INFO_set(PKCS7_SIGNER_INFO *p7i, X509 *x509, EVP_PKEY *pkey,
 err:
        return 0;
 }
+LCRYPTO_ALIAS(PKCS7_SIGNER_INFO_set)
 
 PKCS7_SIGNER_INFO *
 PKCS7_add_signature(PKCS7 *p7, X509 *x509, EVP_PKEY *pkey, const EVP_MD *dgst)
@@ -430,6 +439,7 @@ err:
                PKCS7_SIGNER_INFO_free(si);
        return (NULL);
 }
+LCRYPTO_ALIAS(PKCS7_add_signature)
 
 int
 PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md)
@@ -447,6 +457,7 @@ PKCS7_set_digest(PKCS7 *p7, const EVP_MD *md)
        PKCS7error(PKCS7_R_WRONG_CONTENT_TYPE);
        return 1;
 }
+LCRYPTO_ALIAS(PKCS7_set_digest)
 
 STACK_OF(PKCS7_SIGNER_INFO) *
 PKCS7_get_signer_info(PKCS7 *p7)
@@ -460,6 +471,7 @@ PKCS7_get_signer_info(PKCS7 *p7)
        } else
                return (NULL);
 }
+LCRYPTO_ALIAS(PKCS7_get_signer_info)
 
 void
 PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
@@ -472,6 +484,7 @@ PKCS7_SIGNER_INFO_get0_algs(PKCS7_SIGNER_INFO *si, EVP_PKEY **pk,
        if (psig)
                *psig = si->digest_enc_alg;
 }
+LCRYPTO_ALIAS(PKCS7_SIGNER_INFO_get0_algs)
 
 void
 PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc)
@@ -479,6 +492,7 @@ PKCS7_RECIP_INFO_get0_alg(PKCS7_RECIP_INFO *ri, X509_ALGOR **penc)
        if (penc)
                *penc = ri->key_enc_algor;
 }
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_get0_alg)
 
 PKCS7_RECIP_INFO *
 PKCS7_add_recipient(PKCS7 *p7, X509 *x509)
@@ -497,6 +511,7 @@ err:
                PKCS7_RECIP_INFO_free(ri);
        return NULL;
 }
+LCRYPTO_ALIAS(PKCS7_add_recipient)
 
 int
 PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri)
@@ -521,6 +536,7 @@ PKCS7_add_recipient_info(PKCS7 *p7, PKCS7_RECIP_INFO *ri)
                return 0;
        return (1);
 }
+LCRYPTO_ALIAS(PKCS7_add_recipient_info)
 
 int
 PKCS7_RECIP_INFO_set(PKCS7_RECIP_INFO *p7i, X509 *x509)
@@ -567,6 +583,7 @@ err:
        EVP_PKEY_free(pkey);
        return 0;
 }
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_set)
 
 X509 *
 PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si)
@@ -578,6 +595,7 @@ PKCS7_cert_from_signer_info(PKCS7 *p7, PKCS7_SIGNER_INFO *si)
        else
                return (NULL);
 }
+LCRYPTO_ALIAS(PKCS7_cert_from_signer_info)
 
 int
 PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher)
@@ -608,6 +626,7 @@ PKCS7_set_cipher(PKCS7 *p7, const EVP_CIPHER *cipher)
        ec->cipher = cipher;
        return 1;
 }
+LCRYPTO_ALIAS(PKCS7_set_cipher)
 
 int
 PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
@@ -652,3 +671,4 @@ PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
 
        return 1;
 }
+LCRYPTO_ALIAS(PKCS7_stream)
index fad331b..bf7d945 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_mime.c,v 1.13 2016/12/30 15:38:13 jsing Exp $ */
+/* $OpenBSD: pk7_mime.c,v 1.14 2022/11/12 12:11:14 beck Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project.
  */
@@ -66,6 +66,7 @@ i2d_PKCS7_bio_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
        return i2d_ASN1_bio_stream(out, (ASN1_VALUE *)p7, in, flags,
            &PKCS7_it);
 }
+LCRYPTO_ALIAS(i2d_PKCS7_bio_stream)
 
 int
 PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
@@ -73,6 +74,7 @@ PEM_write_bio_PKCS7_stream(BIO *out, PKCS7 *p7, BIO *in, int flags)
        return PEM_write_bio_ASN1_stream(out, (ASN1_VALUE *) p7, in, flags,
            "PKCS7", &PKCS7_it);
 }
+LCRYPTO_ALIAS(PEM_write_bio_PKCS7_stream)
 
 int
 SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
@@ -90,9 +92,11 @@ SMIME_write_PKCS7(BIO *bio, PKCS7 *p7, BIO *data, int flags)
        return SMIME_write_ASN1(bio, (ASN1_VALUE *)p7, data, flags,
            ctype_nid, NID_undef, mdalgs, &PKCS7_it);
 }
+LCRYPTO_ALIAS(SMIME_write_PKCS7)
 
 PKCS7 *
 SMIME_read_PKCS7(BIO *bio, BIO **bcont)
 {
        return (PKCS7 *)SMIME_read_ASN1(bio, bcont, &PKCS7_it);
 }
+LCRYPTO_ALIAS(SMIME_read_PKCS7)
index f11d23e..a667daf 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pk7_smime.c,v 1.23 2021/11/01 20:53:08 tb Exp $ */
+/* $OpenBSD: pk7_smime.c,v 1.24 2022/11/12 12:11:14 beck Exp $ */
 /* Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
  * project.
  */
@@ -111,6 +111,7 @@ err:
        PKCS7_free(p7);
        return NULL;
 }
+LCRYPTO_ALIAS(PKCS7_sign)
 
 int
 PKCS7_final(PKCS7 *p7, BIO *data, int flags)
@@ -139,6 +140,7 @@ err:
 
        return ret;
 }
+LCRYPTO_ALIAS(PKCS7_final)
 
 /* Check to see if a cipher exists and if so add S/MIME capabilities */
 
@@ -221,6 +223,7 @@ err:
                sk_X509_ALGOR_pop_free(smcap, X509_ALGOR_free);
        return NULL;
 }
+LCRYPTO_ALIAS(PKCS7_sign_add_signer)
 
 /* Search for a digest matching SignerInfo digest type and if found
  * copy across.
@@ -423,6 +426,7 @@ err:
 
        return ret;
 }
+LCRYPTO_ALIAS(PKCS7_verify)
 
 STACK_OF(X509) *
 PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
@@ -481,6 +485,7 @@ PKCS7_get0_signers(PKCS7 *p7, STACK_OF(X509) *certs, int flags)
        }
        return signers;
 }
+LCRYPTO_ALIAS(PKCS7_get0_signers)
 
 /* Build a complete PKCS#7 enveloped data */
 
@@ -524,6 +529,7 @@ err:
        PKCS7_free(p7);
        return NULL;
 }
+LCRYPTO_ALIAS(PKCS7_encrypt)
 
 int
 PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
@@ -590,3 +596,4 @@ PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
                return ret;
        }
 }
+LCRYPTO_ALIAS(PKCS7_decrypt)
index bd3791e..d2eab2d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: pkcs7err.c,v 1.13 2022/07/12 14:42:50 kn Exp $ */
+/* $OpenBSD: pkcs7err.c,v 1.14 2022/11/12 12:11:14 beck Exp $ */
 /* ====================================================================
  * Copyright (c) 1999-2007 The OpenSSL Project.  All rights reserved.
  *
@@ -140,3 +140,4 @@ ERR_load_PKCS7_strings(void)
        }
 #endif
 }
+LCRYPTO_ALIAS(ERR_load_PKCS7_strings)
index 0af130f..ec5ed3d 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: x_all.c,v 1.26 2022/06/26 04:14:43 tb Exp $ */
+/* $OpenBSD: x_all.c,v 1.27 2022/11/12 12:11:14 beck Exp $ */
 /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com)
  * All rights reserved.
  *
@@ -123,30 +123,6 @@ i2d_X509_CRL_fp(FILE *fp, X509_CRL *crl)
        return ASN1_item_i2d_fp(&X509_CRL_it, fp, crl);
 }
 
-PKCS7 *
-d2i_PKCS7_bio(BIO *bp, PKCS7 **p7)
-{
-       return ASN1_item_d2i_bio(&PKCS7_it, bp, p7);
-}
-
-int
-i2d_PKCS7_bio(BIO *bp, PKCS7 *p7)
-{
-       return ASN1_item_i2d_bio(&PKCS7_it, bp, p7);
-}
-
-PKCS7 *
-d2i_PKCS7_fp(FILE *fp, PKCS7 **p7)
-{
-       return ASN1_item_d2i_fp(&PKCS7_it, fp, p7);
-}
-
-int
-i2d_PKCS7_fp(FILE *fp, PKCS7 *p7)
-{
-       return ASN1_item_i2d_fp(&PKCS7_it, fp, p7);
-}
-
 X509_REQ *
 d2i_X509_REQ_bio(BIO *bp, X509_REQ **req)
 {
@@ -499,14 +475,6 @@ X509_NAME_digest(const X509_NAME *data, const EVP_MD *type, unsigned char *md,
            md, len));
 }
 
-int
-PKCS7_ISSUER_AND_SERIAL_digest(PKCS7_ISSUER_AND_SERIAL *data,
-    const EVP_MD *type, unsigned char *md, unsigned int *len)
-{
-       return(ASN1_item_digest(&PKCS7_ISSUER_AND_SERIAL_it, type,
-           (char *)data, md, len));
-}
-
 int
 X509_up_ref(X509 *x)
 {