This is a minor release with one security fix. It updates rustls to
0.23.37.
Updates rustls-webpki to
0.103.10:
This update addresses RUSTSEC-2026-0049; a security issue affecting CRL revocation checking.
This low-impact vulnerability affects users of the
rustls_web_pki_[server|client]_cert_verifier_builder APIs that populated CRLs
with rustls_web_pki_server_cert_verifier_builder_add_crl(). If a certificate
signed by a trusted certificate authority contained multiple CRL distribution
points, only the first was checked against the CRL's issuing distribution point.
In a default configuration this oversight meant that revocation checking would
fail-closed with an incorrect, but safe, RUSTLS_RESULT_CERT_UNKNOWN_ISSUER
error.
If configured with
rustls_web_pki_client_cert_verifier_allow_unknown_revocation_status(), then
revocation checking would fail-open, potentially allowing use of certificate
revoked by the CRL.
Inducing this bug requires a trusted certificate issuer to be compromised, which can result in more serious revocation bypasses and security issues.
-
version detection macros in the C header (#576):
RUSTLS_VERSION_MAJOR,RUSTLS_VERSION_MINOR,RUSTLS_VERSION_PATCHindividual version components as integers.RUSTLS_VERSION_NUMBER- a single number encoding the version as(major << 16 | minor << 8 | patch).
-
additional error variants (#574):
RUSTLS_RESULT_CERT_REVOCATION_LIST_UNSUPPORTED_SIGNATURE_ALGORITHM- for CRL signature algorithm errors.RUSTLS_RESULT_CERT_UNSUPPORTED_SIGNATURE_ALGORITHM- for certificate signature algorithm errors.
-
rustls_platform_server_cert_verifier_try_with_provider()(#574):- A safer alternative to
rustls_platform_server_cert_verifier_with_providerwith better error reporting. The older function for constructing a server cert verifier backed by the platform verifier is now deprecated.
- A safer alternative to
-
rustls_connection_get_tls13_tickets_received()(#574):- Returns the number of TLS 1.3 tickets received by a client connection. This
is FFI for the Rustls
ClientConnection::tls13_tickets_received()API.
- Returns the number of TLS 1.3 tickets received by a client connection. This
is FFI for the Rustls
-
rustls_client_connection_new_alpn()(#566):- constructs a client
rustls_connectionwith custom ALPN protocol support that differs from the baserustls_client_config.
- constructs a client
-
Deprecated functions are now visually annotated on the documentation website. (#584) and in the header file using the appropriate clang/GCC/MSVC attributes (#579).
-
Platform server cert verifier creation is now fallible, returning a
rustls_resultthat must be handled appropriately.The pre-existing
rustls_platform_server_cert_verifier_with_provider()is now deprecated in favor ofrustls_platform_server_cert_verifier_try_with_provider().
-
Post-quantum key exchange (
X25519MLKEM768) is now preferred by default matching upstream rustls (#566) -
An additional field is now exposed in
rustls_client_hello(#574):named_groups- the supported key exchange groups advertised by the client.- This is a breaking change, but limited to the server-side
rustls_server_config_builder_set_hello_callbackAPIs that are documented as experimental.
This release updates to Rustls 0.23.25 and increases the project minimum supported rust version (MSRV) from 1.71 to 1.74 to avoid a Rust compiler bug provoked by the ECH support in Rustls.
-
Binary releases:
- Starting with the 0.15.0 release we now publish pre-built
.zips for: Windows (x86_64MSVC), Linux (x86_64GNU libc), and Apple (ARM64andx86_64) and a.debfor Debian/Ubuntux86_64. These can be used to build software usingrustls-ffiwithout needingcargo/cargo-c/rustc.
- Starting with the 0.15.0 release we now publish pre-built
-
API documentation is now available online at https://ffi.rustls.dev
-
Post-quantum key exchange with
X25519MLKEM768.- Enabled by default at a low priority. See the
prefer-post-quantumfeature flag to change this behavior.
- Enabled by default at a low priority. See the
-
New opt-in feature flags:
- Optional support for making the post-quantum key exchange
X25519MLKEM768the most-preferred key exchange by enabling theprefer-post-quantumfeature flag. Requires theaws-lc-rscrypto provider. - Optional support for RFC 8879 certificate compression by enabling the
cert_compressionfeature when buildingrustls-ffi. When enabled connections will transparently use certificate compression with Brotli or ZLib based on peer compatibility. - Optional FIPS-140-3 support using the
aws-lc-rsprovider. Enabled with thefipsfeature when buildingrustls-ffi. When enabled theaws-lc-rscrypto provider is used in its FIPS compatible mode. See the Rustls project documentation for more information on FIPS status.
- Optional support for making the post-quantum key exchange
-
Encrypted Client Hello (ECH) support for client connections.
rustls_hpkestruct for representing supported HPKE suites.rustls_supported_hpke()function for returning a const pointer to arustls_hpkeinstance if available. Only theaws-lc-rsbackend returns a non-NULLvalue at this time.rustls_client_config_builder_enable_ech_grease()client config builder function for configuring ECH GREASE using arustls_hpke. This chooses a supported HPKE suite at random and is an anti-ossification measure clients may opt-in to when not performing "real" ECH.rustls_client_config_builder_enable_ech()client config builder function for configuring ECH using arustls_hpkeand a TLS encoded ECH config list. The encoded ECH config list should be retrieved from DNS using a secure transport, such as DNS-over-HTTPS. See thelibrustls/tests/client.cexample, and theech-fetch.rstool, for example usage.
-
Additional connection information APIs:
- Negotiated key exchange group, using
rustls_connection_get_negotiated_key_exchange_group()for the IANA registered identifier, andrustls_connection_get_negotiated_key_exchange_group_name()for the name as arustls_str. - Determining whether the handshake was a full TLS handshake, a full TLS
handshake with an extra hello retry request (HRR) round-trip, a resumed TLS
or a handshake, using
rustls_connection_handshake_kind(). This returns arustls_handshake_kindenum variant, which can be translated to arustls_strusingrustls_handshake_kind_str().
- Negotiated key exchange group, using
-
Support for checking whether a
rustls_certified_key's certificate matches the corresponding private key usingrustls_certified_key_keys_match(). -
Support for queuing TLS 1.3 key updates using
rustls_connection_refresh_traffic_keys(). -
Support for strict handling of CRL expiry using
rustls_web_pki_server_cert_verifier_enforce_revocation_expiry()to customize arustls_web_pki_server_cert_verifier_builderbuilder instance to reject CRLs with a next update in the past. -
Support for building
rustls-ffiwithout any built in cryptography providers. This is mainly helpful for users that don't intend to useaws-lc-rsor*ring*but instead will bring their own FFI-readyrustls_crypto_provider. -
SSLKEYLOG support:
- For simple logging to a file, use
rustls_server_config_builder_set_key_log_file()orrustls_client_config_builder_set_key_log_file()with a client/server config builder to have theSSLKEYLOGFILEenv var used to log an NSS formatted key log file appropriate for use with Wireshark and other tools. - For deeper integration, use
rustls_server_config_builder_set_key_log()orrustls_client_config_builder_set_key_log()to configure C callbacks to be invoked to decide which secrets are logged and to do the logging. - See
librustls/tests/client.candlibrustls/tests/server.cfor example usage.
- For simple logging to a file, use
-
FIPS-140-3 APIs:
rustls_default_fips_provider()for instantiating a FIPS compatiblerustls_crypto_provider(requires "fips" feature enabled).rustls_crypto_provider_fips()for determining if arustls_crypto_provideris FIPS compatible or not.rustls_client_config_fips()for determining if arustls_client_configwas built with a FIPS compatiblerustls_crypto_provider.rustls_server_config_fips()for determining if arustls_server_configwas built with a FIPS compatiblerustls_crypto_provider.rustls_connection_fips()for determining if arustls_connectionwas created from arustls_client_configorrustls_server_configthat was built with a FIPS compatiblerustls_crypto_provider.
-
Additional
rustls_resulterror variants:RUSTLS_RESULT_CERT_EXPIRED_REVOCATION_LIST,RUSTLS_RESULT_MESSAGE_CERTIFICATE_PAYLOAD_TOO_LARGE,RUSTLS_RESULT_INCONSISTENT_KEYS_KEYS_MISMATCH,RUSTLS_RESULT_INCONSISTENT_KEYS_UNKNOWN,RUSTLS_RESULT_INVALID_ENCRYPTED_CLIENT_HELLO_INVALID_CONFIG_LIST,RUSTLS_RESULT_INVALID_ENCRYPTED_CLIENT_HELLO_NO_COMPATIBLE_CONFIG,RUSTLS_RESULT_INVALID_ENCRYPTED_CLIENT_HELLO_SNI_REQUIRED.
-
Calling
rustls_server_config_builder_build()with no certificate/key configured previously returnedRUSTLS_RESULT_GENERAL, it now returnsRUSTLS_RESULT_NO_CERT_RESOLVER. -
The
rustls_server_connection_get_server_name()function now returns arustls_strinstead of writing to a user provided buffer with out parameters. -
The
rustls_server_config_builder_set_persistence()function is nowvoidinstead of returning arustls_error. -
cargo-c is now the only supported method for building
rustls-ffi. It supports building both static and shared libraries as well as making.pcpkg-config files per-platform. The pre-existing GNUMakefilehas been removed in favour ofcargo-c. See our README for more information. -
Building the client/server examples now requires
cmake. The GNU Makefile has been removed in favour of unifying the example build system withcmake. Users only interested in buildingrustls-ffi(not the example applications) do not requirecmakeunless it is a requirement of their chosen cryptography provider (e.g.aws-lc-rsin fips mode).
- N/A
This release updates to Rustls 0.23.18 and increases the project MSRV from 1.64 to 1.71, matching the upstream Rustls MSRV.
Notably this brings in a fix for an availability issue for servers using
the rustls_acceptor type and associated APIs. See the upstream 0.23.18
release notes for more information.
This release updates to Rustls 0.23.13 and changes the rustls-ffi API to allow choosing a cryptography provider to use with Rustls.
The default provider has been changed to match the Rustls default,
aws-lc-rs. Users that wish to continue using *ring* as the provider may
opt-in. See the README for more detail on supported platforms and build
requirements.
-
A new
rustls_crypto_providertype has been added to representrustls::CryptoProviderinstances.- The current process-wide default crypto provider (if any) can be retrieved
with
rustls_crypto_provider_default(). - If rustls-ffi was built with
aws-lc-rs, (DEFINE_AWS_LC_RSis true), thenrustls_aws_lc_rs_crypto_provider()can be used to retrieve theaws-lc-rsprovider. - If rustls-ffi was built with
ring, (DEFINE_RINGis true), thenrustls_ring_crypto_provider()can be used to retrieve theaws-lc-rsprovider. - Ciphersuites supported by a specific
rustls_crypto_providercan be retrieved withrustls_crypto_provider_ciphersuites_len()andrustls_crypto_provider_ciphersuites_get(). - Ciphersuites supported by the current process-wide default crypto provider (if any) can
be retrieved with
rustls_default_crypto_provider_ciphersuites_len()andrustls_default_crypto_provider_ciphersuites_get(). - A buffer can be filled with cryptographically secure random data from
a specific
rustls_crypto_providerusingrustls_crypto_provider_random(), or the process-wide default provider usingrustls_default_crypto_provider_random().
- The current process-wide default crypto provider (if any) can be retrieved
with
-
A new
RUSTLS_RESULT_NO_DEFAULT_CRYPTO_PROVIDERrustls_resultwas added to indicate when an operation that requires a process-wide default crypto provider fails because no provider has been installed as the default, or the default was not implicit based on supported provider. -
A new
rustls_crypto_provider_buildertype has been added to customize, or install, a crypto provider.rustls_crypto_provider_builder_new_from_defaultwill construct a builder based on the current process-wide default.rustls_crypto_provider_builder_new_with_basewill construct a builder based on a specifiedrustls_crypto_provider.- Customization of supported ciphersuites can be achieved with
rustls_crypto_provider_builder_set_cipher_suites(). - The default process-wide provider can be installed from a builder using
rustls_crypto_provider_builder_build_as_default(), if it has not already been done. - Or, a new
rustls_crypto_providerinstance built withrustls_crypto_provider_builder_build(). - See the function documentation for more information on recommended workflows.
-
A new
rustls_signing_keytype has been added to represent a private key that has been parsed by arustls_crypto_providerand is ready to use for cryptographic operations.- Use
rustls_crypto_provider_load_key()to load asigning_keyfrom a buffer of PEM data using arustls_crypto_provider. - Use
rustls_certified_key_build_with_signing_key()to build arustls_certified_keywith a PEM cert chain and arustls_signing_key.
- Use
-
New
rustls_web_pki_client_cert_verifier_builder_new_with_provider()andrustls_web_pki_server_cert_verifier_builder_new_with_provider()functions have been added to constructrustls_client_cert_verifierorrustls_server_cert_verifierinstances that use a specifiedrustls_crypto_provider. -
Support for constructing a
rustls_server_cert_verifierthat uses the platform operating system's native certificate verification functionality was added. See therustls-platform-verifiercrate docs for more information on supported platforms.- Use
rustls_platform_server_cert_verifier()to construct a platform verifier that uses the default crypto provider. - Use
rustls_platform_server_cert_verifier_with_provider()to construct a platform verifier that uses the specifiedrustls_crypto_provider. - The returned
rustls_server_cert_verifiercan be used with arustls_client_config_builderwithrustls_client_config_builder_set_server_verifier().
- Use
-
A new
rustls_supported_ciphersuite_protocol_version()function was added for getting therustls_tls_versionIANA registered protocol version identifier supported by a givenrustls_supported_ciphersuite. -
When using
aws-lc-rsas the crypto provider, NIST P-521 signatures are now supported.
-
rustls_server_config_builder_new(),rustls_client_config_builder_new(),rustls_web_pki_client_cert_verifier_builder_new(), andrustls_web_pki_server_cert_verifier_builder_new(), andrustls_certified_key_buildfunctions now use the process default crypto provider instead of being hardcoded to usering. -
rustls_server_config_builder_new_custom()andrustls_client_config_builder_new_custom()no longer take custom ciphersuites as an argument. Instead they require providing arustls_crypto_provider.- Customizing ciphersuite support is now done at the provider level using
rustls_crypto_provider_builderandrustls_crypto_provider_builder_set_cipher_suites().
- Customizing ciphersuite support is now done at the provider level using
-
rustls_server_config_builder_build()andrustls_client_config_builder_build()now use out-parameters for therustls_server_configorrustls_client_config, and return arustls_result. This allows returning an error if the build operation fails because a suitable crypto provider was not available. -
rustls_client_config_builder_build()now returns aRUSTLS_RESULT_NO_SERVER_CERT_VERIFIERrustls_resulterror if a server certificate verifier was not set instead of falling back to a verifier that would fail all certificate validation attempts. -
The
NoneVerifierused if arustls_client_configis constructed by arustls_client_config_builderwithout a verifier configured has been changed to return an unknown issuer error instead of a bad signature error when asked to verify a server certificate. -
Error specificity for revoked certificates was improved.
- The
ALL_CIPHER_SUITESandDEFAULT_CIPHER_SUITESconstants and associated functions (rustls_all_ciphersuites_len(),rustls_all_ciphersuites_get_entry(),rustls_default_ciphersuites_len()andrustls_default_ciphersuites_get_entry()) have been removed. Ciphersuite support is dictated by therustls_crypto_provider.- Use
rustls_default_supported_ciphersuites()to retrieve arustls_supported_ciphersuitesfor the defaultrustls_crypto_provider. - Use
rustls_crypto_provider_ciphersuites()to retrieve arustls_supported_ciphersuitesfor a givenrustls_crypto_provider. - Use
rustls_supported_ciphersuites_len()andrustls_supported_ciphersuites_get()to iterate therustls_supported_ciphersuites.
- Use
This release updates to Rustls 0.23.4 and continues to use *ring* as the
only cryptographic provider.
- A new
rustls_accepted_alerttype is added. Callingrustls_accepted_alert_byteson this type produces TLS data to write in the case where a server acceptor encountered an error accepting a client. The returned TLS data should be written to the connection before freeing therustls_accepted_alertby callingrustls_accepted_alert_write_tlswith arustls_write_callbackimplementation.
-
The
rustls_acceptor_acceptandrustls_accepted_into_connectionAPI functions now require an extrarustls_accepted_alertout parameter. This parameter will only be set when an error occurs accepting a client connection and can be used to write any generated alerts to the connection to signal the accept error to the peer. -
The experimental cargo-c build support has been updated to use a vendored header file. This avoids the need for nightly rust or
cbindgenwhen using this build method.
- The experimental cargo-c build support has been updated to use a vendored
header file. This avoids the need for nightly rust or
cbindgenwhen using this build method.
- Initial support for building with cargo-c.
- Experimental support for building
rustls-ffias a dynamic library (cdylib).
This release updates to Rustls 0.22, but does not yet expose support for
customizing the cryptographic provider. This will be added in a future release,
and 0.12.0 continues to use *ring* as the only cryptographic provider.
RUSTLS_RESULT_CLIENT_CERT_VERIFIER_BUILDER_NO_ROOT_ANCHORSerror code, returned when a client cert verifier is being built that hasn't provided any root trust anchors.- The server certificate verifier now supports CRL revocation checking through policy and CRLs provided to the server certificate verifier builder.
- Client certificate verifier builder now supports controlling CRL revocation status check depth and unknown revocation policy.
- The root certificate store constructor (
rustls_root_cert_store_new) and the function to add PEM content (rustls_root_cert_store_add_pem) have been replaced with a newrustls_root_cert_store_buildertype, constructed withrustls_root_cert_store_builder_new. PEM content can be added withrustls_root_cert_store_builder_add_pemandrustls_root_cert_store_builder_load_roots_from_file. - The client verifier builders (
rustls_allow_any_anonymous_or_authenticated_client_builder, andrustls_allow_any_authenticated_client_builder) as well as the client verifier types (rustls_allow_any_anonymous_or_authenticated_client_verifier,rustls_allow_any_authenticated_client_verifier) have been replaced withrustls_web_pki_client_cert_verifier_builderandrustls_client_cert_verifier. - The server config client verifier setters
(
rustls_server_config_builder_set_client_verifierandrustls_server_config_builder_set_client_verifier_optional) have been replaced withrustls_server_config_builder_set_client_verifier. - The client config builder functions for specifying root trust anchors
(
rustls_client_config_builder_use_rootsandrustls_client_config_builder_load_roots_from_file) have been replaced with a server certificate verifier builder (rustls_web_pki_server_cert_verifier_builder) constructed withrustls_web_pki_server_cert_verifier_builder_newand arustls_root_cert_store. The builtrustls_web_pki_server_cert_verifiercan be provided to a client config builder withrustls_client_config_builder_set_server_verifier. - CRL validation defaults to checking the full certificate chain, and treating unknown revocation status as an error condition.
RUSTLS_RESULT_CERT_SCT_*error codes have been removed.
- Added support for providing certificate revocation lists (CRLs) to client certificate verifiers via the new builder types. (#324).
- Some new certificate revocation list related error codes starting with RUSTLS_RESULT_CERT_REVOCATION_LIST. (#324).
- rustls_client_cert_verifier became rustls_allow_any_authenticated_client_verifier and must be constructed from a rustls_allow_any_authenticated_client_builder.
- rustls_client_cert_verifier_optional became rustls_allow_any_anonymous_or_authenticated_client_verifier and must be constructed from a rustls_allow_any_anonymous_or_authenticated_client_builder.
- Some new certificate-related error codes starting with RUSTLS_RESULT_CERT_. Some new message-related error codes starting with RUSTLS_RESULT_MESSAGE_ (#303).
- Support for IP addresses in server names (#302).
- RUSTLS_CERT_INVALID_{ENCODING,SIGNATURE_TYPE,SIGNATURE,DATA}. Replaced by other RUSTLS_CERT_RESULT_ errors to match upstream rustls (#303).
- Old "crustls.h" and "libcrustls.a" symlinks to the current "rustls.h" and "librustls.a" names (#289).
- rustls_verify_server_cert_params->dns_name became server_name (#303).
- rustls_server_connection_get_sni_hostname became rustls_server_connection_get_server_name (#298).
- Give a better error message for UnexpectedEof (#284).
- Added support for Acceptor, allowing more flexible server-side handshake handling (#243).
- Fixed violation of stacked borrows when freeing Arcs, detected by Miri (#283).
- Update minimum supported Rust version to 1.57.0, following rustls (#276).
- Update rustls (#279).
- Update list of libraries required to link against (#281).
- rustls_server_config_builder_set_client_verifier and rustls_server_config_builder_set_client_verifier_optional: fix a double free (#263).
- rustls_server_connection_get_sni_hostname: actually set *out_n when SNI unavailable (#262).
- rustls_client_cert_verifier_new and rustls_client_cert_verifier_optional_new: change to const and fix some lifecycle comments (#260).
- Fixed documentation for rustls_certified_key_build (#257).
- Add ciphersuite and version arrays (#242).
- Add method to get ciphersuite name (#147).
- Add static libs on Windows (#249).
- Added arrays ALL_CIPHER_SUITES, DEFAULT_CIPHER_SUITES, ALL_VERSIONS, and DEFAULT_VERSIONS as more convenient alternatives to rustls_default_ciphersuites_get_entry(), etc.
- Add CMake build system (with Windows support) (#253).
- Add feature for early testing of feature(read_buf) (#248).
- rustls_is_cert_error now returns true for invalid certificate data (this was broken by v0.8.0). It also takes unsigned int as its input parameter instead of rustls_result (#227).
- Avoid creating references to out params (#256).
- rustls_verify_server_cert_callback now returns uint32_t instead of rustls_result (#227).
- rustls_session_store_get_callback and rustls_session_store_put_callback now return uint32_t (#227).
- Update rustls dependency to 0.20.4.
- Add a feature, no_log_capture, which inhibits rustls from taking the global logger. Useful when built as a Rust dependency.
- Setting of ALPN protocols for client configs was broken in the 0.8.0 release. This release fixes it.
The package name has changed to "rustls-ffi" (from "crustls").
The header file (as installed by make DESTDIR=/path/ install)
is now rustls.h and the library is librustls.a. The old library and header
names are symlinked as part of the install process, to simplify upgrading to the
new version.
If you are importing this as a library from other Rust code, you should import rustls_ffi.
- rustls_client_config_builder_new_custom and rustls_server_config_builder_new_custom: start building a config, with ciphersuites and TLS versions set at initial construction.
- rustls_default_ciphersuites_get_entry() and rustls_default_ciphersuites_len(): get default ciphersuites as opposed to all ciphersuites (these happen to be the same today but might not always be).
rustls-ffinow importsrustlsversion 0.20, up from rustls 0.19. View the changelog.- Configuring ciphersuites and TLS versions. Previously these could be set using setter methods on the builder object. Now they have to be set at the beginning of the config builder process, by calling rustls_client_config_builder_new_custom().
- Reading of plaintext from a rustls_connection. When the internal plaintext buffer is empty, rustls_connection_read will return RUSTLS_RESULT_PLAINTEXT_EMPTY. That means no more plaintext can be read until additional TLS bytes are ingested via rustls_connection_read_tls, and rustls_connection_process_new_packets is called. Previously this condition was indicated by returning RUSTLS_RESULT_OK with out_n set to 0.
- Handling of unclean close and the close_notify TLS alert. Mirroring upstream changes, a rustls_connection now tracks TCP closed state like so: rustls_connection_read_tls considers a 0-length read from its callback to mean "TCP stream was closed by peer." If that happens before the peer sent close_notify, rustls_connection_read will return RUSTLS_RESULT_UNEXPECTED_EOF once the available plaintext bytes are exhausted. This is useful to protect against truncation attacks. Note: some TLS implementations don't send close_notify. If you are already getting length information from your protocol (e.g. Content-Length in HTTP) you may choose to ignore UNEXPECTED_EOF so long as the number of plaintext bytes was as expected.
rustls_versionreturns arustls_strthat points to a static string in memory, and the function no longer accepts a character buffer or length.rustls_errornow takes aunsigned intinstead of rustls_result directly. This is necessary to avoid undefined behavior if an invalid enum value is passed.- Some errors starting with RUSTLS_RESULT_CERT_ have been removed, and some renamed.
- rustls_client_config_builder_set_protocols is now rustls_client_config_builder_set_alpn_protocols.
- rustls_server_config_builder_set_protocols is now rustls_server_config_builder_set_alpn_protocols.
- rustls_server_config_builder_with_client_verifier and rustls_server_config_builder_with_client_verifier_optional are replaced by rustls_server_config_builder_set_client_verifier and rustls_server_config_builder_set_client_verifier_optional, which are setters rather than constructors.
- The documented lifetime for pointers returned by rustls_connection_get_peer_certificate and rustls_connection_get_alpn_protocol has been fixed - the pointers those functions provide are valid until the next mutating function call on that connection.
- rustls_client_config_builder_from_config and
rustls_server_config_builder_from_config have been removed. These were
incompatible with the changes to config builders. Previously the notion of
"config builder" in this library simply meant "A ClientConfig that hasn't yet
been wrapped in an Arc," so we could use
Cloneto get a copy of one. Now "config builder" corresponds to the underlyingConfigBuilderin rustls (plus some rustls-ffi internal state), so we can't useCloneon aClientConfigto get one. And we can't manually copy fields from a ClientConfig, since some of the necessary fields are private. - rustls_client_config_builder_set_versions and rustls_client_config_builder_set_ciphersuites are gone - for equivalent functionality, use rustls_client_config_builder_new_custom and rustls_server_config_builder_new_custom.
- Adds support for TLS client certificates (servers authenticating clients),
using the new
rustls_client_config_builder_set_certified_keyAPI. (#128)
- Fix msvc build (#119, #120)
- Add licensing information (#117)
- Silence compiler warning in test client (#124, 125)
- rustls_connection_write_tls_vectored (#112)
- rustls_connection_set_log_callback (#107)
- rustls_client_config_builder methods (#108):
_from_config_free_use_roots_set_versions_set_ciphersuites
makeproduces optimized builds by default (#114). Use PROFILE=debug for debug builds.- As part of supporting logging, this library now has to be built with
custom RUSTFLAGS. Those flags are provided when built with
make.
- rustls_client_config_builder_load_native_roots (#110). This removes some linking requirements, e.g. for Security.framework on macOS.
- rustls_certificate_get_der to get bytes of certificate (#103)
- rustls_connection_get_peer_certificate was returning a dangling pointer. This is now fixed by having it return a reference that lives as long as the connection does. (#103)
- Add clone with OCSP for certified key (#85)
- Make userdata a per-session config (#86). This makes it so callbacks can receive data associated with a specific TLS connection, whereas before they would receive data associated with a connection config (which might be shared across multiple connections).
- The separate rustls_client_session and rustls_server_session types have been merged into a single rustls_connection type. Merging these reduces duplication in both the API and the implementation, and better reflects how the underlying rustls library works. The name change, from session to connection, reflects an upcoming change in the rustls library.
- The read_tls and write_tls methods now take a callback rather than
copying bytes into a buffer. This can simplify user code significantly
and in particular makes it harder for user code to accidentally drop
bytes from the buffer. This introduces a new rustls_io_error type that
is an alias for c_int. It wraps a value from
errno. Both the updated read/write functions and the callbacks they receive return rustls_io_error.
- ALPN support for clients (#84)
- Enumeration of ciphersuites (#79)
- Session storage (#64)
- TLS version numbers (#65)
- Reading plaintext can now return RUSTLS_RESULT_ALERT_CLOSE_NOTIFY. (#67)
- The rustls_cipher_signature_scheme name lookup. (#66)
- Expanded error handling: rustls_result has more variants. (#13)
- Allow configuring custom trusted roots. (#16)
- Use catch_unwind to prevent panicking across FFI. (#25)
- Support for TLS servers. (#30)
- Slice types: rustls_str, rustls_slice_bytes, rustls_slice_str, rustls_slice_slice_bytes, and rustls_slice_u16. (#54)
- Callback for custom certificate verifier. (#51)
- Callback for client hello inspection. (#50)
- By default, a rustls_client_config trusts no roots. (#13)
- Dependencies on
webpki-rootsandenv_logger - Defensive zeroing when receiving write buffers from C. C code needs to ensure write buffers are initialized before handing to crustls. (#57)