Skip to content
Back to skills

Openssl Tls Knowledge Patch

ASecurity

OpenSSL

  • 25 stars
  • 0 votes
  • 0 copies
  • 5 views
  • Added May 27, 2026
developmentgoapisecurity

Works with

  • cli
  • api

Security analysis

A100/100

Pro scans all 4 files and shows the line behind each finding

Scanned December 1, 2026

npx -y skills add Nevaberry/nevaberry-plugins --skill openssl-tls-knowledge-patch --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Openssl Tls Knowledge Patch?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Openssl Tls Knowledge Patch
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/nevaberry-openssl-tls-knowledge-patch/badge)](https://www.skillsdirectory.com/skills/nevaberry-openssl-tls-knowledge-patch)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: openssl-tls-knowledge-patch
description: OpenSSL
version: "4.1.0"
license: MIT
metadata:
  author: Nevaberry
---


# OpenSSL / TLS compatibility

Use this skill when migrating OpenSSL code or builds, configuring providers and
certificate tools, integrating QUIC or Linux kernel TLS, or checking security
fixes. The references contain API conditions, examples, and branch-specific fixes.

## Reference index

| Reference | Topics |
| --- | --- |
| [Migration and compatibility](references/migration-and-compatibility.md) | API removals, cleanup, build targets, support policy, HAProxy and TLS library migrations |
| [Providers, cryptography, and FIPS](references/providers-crypto-and-fips.md) | SHAKE, opaque keys, post-quantum providers, FIPS properties, entropy, deployment |
| [CLI, configuration, and PKI](references/cli-config-and-pki.md) | Command defaults, provider parameters, configuration, certificates, extensions, CMP |
| [TLS and QUIC](references/tls-and-quic.md) | Negotiation, sessions, QUIC streams and event loops, external stacks, DTLS limitations |
| [Linux kernel TLS](references/kernel-tls.md) | Records, control messages, key updates, offload, counters |
| [Security advisories and patch floors](references/security.md) | Branch upgrades, CMS and PKCS#12, TLS and QUIC, cipher correctness, validation fixes |

## Breaking changes and deprecations

### Public APIs and teardown

OpenSSL 4.0 removes ENGINE support and always defines `OPENSSL_NO_ENGINE`.
Guard legacy ENGINE code with that macro when also targeting 3.x, and use
providers for integrations on 4.x. Fedora 41's separate ENGINE development
package has its own packaging rules; see the migration reference.

`ASN1_STRING` becomes opaque in OpenSSL 4.0; replace direct member access with
accessors. New `const` qualifiers across public APIs require updates to affected
declarations, function pointers, and locals. `ERR_STATE` is always opaque, and
`BIO_f_reliable()`, `ERR_get_state()`, `ERR_remove_state()`, and
`ERR_remove_thread_state()` are removed.

In OpenSSL 4.0, use `X509_check_certificate_times()` for certificate validity.
`X509_cmp_time()`, `X509_cmp_current_time()`, and `X509_cmp_timeframe()` are
deprecated. Replace deprecated `TS_VERIFY_CTX_set_*()` calls with the
corresponding `TS_VERIFY_CTX_set0_*()` setters. All `BIO_meth_get_*()` functions
are deprecated as of 3.5.0; 3.6 deprecates functions associated with
`EVP_PKEY_ASN1_METHOD`.

OpenSSL 4.0 stops registering `OPENSSL_cleanup()` via `atexit()` and uses a global
destructor where applicable. Revisit teardown if the application depends on
cleanup ordering. `OPENSSL_sk_push()` and typed `sk_*_push()` wrappers now return
`0` for a null stack; update checks that expected `-1` for that input.

### Builds and command compatibility

OpenSSL 4.0 disables RFC 8422-deprecated TLS curves and explicit EC curves by
default. Where compatibility requires them, enable the options independently:

```sh
./Configure enable-tls-deprecated-ec enable-ec_explicit_curves
```

OpenSSL 4.1.0 removes `no-ecdsa` and `no-ecdh`; use `no-ec` to disable elliptic
curve support altogether. It also removes `VC-WIN64I` and `VC-CE`; scripts for
those platforms must use a release that still supplies the target.

OpenSSL 3.6 requires C99 compiler support and drops VxWorks targets. For MSVC
2013, OpenSSL 4.1.0 supplies `VC-WIN32-MSVC2013` and `VC-WIN64A-MSVC2013`.
Deployments using `tsget` need `Net::Curl::Easy` from `Net-Curl` before upgrading
to 4.1.0, which replaces `WWW::Curl::Easy`.

OpenSSL 4.0 removes `c_rehash` and `openssl ca -msie-hack`; use `openssl rehash`
for certificate-directory links. Its printed key values omit the extra leading
`00:` when the most significant byte is at least `0x80`; hex dumps wrap at
24 bytes for signatures and 16 bytes elsewhere, affecting textual comparisons.

### Crypto and verification behavior

SHAKE-128 and SHAKE-256 require an explicit output length. Set `xoflen` before
`EVP_DigestFinal()` or `EVP_DigestFinal_ex()` on an initialized SHAKE context.
The provider reference contains the parameter-setting example.

The FIPS provider marks its X25519 and X448 key exchanges `fips=no`; fetching with
`fips=yes` excludes them. In OpenSSL 4.0, `PKCS5_PBKDF2_HMAC()` enforces the FIPS
provider's lower bounds, so calls below its minimums can fail.

OpenSSL 4.0 adds authority key identifier checks under `X509_V_FLAG_X509_STRICT`
and additional CRL checks; existing certificates or CRLs can fail verification.
When adding policies with `X509_VERIFY_PARAM_add0_policy()`, explicitly enable
checking with `X509_VERIFY_PARAM_set_flags(param, X509_V_FLAG_POLICY_CHECK)`.
`X509_VERIFY_PARAM_set1_policies()` sets the list and enables checking together.

The default encryption cipher for `openssl req`, `openssl cms`, and
`openssl smime` changed from `des-ede3-cbc` to `aes-256-cbc` in 3.5.0.
`openssl crl -verify` and `openssl req -verify` exit with status `1` on failure.

## Security-sensitive compatibility

Consult the security reference for branch-specific upgrade floors and affected
paths. CMS parsing fixes require patching the library even in FIPS deployments:
CMS parsing happens outside the FIPS module and the flaw can occur before
message authentication.

After the RSA PKCS#1 v1.5 implicit-rejection change in 4.0.1, pass the recipient
certificate to `CMS_decrypt()` and `PKCS7_decrypt()` to select the matching
`RecipientInfo`. Omitting it can select a substitute key and return invalid
plaintext. PBMAC1-protected PKCS#12 files accepted by 4.0.0 can fail integrity
validation after 4.0.1 rejects insecurely short HMAC keys.

On 4.0.0, `EVP_Cipher()` can discard the caller's AES-OCB IV and cause nonce
reuse. Use `EVP_CipherUpdate()` and `EVP_CipherFinal_ex()` for AES-OCB, or upgrade
to 4.0.1 for the one-shot fix. Empty-ciphertext authentication has separate fixes
described in the security reference.

When using `SSL_select_next_proto()` for ALPN, pass the peer's list as the client
argument, validate that the configured server list is nonempty, and handle
`OPENSSL_NPN_NO_OVERLAP` without using the fallback output.

## TLS negotiation and sessions

The default supported-groups list in 3.5.0 prefers hybrid post-quantum KEM groups;
clients offer `X25519MLKEM768` and `X25519` key shares. In 3.5.0–3.5.5 and
3.6.0–3.6.1, including `DEFAULT` in a custom server group list flattens preference
tuples. Use the built-in list as-is, spell out tuples, or upgrade to 3.5.6 or
3.6.2 or later on the respective branch to preserve tuples and allow a
HelloRetryRequest for the preferred group.

Prefix optional entries with `?` in `SignatureAlgorithms`,
`ClientSignatureAlgorithms`, or corresponding string-list setters to skip
unknown entries while still applying the list.

Use `SSL_SESSION_get_time_ex()`, `SSL_SESSION_set_time_ex()`, and
`SSL_CTX_flush_sessions_ex(ctx, cutoff)` for `time_t` session timestamps and
cache flushing. The timestamp APIs support dates past 2038 on 32-bit systems
built with 64-bit time; the legacy timestamp and flush APIs are deprecated.

OpenSSL 4.0 adds RFC 9849 Encrypted Client Hello, RFC 8998 SM2 schemes and
`curveSM2MLKEM768`, and named FFDHE negotiation for TLS 1.2. It removes SSLv3 and
SSLv2-format ClientHello support; peers using that hello must use TLS format.

## QUIC integration

OpenSSL 3.5 lets external QUIC stacks carry TLS 1.3 handshake messages through
callbacks registered with `SSL_set_quic_tls_cbs()` and supports 0-RTT early data.
Stacks using the BoringSSL-style callback API need an adapter for this interface.
HAProxy's `limited-quic` mode with unpatched OpenSSL omits 0-RTT.

For native QUIC, the UDP socket must be nonblocking even when SSL calls block.
The SSL API defaults to blocking; use `SSL_set_blocking_mode(conn, 0)` for
nonblocking SSL calls. Set `SSL_set1_initial_peer_addr()` before connecting when
the initial peer address cannot be autodetected.

In default stream mode, a first `SSL_write()` creates a client-initiated stream;
a first `SSL_read()` waits for a server-initiated stream. Write first when the
server replies on a client-initiated stream. For explicit multi-stream operation,
set `SSL_DEFAULT_STREAM_MODE_NONE` before connecting and use stream `SSL *`
objects for stream operations.

For nonblocking stream I/O, `SSL_ERROR_WANT_READ` means no stream data is
available; `SSL_ERROR_WANT_WRITE` means its send buffer is full. For pollable
BIOs, use `SSL_get_rpoll_descriptor()` and `SSL_get_wpoll_descriptor()`, wait as
requested by `SSL_net_read_desired()` and `SSL_net_write_desired()`, and call
`SSL_handle_events()` on readiness. Refresh `SSL_get_event_timeout()` after each
event-handling or SSL I/O call and handle events when the deadline expires.

In 3.5.0, use `SSL_do_handshake()` on connections from `SSL_accept_connection()`;
`SSL_accept()` returns an error on those connections. The TLS reference covers
datagram BIO requirements, default-stream interactions, shutdown, and resets.

## Providers, configuration, and certificates

With OpenSSL 3.5 or later, `oqsprovider` 0.9.0 or later disables its ML-KEM,
ML-DSA, SLH-DSA, and related hybrids when OpenSSL already provides them. Keep
the default provider loaded to use native `ML-KEM-768` and `ML-DSA-65`.

Use explicit booleans for provider `activate` and `soft_load`: `1`, `yes`, `true`,
and `on` enable; `0`, `no`, `false`, and `off` disable. Words accept lowercase or
uppercase. Set `config_diagnostics = 1` in the default configuration section to
make `SSL_CTX_new()` and `SSL_CTX_new_ex()` fail on SSL configuration module errors.

Use `-provparam [name:]key=value` after the relevant `-provider` options for UTF-8
runtime parameters. Omit the name to target all loaded providers; initialization-
only parameters belong in the config file. For a separately built validated
FIPS provider, run `fipsinstall` on each target and check the loaded module with
`openssl list -provider fips -providers` using the deployment configuration.

When issuing with `openssl req`, both `-copy_extensions copy` and
`-copy_extensions copyall` copy every CSR extension; the default ignores them.
`-addext` overrides the same OID from configuration, and each command-line
extension key can appear only once. Use `-not_before` and `-not_after` with
`openssl req` or `openssl x509` for explicit certificate validity dates.

## DTLS operational limitations

OpenSSL 4.1.0 adds DTLS 1.3 and DTLS acceptance through the SSL listener API.
In that release, a received KeyUpdate drops other unacknowledged post-handshake
records from retransmission buffering, so a lost `NewSessionTicket` can go
unrecovered. A server may abort a valid handshake with `unexpected_message` if
the acknowledgment of its first flight precedes the client's handshake response.

A permanent DTLS listener receive failure in 4.1.0 can surface as
`SSL_ERROR_WANT_READ` on an accepted connection; polling and subsequent accepts
may also miss it. A retryable nonblocking write failure can return
`SSL_ERROR_SYSCALL` where `SSL_ERROR_WANT_WRITE` is expected; treating it as fatal
can close a usable connection.

## Linux kernel TLS integration

Receive control records with `recvmsg()` and ancillary space for a one-byte
`SOL_TLS` / `TLS_GET_RECORD_TYPE` message; omitting the ancillary buffer causes
an error for control records. Each receive returns only one record type.

After KeyUpdate, install new crypto state using `setsockopt()` at `SOL_TLS`,
retaining the version and cipher and preventing userspace key/nonce reuse.
Set `TLS_TX` after sending KeyUpdate and before the next outgoing record; set
`TLS_RX` after reading the peer's KeyUpdate to clear `EKEYEXPIRED` and restore
`poll()` read readiness. With NIC offload and `TLS_TX_ZEROCOPY_RO`, submitted
file bytes must stay immutable until transmission completes.

Files in this skill

  • SKILL.md4.7 KB
  • references/new-features.md2 KB
  • references/openssl4-migration.md1.5 KB
  • references/pqc-cryptography.md1.9 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in development →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.