_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
--- /dev/null
+/* $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 */
-/* $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.
*/
{
return BIO_new_NDEF(out, (ASN1_VALUE *)p7, &PKCS7_it);
}
+LCRYPTO_ALIAS(BIO_new_PKCS7)
-/* $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.
*/
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[] = {
{
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
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[] = {
{
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[] = {
{
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
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[] = {
{
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[] = {
{
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[] = {
{
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[] = {
{
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 */
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)
-/* $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.
*/
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)
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
X509_ALGOR_free(alg);
return 0;
}
+LCRYPTO_ALIAS(PKCS7_simple_smimecap)
int
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)
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,
}
return 1;
}
+LCRYPTO_ALIAS(PKCS7_add1_attrib_digest)
-/* $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.
*
}
return (out);
}
+LCRYPTO_ALIAS(PKCS7_dataInit)
static int
pkcs7_cmp_ri(PKCS7_RECIP_INFO *ri, X509 *pcert)
}
return (out);
}
+LCRYPTO_ALIAS(PKCS7_dataDecode)
static BIO *
PKCS7_find_digest(EVP_MD_CTX **pmd, BIO *bio, int nid)
EVP_MD_CTX_cleanup(&ctx_tmp);
return (ret);
}
+LCRYPTO_ALIAS(PKCS7_dataFinal)
int
PKCS7_SIGNER_INFO_sign(PKCS7_SIGNER_INFO *si)
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,
return ret;
}
+LCRYPTO_ALIAS(PKCS7_dataVerify)
int
PKCS7_signatureVerify(BIO *bio, PKCS7 *p7, PKCS7_SIGNER_INFO *si, X509 *x509)
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)
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)
return NULL;
return astype->value.octet_string;
}
+LCRYPTO_ALIAS(PKCS7_digest_from_attributes)
int
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)
}
return (1);
}
+LCRYPTO_ALIAS(PKCS7_set_attributes)
int
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)
-/* $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.
*
}
return (ret);
}
+LCRYPTO_ALIAS(PKCS7_ctrl)
int
PKCS7_content_new(PKCS7 *p7, int type)
PKCS7_free(ret);
return (0);
}
+LCRYPTO_ALIAS(PKCS7_content_new)
int
PKCS7_set_content(PKCS7 *p7, PKCS7 *p7_data)
err:
return (0);
}
+LCRYPTO_ALIAS(PKCS7_set_content)
int
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)
p7->d.other = other;
return 1;
}
+LCRYPTO_ALIAS(PKCS7_set0_type_other)
int
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)
}
return (1);
}
+LCRYPTO_ALIAS(PKCS7_add_certificate)
int
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,
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)
PKCS7_SIGNER_INFO_free(si);
return (NULL);
}
+LCRYPTO_ALIAS(PKCS7_add_signature)
int
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)
} else
return (NULL);
}
+LCRYPTO_ALIAS(PKCS7_get_signer_info)
void
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)
if (penc)
*penc = ri->key_enc_algor;
}
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_get0_alg)
PKCS7_RECIP_INFO *
PKCS7_add_recipient(PKCS7 *p7, X509 *x509)
PKCS7_RECIP_INFO_free(ri);
return NULL;
}
+LCRYPTO_ALIAS(PKCS7_add_recipient)
int
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)
EVP_PKEY_free(pkey);
return 0;
}
+LCRYPTO_ALIAS(PKCS7_RECIP_INFO_set)
X509 *
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)
ec->cipher = cipher;
return 1;
}
+LCRYPTO_ALIAS(PKCS7_set_cipher)
int
PKCS7_stream(unsigned char ***boundary, PKCS7 *p7)
return 1;
}
+LCRYPTO_ALIAS(PKCS7_stream)
-/* $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.
*/
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)
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)
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)
-/* $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.
*/
PKCS7_free(p7);
return NULL;
}
+LCRYPTO_ALIAS(PKCS7_sign)
int
PKCS7_final(PKCS7 *p7, BIO *data, int flags)
return ret;
}
+LCRYPTO_ALIAS(PKCS7_final)
/* Check to see if a cipher exists and if so add S/MIME capabilities */
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.
return ret;
}
+LCRYPTO_ALIAS(PKCS7_verify)
STACK_OF(X509) *
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 */
PKCS7_free(p7);
return NULL;
}
+LCRYPTO_ALIAS(PKCS7_encrypt)
int
PKCS7_decrypt(PKCS7 *p7, EVP_PKEY *pkey, X509 *cert, BIO *data, int flags)
return ret;
}
}
+LCRYPTO_ALIAS(PKCS7_decrypt)
-/* $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.
*
}
#endif
}
+LCRYPTO_ALIAS(ERR_load_PKCS7_strings)
-/* $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.
*
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)
{
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)
{