$ rustls-pki-types

v1.13.2

Shared types for the rustls PKI ecosystem

Downloads: 183.0M
Recent: 45.3M
Versions: 27
Updated: December 17, 2025

Latest Update Summary

Crate

Name: rustls-pki-types New version: 1.13.0 Release date: 2025-10-27T10:37:14Z

Crate readme

Short description This crate provides types for representing X.509 certificates, keys and other types as commonly used in the rustls ecosystem.

Long description The rustls-pki-types crate is designed for crates that require interoperability with X.509 types, providing a long-term stable API with no dependencies, and support for no_std contexts with optional alloc support. It allows working with DER-encoded and PEM-encoded data, but does not provide functionality for creating new certificates or keys.

Features • Interoperability between different crates in the rustls ecosystem • Long-term stable API • No dependencies • Support for no_std contexts, with optional support for alloc

Code Examples

Linkshttps://crates.io/crates/rustlshttps://crates.io/crates/rustls-webpkihttps://docs.rs/rcgenhttps://docs.rs/rustls-pki-types/latest/rustls_pki_types/enum.PrivateKeyDer.html#method.clone_keyhttps://docs.rs/rustls-pki-types/https://github.com/rustls/pki-types/pull/82https://github.com/rustls/pki-types/pull/81https://github.com/rustls/pki-types/pull/83https://github.com/rustls/pki-types/pull/85https://github.com/rustls/pki-types/pull/87https://github.com/rustls/pki-types/pull/90https://github.com/rustls/pki-types/pull/91https://github.com/rustls/pki-types/compare/v/1.12.0...v/1.13.0 https://docs.rs/rustls-pki-types https://api.github.com/repos/rustls/pki-types/releases/257429083

Release info

Release version: 1.13.0

Release description In version 1.13.0, several enhancements and features were added to the pki-types crate. A new implementation of From<DnsName<'a>> for ServerName<'a> was introduced, allowing for better interoperability. Functions have been marked as const, paving the way for more compile-time computations. Additionally, memory allocations were reduced through optimizations in the pem handling processes. The CI pipeline has been updated to use a more recent version of the nightly compiler for the cargo-check-external-types. Support for the ed448 algorithm was added, expanding the cryptographic capabilities of the crate. An implementation of From<[u8; 4]> for Ipv4Addr was added, enhancing usability in networking contexts. Notably, version 1.13.0 also brings the implementation of Hash for multiple types, significantly improving the crate's hash functionality. This version also marks the contributions of new members in the community, enhancing collaboration and growth within the project.

Code Examples Add From<DnsName<'a>> for ServerName<'a>

impl From<DnsName<'a>> for ServerName<'a> {
   // implementation details...
}

Mark all possible functions const

const fn example() -> u32 { 42 }

Avoid some allocations in pem

pub fn decode(pem: &str) -> Result<Vec<u8>, PemError> {
   // implementation details avoiding allocations...
}

Take updated nightly for cargo-check-external-types

cargo +nightly check --all-features

Add ed448 support

pub fn ed448_sign(...params...) -> Signature {
   // ed448 signing implementation...
}

Add From<[u8; 4]> for Ipv4Addr

impl From<[u8; 4]> for Ipv4Addr {
   // conversion logic...
}

Implement Hash for multiple types

impl Hash for SomeType {
   // Hash implementation details...
}

Patch update: 1.13.1 → 1.13.2

$ DOWNLOADS TREND

141.6M183.0M

$ VERSION HISTORY

v1.13.2December 17, 2025
v1.13.1November 28, 2025
v1.13.0October 27, 2025
v1.12.0May 7, 2025

$ LINKS

$ INSTALL

cargo add rustls-pki-types

Or add to Cargo.toml: rustls-pki-types = "1.13.2"