Add PKCS7_bundle_certificates.
This function serialises a PKCS#7 structure containing a number of
certificates.
Change-Id: Iaf15887e1060d5d201d5a3dd3dca8d51105ee6d6
Reviewed-on: https://boringssl-review.googlesource.com/1431
Reviewed-by: Adam Langley <agl@google.com>
diff --git a/include/openssl/x509.h b/include/openssl/x509.h
index 058bbff..ac23f9c 100644
--- a/include/openssl/x509.h
+++ b/include/openssl/x509.h
@@ -1195,6 +1195,11 @@
* and zero on error. */
OPENSSL_EXPORT int PKCS7_get_certificates(STACK_OF(X509) *out_certs, CBS *cbs);
+/* PKCS7_bundle_certificates appends a PKCS#7, SignedData structure containing
+ * |certs| to |cbb|. It returns one on success and zero on error. */
+OPENSSL_EXPORT int PKCS7_bundle_certificates(
+ CBB *out, const STACK_OF(X509) *certs);
+
/* EVP_PK values indicate the algorithm of the public key in a certificate. */