Files
Bob BeckandNorbert Pocs 68c0321e90 Provide ASN1_STRING_new_not_owned()
This function provides the ability to construct an ASN1_STRING
containing data that is not owned by the constructed ASN1_STRING. The
resulting ASN1_STRING, when freed, will not free the data, and it is
the caller's resposibility to ensure that the data lives past the
lifetime of any returned ASN1_STRING.

Why? you may ask? Many places where ->data and ->length were used
directly in the past before the opaquification of ASN1_STRING were
for this purpose, whether used for actual static data, or to turn
bytes created by and in control of the caller into an ASN1_STRING
for temporary use as an input. This function makes this easier
to do without making copies.

The function deliberately does not allow the creation of a BIT_STRING
as this would require also always providing unused bits, which is
annoying and unnecessary for almost all potential use cases.

For: https://github.com/openssl/openssl/issues/29861
For: https://github.com/openssl/openssl/issues/30162

Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Wed Jun  3 11:42:49 2026
(Merged from https://github.com/openssl/openssl/pull/30964)
2026-06-03 13:41:32 +02:00
..
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-06-03 13:41:32 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-06 13:35:24 +02:00
2026-05-06 13:35:24 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-10 11:53:33 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-10 11:53:33 +02:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-06 13:35:24 +02:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2025-12-12 09:08:33 +01:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-06 13:35:24 +02:00
2026-03-10 14:37:52 +00:00
2026-05-27 11:08:08 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-06 13:35:24 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-05-06 13:35:24 +02:00
2026-03-10 14:37:52 +00:00
2026-05-06 13:35:24 +02:00
2026-05-06 13:35:24 +02:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00
2026-05-10 11:53:33 +02:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2025-12-09 00:28:19 -07:00
2026-03-10 14:37:52 +00:00
2026-03-10 14:37:52 +00:00
2025-12-09 00:28:19 -07:00