[openssl/openssl] 30db55: util: set thunks for sk_${nametype}_new(_reserve)
"'nikolapajkovsky' via openssl-commits" <[email protected]>
| Newsgroups | gmane.comp.encryption.openssl.cvs |
|---|---|
| Message-ID | <openssl/openssl/push/refs/heads/master/[email protected]> |
Branch: refs/heads/master
Home: https://github.com/openssl/openssl
Commit: 30db55ac33cf6b815067149c233f45e4199df9b0
https://github.com/openssl/openssl/commit/30db55ac33cf6b815067149c233f45e4199df9b0
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M util/perl/OpenSSL/stackhash.pm
Log Message:
-----------
util: set thunks for sk_${nametype}_new(_reserve)
call OPENSSL_sk_set_thunks for sk_${nametype}_new and
sk_${nametype}_new_reserve, and wrap the long generated stack
constructor and deep-copy macros across multiple lines so the nested
thunk setup is easier to read and maintain.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:46 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: a1e4bd14e59e62943fe048b944eac894cd0d8489
https://github.com/openssl/openssl/commit/a1e4bd14e59e62943fe048b944eac894cd0d8489
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M include/openssl/safestack.h.in
M test/stack_test.c
M util/perl/OpenSSL/stackhash.pm
Log Message:
-----------
preserve stack thunks across sk_TYPE_dup
ensure typed stack duplicates keep their compare, copy, and free thunks so
later operations do not call typed callbacks through erased void * function
pointer signatures.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:48 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: b3003ff1ecac4118d5779f4917c684d83c9c091a
https://github.com/openssl/openssl/commit/b3003ff1ecac4118d5779f4917c684d83c9c091a
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M include/openssl/ocsp.h.in
Log Message:
-----------
fix function pointer type mismatch in OCSP_REQUEST/RESPONSE bio macros
d2i_OCSP_REQUEST/d2i_OCSP_RESPONSE are declared with type-specific
signatures returning OCSP_REQUEST*/OCSP_RESPONSE*, but the
d2i_OCSP_{REQUEST,RESPONSE}_bio macros routed them through
ASN1_d2i_bio_of -> ASN1_d2i_bio, which calls them via a
d2i_of_void* pointer:
void *(*)(void **, const unsigned char **, long)
The analogous i2d_OCSP_{REQUEST,RESPONSE}_bio macros did the same
through ASN1_i2d_bio_of -> ASN1_i2d_bio with i2d_of_void*.
Rewrite the macros to dispatch through
ASN1_item_d2i_bio/ASN1_item_i2d_bio with ASN1_ITEM_rptr(OCSP_*)
directly. This eliminates the function-pointer cast entirely; both old
and new paths bottom out in the same ASN1_item_d2i_ex / ASN1_item_i2d
call, so behavior is identical.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:50 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: 0e8f2844ed3e6c8fde0e5da0db6322735eb6593f
https://github.com/openssl/openssl/commit/0e8f2844ed3e6c8fde0e5da0db6322735eb6593f
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M crypto/pem/pem_info.c
Log Message:
-----------
fix function pointer type mismatch in PEM_X509_INFO_read_bio_ex
PEM_X509_INFO_read_bio_ex stored d2i_X509, d2i_X509_AUX, d2i_X509_CRL
or d2i_AutoPrivateKey -- each with a distinct, type-specific signature
returning X509*, X509_CRL* or EVP_PKEY* -- in a single d2i_of_void*
variable and dispatched through it:
d2i = (D2I_OF(void))d2i_X509;
...
d2i(pp, &p, len)
Replace the function-pointer dispatch with an enum tag
(pem_info_type) and a switch that calls each typed d2i_* directly
with the correctly type.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:53 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: ba15a13ffeca1e8b1a3042bdd383c3d45e7906d1
https://github.com/openssl/openssl/commit/ba15a13ffeca1e8b1a3042bdd383c3d45e7906d1
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M providers/implementations/encode_decode/decode_der2key.c
Log Message:
-----------
decode_der2key: wrap key-free callbacks to avoid function pointer casts
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:55 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: f6efce32a024298a1b3d87ec4914d49bcab34366
https://github.com/openssl/openssl/commit/f6efce32a024298a1b3d87ec4914d49bcab34366
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M include/openssl/pem.h
Log Message:
-----------
avoid mismatched d2i callbacks in PEM readers
decode PEM payloads through the generated typed d2i_* functions in the
PEM read macros instead of routing them through the d2i_of_void
callback path. This avoids UBSan function type mismatch reports while
preserving the public PEM reader APIs.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:57 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: ad47ffd79af936d06e7978b9c2984a2a33845135
https://github.com/openssl/openssl/commit/ad47ffd79af936d06e7978b9c2984a2a33845135
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M crypto/x509/v3_genn.c
Log Message:
-----------
avoid d2i_of_void asn1 callbacks in GENERAL_NAME_dup
use IMPLEMENT_ASN1_DUP_FUNCTION(GENERAL_NAME) so duplication goes
through ASN1_item_dup() instead of calling ASN1_dup() with cast
i2d/d2i function pointers. This avoids UBSan function type errors
while preserving the public GENERAL_NAME_dup() API.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:12:59 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Commit: c392d3052f63fa3f2d8f36723ec07dd5ff90b748
https://github.com/openssl/openssl/commit/c392d3052f63fa3f2d8f36723ec07dd5ff90b748
Author: Nikola Pajkovsky <[email protected]>
Date: 2026-06-25 (Thu, 25 Jun 2026)
Changed paths:
M crypto/x509/x_all.c
Log Message:
-----------
x_all.c: avoid mismatched d2i/i2d function pointer casts
the d2i_*/i2d_* fp and bio wrappers for RSA_PUBKEY, the DSA and EC key
types, and the EVP_PKEY Private/PUBKEY converters passed their
type-specific functions to ASN1_{d2i,i2d}_{fp,bio}, which invoke them
through the generic d2i_of_void / i2d_of_void / void *(*)(void) pointer
types.
Add file-local thunks with the exact generic signatures that forward to
the concrete functions, and pass those instead of cast pointers. This
removes the mismatched calls while keeping the public API unchanged.
Signed-off-by: Nikola Pajkovsky <[email protected]>
Reviewed-by: Neil Horman <[email protected]>
Reviewed-by: Milan Broz <[email protected]>
MergeDate: Thu Jun 25 12:13:01 2026
(Merged from https://github.com/openssl/openssl/pull/31523)
Compare: https://github.com/openssl/openssl/compare/c60fddbbcf88...c392d3052f63
To unsubscribe from these emails, change your notification settings at https://github.com/openssl/openssl/settings/notifications
--
You received this message because you are subscribed to the Google Groups "openssl-commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To view this discussion visit https://groups.google.com/a/openssl.org/d/msgid/openssl-commits/openssl/openssl/push/refs/heads/master/c60fdd-c392d3%40github.com.