diff options
| author | Bob Beck <[email protected]> | 2026-08-06 22:31:16 +0200 |
|---|---|---|
| committer | Tomas Mraz <[email protected]> | 2026-09-01 15:56:24 +0200 |
| commit | 2ebd8e127d91f467f3dc868bb4a68f3f9b9c1883 (patch) | |
| tree | 3a77e0d5362430069012bcbdf28cde141a8a5d8c /include | |
| parent | Track the PKCS7 streaming state in the state field, not the ASN1_STRING (diff) | |
| download | openssl-2ebd8e127d91f467f3dc868bb4a68f3f9b9c1883.tar.gz openssl-2ebd8e127d91f467f3dc868bb4a68f3f9b9c1883.zip | |
Do the NDEF streaming setup in the ASN.1 layer, not in CMS and PKCS7
CMS_stream() and PKCS7_stream() marked the content octet string with
ASN1_STRING_FLAG_NDEF and handed BIO_new_NDEF() the address of its data
field, where the encoder records the position of the content. Add an
ASN1_OP_STREAM_CONTENT callback operation through which BIO_new_NDEF()
obtains that string, sets the flag, and reads the position back out, so
both are manipulated only by the ASN.1 code that uses them. What is left
of the two functions becomes ossl_cms_stream() and ossl_pkcs7_stream();
the public ones remain as wrappers but are unused.
Reviewed-by: Andrew Dinh <[email protected]>
Reviewed-by: Viktor Dukhovni <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Merge-date: Tue Sep 1 13:56:42 2026
Merged-from: https://github.com/openssl/openssl/pull/32242
Diffstat (limited to 'include')
| -rw-r--r-- | include/openssl/asn1t.h.in | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/openssl/asn1t.h.in b/include/openssl/asn1t.h.in index ca8bbc2517d..370e062470e 100644 --- a/include/openssl/asn1t.h.in +++ b/include/openssl/asn1t.h.in @@ -747,6 +747,7 @@ typedef struct ASN1_STREAM_ARG_st { #define ASN1_OP_DUP_POST 15 #define ASN1_OP_GET0_LIBCTX 16 #define ASN1_OP_GET0_PROPQ 17 +#define ASN1_OP_GET0_STREAM_CONTENT 18 /* Macro to implement a primitive type */ #define IMPLEMENT_ASN1_TYPE(stname) IMPLEMENT_ASN1_TYPE_ex(stname, stname, 0) |
