5790 Commits

Author SHA1 Message Date
Igor Ustinov e6fe06a719 Added the EVP_EC_affine2oct() helper function
This function converts affine coordinates of an EC point
to an octet string conforming to Sec. 2.3.4
of the SECG SEC 1 ("Elliptic Curve Cryptography") standard.

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Simo Sorce <simo@redhat.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed May  6 16:47:57 2026
(Merged from https://github.com/openssl/openssl/pull/30597)
2026-05-06 18:46:51 +02:00
kovan bd85fd7cde doc: add documentation for BIO_nread0, BIO_nread, BIO_nwrite0, BIO_nwrite
Document the non-copying interface functions for BIO pairs that allow
direct access to the internal buffer:
- BIO_nread0/BIO_nread for zero-copy reading
- BIO_nwrite0/BIO_nwrite for zero-copy writing

Also add return value documentation for these functions and remove
the placeholder "[XXXXX: More return values need to be added here]".

Fixes #16366

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed May  6 14:51:27 2026
(Merged from https://github.com/openssl/openssl/pull/29849)
2026-05-06 16:50:52 +02:00
Nyveruus c5908ee434 Fix missing pointers in SSL_CTX_set_session_cache_mode synopsis
SSL_CTX_set_session_cache_mode and SSL_CTX_get_session_cache_mode
were documented with SSL_CTX ctx instead of SSL_CTX *ctx in their
synopsis.

CLA: trivial

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed May  6 11:53:35 2026
(Merged from https://github.com/openssl/openssl/pull/30965)
2026-05-06 13:53:28 +02:00
slontis e483d93b39 Doc: Add documentation for existing Hybrid ML_KEM algorithms used by
TLS1.3.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Mon May  4 11:51:12 2026
(Merged from https://github.com/openssl/openssl/pull/30037)
2026-05-04 07:51:09 -04:00
kovan 69e54bee8d doc: Add documentation for X509_STORE_CTX_set_time
Document the X509_STORE_CTX_set_time() function which sets the
verification time for certificate chain validation. This is a
convenience wrapper around X509_VERIFY_PARAM_set_time().

Remove X509_STORE_CTX_set_time from missingcrypto.txt and
missingcrypto111.txt.

Fixes #21362

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Sun May  3 15:38:26 2026
(Merged from https://github.com/openssl/openssl/pull/29899)
2026-05-03 17:38:24 +02:00
Eugene Adell 28b235549c demos/guide: switch clients to HTTP/1.1
The Host Header comes with HTTP/1.1, not 1.0, and some
Web Server now doesn't want to answer to such requests.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
MergeDate: Sun May  3 15:21:35 2026
(Merged from https://github.com/openssl/openssl/pull/30981)
2026-05-03 17:21:23 +02:00
Joshua Rogers 5ff19a7297 docs: Document required output buffer length in EVP_CIPHER-DES
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Richard Levitte <levitte@openssl.org>
MergeDate: Sun May  3 13:41:54 2026
(Merged from https://github.com/openssl/openssl/pull/30651)
2026-05-03 15:41:40 +02:00
Eugene Syromiatnikov b3dea427c4 crypto/mem.c: perform the fail check right after counting calls
Otherwise the counting done by shouldfail() does not account for calls
that are diverted to non-standard implementation and zero-sized
allocations, making it diverge from the sum of malloc_count
and realloc_count.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Thu Apr 30 06:59:07 2026
(Merged from https://github.com/openssl/openssl/pull/30991)
2026-04-30 06:58:48 +00:00
andrei2308 e905da2c20 Update description of OSSL_HTTP_adapt_proxy()
Clarify the behavior of OSSL_HTTP_adapt_proxy() regarding proxy determination and exclusion lists.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
MergeDate: Wed Apr 29 15:25:34 2026
(Merged from https://github.com/openssl/openssl/pull/30848)
2026-04-29 17:25:22 +02:00
Michael Richardson 40577e1355 move contents of HACKING.md to a doc/HOWTO
reference list of files and removed -Werror from instructions on adding
functions rename HACKING.md to HOWTO.md.

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Mon Apr 27 06:14:57 2026
(Merged from https://github.com/openssl/openssl/pull/18003)
2026-04-27 06:14:19 +00:00
Joe Orton 11d9ea4ae4 doc/man3/SSL_set1_host.pod: fix Deprecated Functions heading formatting
CLA: trivial
Fixes: f584ae959c "Let's support multiple names for certificate verification"

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Richard Levitte <levitte@openssl.org>
MergeDate: Sun Apr 26 12:59:31 2026
(Merged from https://github.com/openssl/openssl/pull/30834)
2026-04-26 14:58:39 +02:00
Norbert Pocs 41a3fdde52 Deprecate ASN1_BIT_STRING_set()
Replacement: ASN1_BIT_STRING_set1

Signed-off-by: Norbert Pocs <norbertp@openssl.org>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
MergeDate: Sun Apr 26 11:45:27 2026
(Merged from https://github.com/openssl/openssl/pull/30692)
2026-04-26 13:45:20 +02:00
Dmitry Belyavskiy 5e32b3e3fa Document semantic changes for EVP_get_*by* functions
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
(Merged from https://github.com/openssl/openssl/pull/30646)
2026-04-23 16:16:50 +02:00
Joshua Rogers 6e9f47be2e docs: Fix and add documentation about AES-WRAP-PAD ciphers out parameter
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Wed Apr 22 08:13:31 2026
(Merged from https://github.com/openssl/openssl/pull/30653)
2026-04-22 10:13:27 +02:00
legin hpesoj 515f9a4ed1 doc: correct X509v3_get_ext_by_NID.pod to reflect CRL/REVOKED extension behavior
The man page previously stated that X509_CRL_delete_ext() and
X509_REVOKED_add_ext() are 'otherwise identical to the X509v3 functions,'
which is inaccurate. These routines use X509v3_delete_extension(), not
X509v3_delete_ext(), following the changes in #30350 and #30518.
Update the documentation to accurately describe this difference.

CLA: trivial

Signed-off-by: legin hpesoj <ncj2394@rit.edu>

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Neil Horman <nhorman@openssl.org>
MergeDate: Wed Apr 22 08:10:46 2026
(Merged from https://github.com/openssl/openssl/pull/30677)
2026-04-22 10:10:33 +02:00
Daniel Gustafsson 4b8ddae690 Fix prototype typo in X509_NAME_get_index_by_NID
s/cont/const/

Fixes: b0f2107b44 "Constify X509_NAME"

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Mon Apr 20 07:54:23 2026
(Merged from https://github.com/openssl/openssl/pull/30865)
2026-04-20 09:54:11 +02:00
Matt Caswell 91ce06e984 Clarify the set_session_id_context functions
Clarify when they can be used, and introduce some warnings about using
them too late in the handshake. In particular using them in the server
name callback is too late.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Thu Apr 16 16:46:26 2026
(Merged from https://github.com/openssl/openssl/pull/30797)
2026-04-16 18:46:18 +02:00
Eugene Syromiatnikov 8d8367dbd8 ossl-guide-migration.pod: tfixes in TLS fixed ver meth deprecation desc
Change duplicating names of the suggested function names from TLS_* to DTLS_*
ones and fix the case of "API".

Co-Authored-by: Frederik Wedel-Heinen <frederik.wedel-heinen@dencrypt.dk>
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Kurt Roeckx <kurt@roeckx.be>
MergeDate: Thu Apr 16 11:19:19 2026
(Merged from https://github.com/openssl/openssl/pull/30819)
2026-04-16 13:18:51 +02:00
kovan 41e564fc07 doc: clarify -hex option behavior in openssl prime
The -hex option description was ambiguous about its exact behavior.
Clarify that:
- With -generate: outputs the prime in hex instead of decimal
- When checking: interprets input as hex instead of decimal
- Output when checking is always hex regardless of this option

Fixes #19208

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr 15 12:33:18 2026
(Merged from https://github.com/openssl/openssl/pull/29913)
2026-04-15 14:33:16 +02:00
Norbert Pocs 9e26ae32a7 Document ASN1_BIT_STRING functions
Signed-off-by: Norbert Pocs <norbertp@openssl.org>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Wed Apr 15 12:25:45 2026
(Merged from https://github.com/openssl/openssl/pull/30690)
2026-04-15 14:25:44 +02:00
Taavi Eomäe cada1613f3 Update S/MIME tool documentation
CLA: trivial

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Wed Apr 15 12:19:04 2026
(Merged from https://github.com/openssl/openssl/pull/30583)
2026-04-15 14:19:01 +02:00
Josh Auler 8e5f3a2418 doc: clarify -CAfile and -verifyCAfile semantics in s_server
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
MergeDate: Wed Apr 15 12:11:34 2026
(Merged from https://github.com/openssl/openssl/pull/30405)
2026-04-15 14:11:11 +02:00
kovan ba2f616aa9 doc: Clarify that BN_CTX must not be NULL for BN arithmetic functions
The documentation for BN_add and related functions did not explicitly
state that the ctx parameter cannot be NULL. Users may assume NULL is
acceptable since some other OpenSSL functions allow it, but passing
NULL to functions like BN_mod_add() or BN_mod() causes a crash.

Update the documentation to explicitly state that ctx must not be NULL.

Fixes #12092

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr 15 11:47:59 2026
(Merged from https://github.com/openssl/openssl/pull/29773)
2026-04-15 13:47:58 +02:00
Jon Ericson c4a2476efa ossl-guide-migration: Fix ASN1_STRING_ functions formatting
keep bold and move to an unordered list

Co-authored-by: Tomáš Mráz <tm@t8m.info>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:54:01 2026
(Merged from https://github.com/openssl/openssl/pull/30629)
2026-04-15 12:53:00 +02:00
Jon Ericson ad19186015 ossl-guide-migration: delete duplicate entry
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:54:00 2026
(Merged from https://github.com/openssl/openssl/pull/30629)
2026-04-15 12:52:26 +02:00
Jon Ericson 6e9a4f9353 ossl-guide-migration: Format function names correctly
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
MergeDate: Wed Apr 15 10:53:59 2026
(Merged from https://github.com/openssl/openssl/pull/30629)
2026-04-15 12:51:25 +02:00
Neil Horman bdfac7bb66 Add docs for new atomic apis
Documents CRYPTO_atomic_load_ptr(), CRYPTO_atomic_store_ptr() and
CRYPTO_atomic_cmp_exch_ptr()

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
MergeDate: Tue Apr 14 08:29:33 2026
(Merged from https://github.com/openssl/openssl/pull/30670)
2026-04-14 10:29:28 +02:00
Eugene Syromiatnikov ef079ec822 OPENSSL_secure_malloc.pod: mention CRYPTO_secure_actual_size()
Add mentions to NAME, SYNOPSIS, and RETURN VALUES, and provide a short
description (that it is identical to its OPENSSL_* counterpart)
to DESCRIPTION.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:57 2026
(Merged from https://github.com/openssl/openssl/pull/30623)
2026-04-08 12:23:48 +02:00
Eugene Syromiatnikov fb6c9d8620 OPENSSL_malloc.pod: mention CRYPTO_memdup()
Add its mentions to NAME, SYNOPSIS, and RETURN VALUES sections.
Also, while at it, put OPENSSL_{str,strn,mem}dup() with the other
OPENSSL_* interfaces, and add mentions of OPENSSL_str{,n}dup()
to RETURN VALUES.

Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:55 2026
(Merged from https://github.com/openssl/openssl/pull/30623)
2026-04-08 12:23:48 +02:00
Eugene Syromiatnikov 56358abb5a OPENSSL_malloc.pod: mention CRYPTO_aligned_alloc{,_array}() in RETURN VALUES
Addition of those has been originally overlooked.

Complements: cc4ea5e000 "Introduce new internal hashtable implementation"
Complements: fa9b7b930e "Add array memory allocation routines"
Complements: 14a24fd14f "doc/man3/OPENSSL_malloc.pod: explicitly document freeptr value on failures"
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:23:55 2026
(Merged from https://github.com/openssl/openssl/pull/30623)
2026-04-08 12:23:48 +02:00
slontis 70cda24a33 Deprecate EVP_CIPHER_CTX_get_num() and EVP_CIPHER_CTX_set_num().
Suggested to be added in OpenSSL 4.1.
Since engines have been removed, these are redundant functions.
End users should not generally be accessing this internal field.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 10:02:58 2026
(Merged from https://github.com/openssl/openssl/pull/30335)
2026-04-08 12:02:56 +02:00
Arne Schwabe a44081572e Make ext argument of X509V3_EXT_print_fp const
Commit e75bd84ffc made the ext argument of 509V3_EXT_print const
but did not give 509V3_EXT_print_fp which is essentially is a wrapper
around X509V3_EXT_print the same treatment.

This commit aligns the two functions again.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 09:15:11 2026
(Merged from https://github.com/openssl/openssl/pull/30572)
2026-04-08 11:15:01 +02:00
Tomas Mraz e55107126a Fix documentation of SSL_ech_get1_status() return values
Also do minor formatting cleanups on the man page.

Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Paul Yang <paulyang.inf@gmail.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Wed Apr  8 09:13:38 2026
(Merged from https://github.com/openssl/openssl/pull/30673)
2026-04-08 11:13:03 +02:00
sftcd 7952bc4b8a ECH: Conformance test changes in response to AISLE review
Reviewed-by: Matt Caswell <matt@openssl.foundation>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Wed Apr  8 08:59:19 2026
(Merged from https://github.com/openssl/openssl/pull/30419)
2026-04-08 10:59:01 +02:00
kovan c7b2832632 doc: document PKCS12 password prompting for certificates
Document that commands reading certificates from PKCS#12 files may
prompt for a password. The existing documentation only mentioned
password prompting for private keys.

Fixes #21292

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:52:28 2026
(Merged from https://github.com/openssl/openssl/pull/29918)
2026-04-03 17:52:27 +02:00
slontis 78e2e71be1 Doc: "ML-DSA external mu" clarify security categories
Clarify which digest algorithms correspond to the 3
security categories for ML-DSA key types.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Apr  3 15:40:25 2026
(Merged from https://github.com/openssl/openssl/pull/30632)
2026-04-03 17:39:18 +02:00
Stacey Zheng 6f5b5acd65 Updated broken documentation links in various files
Reviewed-by: Saša Nedvědický <sashan@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Apr  3 15:18:46 2026
(Merged from https://github.com/openssl/openssl/pull/30516)
2026-04-03 17:17:33 +02:00
Emmalee Carpenter 3f907b6524 Update manuals and demos to consider OSSL_PARAM_clear_free() vs OSSL_PARAM_free()
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Apr  3 15:14:25 2026
(Merged from https://github.com/openssl/openssl/pull/30506)
2026-04-03 17:08:58 +02:00
Herman Malik eef0729ff9 doc: clarify X509_STORE thread safety and lifetime contract
Improve the description of X509_STORE_lock() in X509_STORE_new.pod to
emphasize it acquires an exclusive write lock.

Add a NOTES section to X509_STORE_new.pod covering which operations are
internally thread-safe and which are not, as well as documentation on
lifetime management and reference counting.

Add a NOTES section to X509_STORE_CTX_get_by_subject.pod explaining
that the store's internal lock is released before the found object's
reference count is incremented, so the caller must ensure the store
outlives the lookup.

Clarify the reference counting and the caller's responsibilities.
Remove internal details for conciseness.

Related to #30310

Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Fri Apr  3 15:00:55 2026
(Merged from https://github.com/openssl/openssl/pull/30382)
2026-04-03 17:00:08 +02:00
Arne Schwabe e181adbe4a Fix names of X509_V_ERR_ERROR_IN_CERT_* constants in man page
The names of the X509_V_ERR_ERROR_IN_CERT_NOT_BEFORE_FIELD and
X509_V_ERR_ERROR_IN_CERT_NOT_AFTER_FIELD in the man page have
the first _ERR_ spelt out as _ERROR_ instead.

Signed-off-by: Arne Schwabe <arne@rfc2549.org>

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Frederik Wedel-Heinen <fwh.openssl@gmail.com>
MergeDate: Wed Apr  1 17:06:53 2026
(Merged from https://github.com/openssl/openssl/pull/30643)

(cherry picked from commit e39a6de5c8)
2026-04-01 19:07:19 +02:00
kovan 44e453d0f9 doc: fix -signcert grouping in CA.pl documentation
The -signcert option was incorrectly grouped with -sign and -xsign at
line 109, which implied they were equivalent. However, -signcert is
different: it expects a self-signed certificate (not a certificate
request) in newreq.pem, and converts it to a request before signing.

This is correctly documented in its own separate section at line 123,
which states "-signcert is the same as -sign except it expects a self
signed certificate".

Remove -signcert from the -sign/-xsign grouping to eliminate the
contradiction.

Resolves: https://github.com/openssl/openssl/issues/29165
Fixes: 022696cab0 "Allow CA.pl script user to pass extra arguments to openssl command"
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue Mar 31 01:10:50 2026
(Merged from https://github.com/openssl/openssl/pull/29794)
2026-03-31 03:10:48 +02:00
Arne Schwabe dfe7d500ef Document X509V3_EXT_print API const change in manual page
Commit e75bd84ffc made the ext argument of 509V3_EXT_print const
but did not update the man page to match the implementation.

Complements: e75bd84ffc "Constify X509_get_ext() and friends.."
Signed-off-by: Arne Schwabe <arne@rfc2549.org>

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
MergeDate: Tue Mar 31 01:01:51 2026
(Merged from https://github.com/openssl/openssl/pull/30595)
2026-03-31 03:01:42 +02:00
Eugene Syromiatnikov 0d5553fff4 X509_EXTENSION_set_object.pod, X509v3_get_ext_by_NID.pod: add missing const
Update the documentation to include that added const qualifiers
to the arguments of X509_EXTENSION_get_object(), X509_EXTENSION_get_data(),
and X509v3_add_ext().

References: https://github.com/openssl/openssl/pull/30595
Complements: e75bd84ffc "Constify X509_get_ext() and friends.."
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>

Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Tue Mar 31 00:47:35 2026
(Merged from https://github.com/openssl/openssl/pull/30601)
2026-03-31 02:47:24 +02:00
William Faber 0d8454ed32 Doc: clarify AAD out1 semantics in EVP_EncryptInit
Fixes #29761

Reviewed-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Mar 27 16:40:23 2026
(Merged from https://github.com/openssl/openssl/pull/30533)
2026-03-27 17:40:12 +01:00
herbenderbler 80b7e49c27 Use mmap for pkeyutl -rawin and dgst one-shot input
When using openssl pkeyutl -rawin or openssl dgst for one-shot sign/verify
(e.g. Ed25519, Ed448), file input is now read via mmap() on Unix where
supported, avoiding a full buffer allocation and copy. Large files are
supported without doubling memory use; on failure of the mmap path we
do not fall back to the buffer path.

- Add app_mmap_file() in apps/lib/apps.c: stat/open/mmap/close, tri-state
  return (1 mapped, 0 size zero, -1 error). Parameter err_bio avoids
  shadowing global bio_err (-Wshadow).
- apps/pkeyutl.c and apps/dgst.c: use app_mmap_file(); single exit for
  mmap path in pkeyutl; dgst includes apps.h first for _FILE_OFFSET_BITS;
  do_fp_oneshot_sign returns EXIT_SUCCESS/EXIT_FAILURE like do_fp(); no
  fallback when mmap attempted but fails.
- pkeyutl mmap/buffer path: pass filesize to EVP_DigestVerify and
  EVP_DigestSign (review suggestion, avoids casting buf_len).
- Error messages: per-file messages for stat/size (dgst, pkeyutl); CHANGES.md
  "Unix-like" and "16 MB" (documentation style).
- Centralize _FILE_OFFSET_BITS and mmap includes in apps/include/apps.h.
- Tests: pkeyutl/dgst oneshot from file, no-fallback regression tests;
  use srctop_dir for test paths; stderr patterns for mmap errors.
- Docs: man pages and CHANGES.md.

CI fixes: return failure from dgst one-shot sign when mmap fails; treat
non-regular paths as mmap errors in app_mmap_file() and pkeyutl; reject
directories before mmap.

Addresses review feedback from DDvO, npajkovsky, and vdukhovni (PR #30429).

Fixes #11677

Co-authored-by: Viktor Dukhovni <viktor1ghub@dukhovni.org>
Co-authored-by: David von Oheimb <DDvO@users.noreply.github.com>

Reviewed-by: David von Oheimb <david.von.oheimb@siemens.com>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Mar 27 16:25:33 2026
(Merged from https://github.com/openssl/openssl/pull/30429)
2026-03-27 17:25:31 +01:00
Zoey Chapell b31d15ba6a doc: Clarify wording in PKCS5_PBE_keyivgen.pod
Resolves #12519 by adding to the DESCRIPTION section. Documentation only change.

Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Fri Mar 27 16:17:02 2026
(Merged from https://github.com/openssl/openssl/pull/29984)
2026-03-27 17:17:01 +01:00
Dr. David von Oheimb 5f447011a4 CMS/PKCS#7 doc: Fix inconsistencies and missing detail w.r.t. smimesign and smimeencrypt purposes
* Fix inconsistent doc (so far using purpose names smime_sign and smime_encrypt) vs. implementation
* Add the info that "smimesign" is the default purpose here.

Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Fri Mar 27 06:25:20 2026
(Merged from https://github.com/openssl/openssl/pull/18914)
2026-03-27 07:25:17 +01:00
Dr. David von Oheimb 72e7e90c12 CMS/PKCS#7: Add missing verification method "smime_encrypt" in crypto/x509/x509_vpm.c and doc
Reviewed-by: Paul Dale <paul.dale@oracle.com>
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
MergeDate: Fri Mar 27 06:25:19 2026
(Merged from https://github.com/openssl/openssl/pull/18914)
2026-03-27 07:25:17 +01:00
Dr. David von Oheimb 525a4f1efb cmp_vfy.c,doc/,test/: when trying to use cached CMP message sender cert, no more check its revocation and chain
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28973)
2026-03-25 10:42:04 +01:00
Dr. David von Oheimb 8d9c8b3ff1 CMP doc: add missing text on OSSL_CMP_OPT_NO_CACHE_EXTRACERTS to OSSL_CMP_CTX_new.pod and ossl_cmp_msg_check_update.pod
Reviewed-by: Neil Horman <nhorman@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28973)
2026-03-25 10:42:04 +01:00