[openssl/openssl] b542f2: test: add low-level OSSL_ENCODER / OSSL_DECODER AP...
"'Jakub Zelenka' 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: b542f2545cc10f6b481fd70600bcb0b8523e09a9
https://github.com/openssl/openssl/commit/b542f2545cc10f6b481fd70600bcb0b8523e09a9
Author: Jakub Zelenka <[email protected]>
Date: 2026-08-27 (Thu, 27 Aug 2026)
Changed paths:
M test/build.info
A test/endecode_api_test.c
M test/recipes/04-test_encoder_decoder.t
Log Message:
-----------
test: add low-level OSSL_ENCODER / OSSL_DECODER API test
Add a test that exercises the encoder and decoder chain processing in
encoder_lib.c and decoder_lib.c through a built-in test provider
implementing a two-stage encoder chain ("TEST-KEY" -> "inter" -> "pem")
and the mirrored decoder chain.
This covers previously untested code paths:
- encoder chaining through abstract objects, including the intermediate
memory BIO handling in encoder_process()
- OSSL_ENCODER_to_fp() and OSSL_DECODER_from_fp()
- OSSL_ENCODER_to_data() edge cases (size query, pre-allocated buffer,
too small buffer)
- OSSL_DECODER_CTX_add_decoder() and OSSL_DECODER_export()
- decoding from a non-seekable BIO (BIO_f_readbuffer wrapping)
- various error paths and NULL argument checks in both APIs
Assisted-by: Claude:claude-fable-5
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Merge-date: Thu Aug 27 13:45:07 2026
Merged-from: https://github.com/openssl/openssl/pull/32019
Commit: 13b0be7cb62e21c23916937999446c00a6cd31f9
https://github.com/openssl/openssl/commit/13b0be7cb62e21c23916937999446c00a6cd31f9
Author: Jakub Zelenka <[email protected]>
Date: 2026-08-27 (Thu, 27 Aug 2026)
Changed paths:
M crypto/encode_decode/encoder_lib.c
M test/endecode_api_test.c
Log Message:
-----------
encoder: pass the data type up through the encoder chain
In encoder_process(), the data type (the name of the encoder
implementation that produced the current encoding) is determined at the
deepest recursion level, but was not propagated up through the
recursion together with the other results of the recursive call. As a
consequence, the abstract object handed to a chained encoder
implementation contained an OSSL_OBJECT_PARAM_DATA_TYPE parameter with
NULL data, in violation of provider-object(7), which specifies it as a
UTF8 string carrying the type of the object content.
This went unnoticed because no encoders provided by OpenSSL itself are
ever chained.
Also extend endecode_api_test to verify that a chained encoder
implementation receives the correct data type.
Assisted-by: Claude:claude-fable-5
Reviewed-by: Matt Caswell <[email protected]>
Reviewed-by: Tomas Mraz <[email protected]>
Merge-date: Thu Aug 27 13:45:07 2026
Merged-from: https://github.com/openssl/openssl/pull/32019
Compare: https://github.com/openssl/openssl/compare/031a8ccf6496...13b0be7cb62e
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/031a8c-13b0be%40github.com.