Expand description
X.509 Certificate Structures
This crate provides typed X.509 certificate structures based on RFC 5280. The structures are auto-generated from ASN.1 schemas using synta-codegen.
§Features
- Complete X.509 v3 certificate structures
- Based on RFC 5280 (Internet X.509 Public Key Infrastructure)
- Auto-generated from ASN.1 schema
- X.509v3 extension parsing and formatting
- Support for post-quantum algorithms (ML-DSA, ML-KEM)
- Helper functions for algorithm identification
§Two Certificate variants
§Borrowed (crate root) — parse-only workloads
The types at the crate root use zero-copy borrowed representations:
signature_value,subject_public_key:BitStringRef<'a>— borrow from the input bufferissuer,subject:RawDer<'a>— raw DER bytes, decoded lazily on demandextensions:Option<RawDer<'a>>— raw DER bytes for the extensions sequenceextn_value:OctetStringRef<'a>— zero-copy
ⓘ
use synta_certificate::Certificate;
use synta::{Decoder, Encoding};
let mut decoder = Decoder::new(der_bytes, Encoding::Der);
let cert: Certificate = decoder.decode().unwrap();
println!("Serial: {:?}", cert.tbs_certificate.serial_number);§Owned (owned) — constructing certificates programmatically
The types in owned use heap-allocating representations:
signature_value,subject_public_key:BitString— owned byte bufferissuer,subject:Name<'a>— fully parsed distinguished nameextensions:Option<Vec<Extension>>— owned extension listextn_value:OctetString— owned byte buffer
ⓘ
use synta_certificate::owned::{Certificate, TBSCertificate, AlgorithmIdentifier, Name};
use synta::BitString;
// Build a certificate without encode+decode workarounds
let cert = Certificate {
signature_value: BitString::new(sig_bytes.to_vec(), 0).unwrap(),
// ... other fields
};Re-exports§
pub use crypto::token_manager::Pkcs11KeyInfo;pub use crypto::token_manager::SlotInfo;pub use crypto::token_manager::TokenManager;pub use name::decode_string_value;pub use name::format_dn;pub use name::format_dn_slash;pub use name::parse_name_attrs;pub use name::NameBuilder;pub use pubkey::decode_public_key_info;pub use pubkey::PublicKeyInfo;pub use pem::decode_base64;pub use pem::der_to_pem;pub use pem::encode_base64;pub use pem::pem_blocks;pub use pem::pem_to_der;pub use time_utils::parse_generalized_time;pub use time_utils::parse_time;pub use pkcs1_types::RsaPublicKey;pub use mldsa_types::MlDsa44PrivateKey;pub use mldsa_types::MlDsa44PrivateKeyBoth;pub use mldsa_types::MlDsa44PublicKey;pub use mldsa_types::MlDsa65PrivateKey;pub use mldsa_types::MlDsa65PrivateKeyBoth;pub use mldsa_types::MlDsa65PublicKey;pub use mldsa_types::MlDsa87PrivateKey;pub use mldsa_types::MlDsa87PrivateKeyBoth;pub use mldsa_types::MlDsa87PublicKey;pub use crmf_builder::CertReqMessagesBuilder;pub use crmf_builder::CertReqMsgBuilder;pub use crmf_builder::PUB_METHOD_DONT_CARE;pub use crmf_builder::PUB_METHOD_LDAP;pub use crmf_builder::PUB_METHOD_WEB;pub use crmf_builder::PUB_METHOD_X500;pub use cmp_builder::CMPMessageBuilder;pub use crypto::constant_time_eq;pub use crypto::default_key_id_hasher;pub use crypto::default_signature_verifier;pub use crypto::BackendPrivateKey;pub use crypto::BackendPublicKey;pub use crypto::BlockCipherProvider;pub use crypto::CertificateSigner;pub use crypto::CmsDecryptor;pub use crypto::CmsEncryptor;pub use crypto::DataHasher;pub use crypto::Encryptor;pub use crypto::EnvelopedDataDecryptor;pub use crypto::ErasedCertificateSigner;pub use crypto::ErasedDataHasher;pub use crypto::ErasedHmacProvider;pub use crypto::ErasedKeyIdHasher;pub use crypto::ErasedSignatureVerifier;pub use crypto::ErasedStreamingHasher;pub use crypto::ErasedStreamingHmacProvider;pub use crypto::HashState;pub use crypto::HmacProvider;pub use crypto::HmacState;pub use crypto::KeyDecryptor;pub use crypto::KeyEncryptor;pub use crypto::KeyIdHasher;pub use crypto::KeyIdMethod;pub use crypto::KeySpec;pub use crypto::KeyWrapAlgorithm;pub use crypto::NoCmsDecryptor;pub use crypto::NoCrypto;pub use crypto::NoCryptoError;pub use crypto::NoEncryptor;pub use crypto::NoEncryptorError;pub use crypto::NoEnvelopedDataDecryptor;pub use crypto::NoEnvelopedDataDecryptorError;pub use crypto::NoKeyIdHasher;pub use crypto::NoKeyIdHasherError;pub use crypto::NoPkcs12Encryptor;pub use crypto::NoSignatureVerifier;pub use crypto::NoSignatureVerifierError;pub use crypto::NoSigner;pub use crypto::NoSignerError;pub use crypto::NoSymmetricCrypto;pub use crypto::Pbkdf2Provider;pub use crypto::Pkcs12Decryptor;pub use crypto::Pkcs12Encryptor;pub use crypto::PrivateKey;pub use crypto::PrivateKeyBuilder;pub use crypto::PrivateKeyError;pub use crypto::RsaPrivateComponents;pub use crypto::SecureRandom;pub use crypto::SignatureVerifier;pub use crypto::StreamingHasher;pub use crypto::StreamingHmacProvider;pub use crypto::UnsignedCertificateSigner;pub use crypto::default_create_enveloped_data;pub use crypto::default_prepare_enveloped_data;pub use crypto::DefaultCrypto;pub use crypto::DefaultCryptoError;pub use crypto::DefaultEnvelopedDataDecryptor;pub use crypto::hkdf_expand;pub use crypto::hkdf_extract;pub use crypto::hmac_output_len;pub use pkcs7::certs_from_pkcs7;pub use pkcs7::Pkcs7Error;pub use pkcs12::certs_from_pkcs12;pub use pkcs12::keys_from_pkcs12;pub use pkcs12::pki_from_pkcs12;pub use pkcs12::Pkcs12Error;pub use pkcs12::Pkcs12Pki;pub use pkcs12_builder::Pkcs12Builder;pub use pkcs12_builder::Pkcs12BuilderError;pub use enveloped_data_builder::EnvelopedDataBuilder;pub use enveloped_data_builder::EnvelopedDataBuilderError;pub use openssl_backend::create_enveloped_data;pub use openssl_backend::prepare_enveloped_data;pub use openssl_backend::OpensslCertificateSigner;pub use openssl_backend::OpensslCertificateSignerError;pub use openssl_backend::OpensslDecryptor;pub use openssl_backend::OpensslDecryptorError;pub use openssl_backend::OpensslEncryptor;pub use openssl_backend::OpensslEncryptorError;pub use openssl_backend::OpensslEnvelopedDataDecryptor;pub use openssl_backend::OpensslKeyError;pub use openssl_backend::OpensslKeyIdHasher;pub use openssl_backend::OpensslKeyIdHasherError;pub use openssl_backend::OpensslPkcs12Encryptor;pub use openssl_backend::OpensslPrivateKey;pub use openssl_backend::OpensslRsaOaepDecryptor;pub use openssl_backend::OpensslRsaOaepEncryptor;pub use openssl_backend::OpensslRsaPkcs1Decryptor;pub use openssl_backend::OpensslRsaPkcs1Encryptor;pub use openssl_backend::OpensslSignatureVerifier;pub use openssl_backend::OpensslSymmetricCrypto;pub use openssl_backend::OpensslSymmetricError;pub use openssl_backend::OpensslVerifierError;pub use openssl_backend::Pkcs12Cipher;pub use openssl_backend::Pkcs12Config;pub use openssl_backend::Pkcs12HmacAlgorithm;pub use ext_builder::encode_basic_constraints;pub use ext_builder::encode_key_usage;pub use ext_builder::encode_subject_key_identifier;pub use ext_builder::AuthorityInformationAccessBuilder;pub use ext_builder::CRLDistributionPointsBuilder;pub use ext_builder::CertificatePoliciesBuilder;pub use ext_builder::ExtendedKeyUsageBuilder;pub use ext_builder::IssuerAlternativeNameBuilder;pub use ext_builder::IssuingDistributionPointBuilder;pub use ext_builder::NameConstraintsBuilder;pub use ext_builder::SubjectAlternativeNameBuilder;pub use builder::BuilderError;pub use builder::CertificateBuilder;pub use csr_builder::CsrBuilder;pub use csr_builder::CsrBuilderError;pub use ac_builder::AttributeCertificateBuilder;pub use crl_builder::CertificateListBuilder;pub use ocsp_builder::OCSPResponseBuilder;pub use ocsp_builder::SingleResponseSpec;pub use ocsp_request_builder::CertIDSpec;pub use ocsp_request_builder::OCSPRequestBuilder;pub use tsp_builder::TimeStampReqBuilder;pub use ess_builder::ESSSecurityLabelBuilder;pub use ess_builder::ReceiptRequestBuilder;pub use ess_builder::SigningCertificateBuilder;pub use pkcs5_builder::Pbes2ParamsBuilder;pub use pkcs5_builder::Pbkdf2ParamsBuilder;pub use logotype_builder::LogotypeDetailsSpec;pub use logotype_builder::LogotypeExtnBuilder;pub use ace88_builder::AuthenticationContextsBuilder;pub use reader::read_pki_blocks;pub use reader::PkiDecryptor;pub use reader::ReadAnyError;pub use general_name::GeneralNameSpec;
Modules§
- ac_
builder - Builder for RFC 5755 Attribute Certificate TBS encoding.
- ace88_
builder - Builder for RFC 7773 Authentication Context certificate extension (ACE-88).
- ace88_
types - RFC 7773 Authentication Context Certificate Extension (ACE-88, 1988 syntax).
- acme_
types - RFC 8737: ACME TLS-ALPN-01 identifier extension (
id-pe-acmeIdentifier). - alg_
info_ types - RFC 5912 AlgorithmInformation-2009 — algorithm information object classes
and the parameterized
AlgorithmIdentifiertype for 2009-syntax modules. - attribute_
cert_ types - RFC 5755 X.509 Attribute Certificate v2 types.
- builder
- X.509 v3 certificate builder.
- cbor_
content_ types - RFC 8769 CBOR content type OID constants for CMS.
- cert_
image_ module_ types - RFC 9399 §A.1 Certificate Image OID module.
- cmp_
builder - Builder for CMP (RFC 9810 / RFC 4210) PKI messages.
- cmp_
types - RFC 9810 Certificate Management Protocol (CMP) v3 types.
- cms_
2009_ types - RFC 5911 CryptographicMessageSyntax-2009 OID constants and structural types.
- cms_
2010_ types - RFC 5652 / RFC 6268 Cryptographic Message Syntax (CMS) 2010 types.
- cms_
cek_ hkdf_ sha256_ 2023_ types - S/MIME v3.1 message types and OIDs (RFC 8551).
- cms_
gmac_ algorithms_ types - CMS CEK-HKDF-SHA256 Algorithm OID (RFC 9709).
- cms_
kem_ types - RFC 9629 §6.2 CMS KEM Recipient Info types.
- cms_
ori_ for_ psk_ 2019_ types - PKCS#12 PBMAC1 MAC parameters (RFC 9879).
- cms_
rfc5652_ types - RFC 5652 Cryptographic Message Syntax (CMS) full structure types.
- crl
- X.509 Certificate Revocation List (RFC 5280 §5) types.
- crl_
builder - Builder for RFC 5280 §5 Certificate Revocation List TBS encoding.
- crmf_
builder - Builder for CRMF (RFC 4211) certificate request messages.
- crmf_
types - RFC 4211 Certificate Request Message Format (CRMF) types.
- crypto
- Crypto trait abstractions and backend-agnostic key types.
- csr
- PKCS #10 Certificate Signing Request (RFC 2986) types.
- csr_
builder - PKCS #10 Certificate Signing Request (RFC 2986) builder.
- delegated_
cred_ extn_ types - RFC 9345 DelegatedCredentialExtn —
DelegationUsagecertificate extension. - enveloped_
data_ builder - CMS
EnvelopedData(RFC 5652 §6) builder. - ess_
builder - Builders for RFC 2634 Extended Security Services (ESS) structures.
- ess_
types - RFC 2634 Extended Security Services (ESS) types.
- ext_
builder - DER encoders for common X.509 v3 extension values.
- general_
name - Context-specific tag numbers for the
GeneralNameCHOICE type (RFC 5280 §4.2.1.6). - hkdf_
oid_ 2019_ types - CMS GMAC Algorithm OIDs and parameters (RFC 9044).
- kem_
alg_ info_ types - RFC 9629 §6.1 KEM Algorithm Information Object Class.
- logotype_
builder - Builder for RFC 9399 Logotype certificate extension (OID 1.3.6.1.5.5.7.1.12).
- logotype_
cert_ extn_ types - RFC 9399 §A.1 Logotype certificate extension types (1988 ASN.1 syntax).
- mldsa_
types - ML-DSA key structure types (RFC 9881 / FIPS 204).
- ms_
pki_ types - Microsoft PKI OID constants and AD CS extension structures.
- name
- X.509 Distinguished Name formatting and building.
- names
- Human-readable algorithm name strings.
- nf_
type_ cert_ extn_ types - RFC 9310 NFTypeCertExtn — Network Function type certificate extension.
- no_
rev_ avail_ extn_ types - RFC 9608 NoRevAvailExtn —
noRevAvailcertificate extension (OID 2.5.29.56). - ocsp
- Online Certificate Status Protocol (RFC 6960) types.
- ocsp_
2024_ 08_ types - RFC 9654 OCSP-2024-08 — updated OCSP module in 2008 ASN.1 syntax.
- ocsp_
2024_ 88_ types - RFC 9654 OCSP-2024-88 — updated OCSP module in 1988 ASN.1 syntax.
- ocsp_
builder - Builder for RFC 6960 OCSP response encoding.
- ocsp_
request_ builder - Builder for RFC 6960 OCSP request encoding.
- oids
- Well-known algorithm and attribute OID component arrays.
- openssl_
backend - OpenSSL-backed
crate::Pkcs12Decryptorandcrate::SignatureVerifierimplementations. - owned
- Owned X.509 types for constructing certificates programmatically.
- pem
- pk_
validation_ attr_ types - RFC 8479 PrivateKeyValidationAttrV1 — private key validation attribute.
- pkcs7
- pkcs1_
types - PKCS #1 RSA key structures and algorithm parameters (RFC 8017).
- pkcs5_
builder - Builders for PKCS #5 v2.1 (RFC 8018) parameter structures.
- pkcs5_
types - PKCS #5 v2.1 parameter types and OID constants (RFC 8018).
- pkcs7_
types - CMS / PKCS#7 OID constants and ContentInfo type.
- pkcs8_
types - PKCS #8 private key structure types.
- pkcs9_
types - PKCS #9 attribute type OID constants.
- pkcs12
- pkcs11_
mgmt - PKCS#11 token management via the
cryptokicrate. - pkcs12_
builder - PKCS#12
PFXarchive builder. - pkcs12_
pbmac1_ 2023_ types - RPKI signed manifest types (RFC 9286).
- pkcs12_
types - PKCS#12 OID constants and parameter types.
- pkinit_
types - PKINIT OID constants and protocol structures.
- pkix1_
explicit_ types - RFC 5912 PKIX1Explicit-2009 — 2009-syntax restatement of the RFC 5280 explicit-tags module, using information object classes and parameterized types.
- pkix1_
implicit_ types - RFC 5912 PKIX1Implicit-2009 — 2009-syntax restatement of the RFC 5280 implicit-tags module, defining X.509v3 certificate extension structures.
- pkix1_
pss_ oaep_ alg_ 2009_ types - RFC 5912 §8 PKIX1-PSS-OAEP-Algorithms-2009 — RSA-PSS and RSA-OAEP.
- pkix_
common_ types - RFC 5912 PKIX-CommonTypes-2009 — information object class definitions and parameterized helper types used across the 2009-syntax PKIX module suite.
- pkix_
test_ cert_ policies_ types - RFC 7229 test certificate policy OIDs.
- pkixalgs_
2009_ types - RFC 5912 PKIXAlgs-2009 — 2009-syntax restatement of RFC 3279 / RFC 5480 public key and signature algorithm parameters.
- pkixalgs_
types - RFC 3279 algorithm parameter and signature types (DSA, DH, ECDSA).
- pubkey
- Public key algorithm identification and decoded key data.
- reader
- Format-agnostic PKI data reader.
- rfc9925_
types - RFC 9925 Unsigned X.509 Certificate OID constants.
- rpc_
with_ tls_ 2021_ types - CMS OtherRecipientInfo for Pre-Shared Key (RFC 8696).
- rpki_
manifest_ types FileAndHashfor RPKI signed object manifest content type.- slh_
dsa_ module_ 2024_ types - RFC 9814 SLH-DSA (SPHINCS+) X.509 key-container types.
- smime_
v3dot1_ types - for S/MIME 4.0 message handling.
- time_
utils - Shared time-string parsing helpers for the builder modules.
- tls_
feature_ module_ types - RFC 7633 TLS-Feature-Module-2015 — TLS features certificate extension.
- tsp_
builder - Builder for RFC 3161 Time-Stamp Protocol (TSP) request encoding.
- tsp_
types - RFC 3161 Time-Stamp Protocol (TSP) types.
- x509_
ml_ dsa_ 2025_ types - RFC 9881 X.509 ML-DSA (CRYSTALS-Dilithium) algorithm identifier module.
- x509_
ml_ kem_ 2025_ types - RFC 9935 ML-KEM (CRYSTALS-Kyber) X.509 key-container types.
Structs§
- Access
Description - Algorithm
Identifier - Attribute
Type AndValue - Authority
KeyIdentifier - Basic
Constraints - Cert
Byte Ranges - Byte ranges within a DER-encoded
Certificateneeded for signature verification. - Certificate
- Distribution
Point - EDIParty
Name - Extension
- General
Subtree - Issuing
Distribution Point - Name
Constraints - Other
Name - Pkcs11
Uri - RFC 7512
pkcs11:URI — holds the verbatim URI string and decoded attributes (token label, object label, CKA_ID, PIN). Returned byPkcs11Urifor HSM-backed keys. A parsedpkcs11:URI — holds both the original string and the decoded attributes so callers never need to re-parse. - Pkcs11
UriAttributes - RFC 7512
pkcs11:URI — holds the verbatim URI string and decoded attributes (token label, object label, CKA_ID, PIN). Returned byPkcs11Urifor HSM-backed keys. Parsed attributes from apkcs11:URI (RFC 7512). - Policy
Constraints - Policy
Information - Policy
Mappings Element - Policy
Qualifier Info - Subject
Public KeyInfo - TBSCertificate
- Validity
Enums§
Constants§
- ANSI_
X962 - ANSI_
X962_ CURVES - ANSI_
X962_ KEY_ TYPE - ANSI_
X962_ SIGNATURES - ANY_
EXTENDED_ KEY_ USAGE - CERTICOM_
CURVE - DOMAIN_
COMPONENT - ECDSA_
WITH_ SHA1 - ECDSA_
WITH_ SHA256 - ECDSA_
WITH_ SHA384 - ECDSA_
WITH_ SHA512 - EC_
PUBLIC_ KEY - GOOGLE_
ARC - GOOGLE_
CT - HASH_
ALGS - ID_AD
- ID_
AD_ CA_ ISSUERS - ID_
AD_ OCSP - ID_ALG
- ID_AT
- ID_
AT_ BUSINESS_ CATEGORY - ID_
AT_ COMMON_ NAME - ID_
AT_ COUNTRY_ NAME - ID_
AT_ DN_ QUALIFIER - ID_
AT_ GENERATION_ QUALIFIER - ID_
AT_ GIVEN_ NAME - ID_
AT_ INITIALS - ID_
AT_ LOCALITY_ NAME - ID_
AT_ ORGANIZATIONAL_ UNIT_ NAME - ID_
AT_ ORGANIZATION_ IDENTIFIER - ID_
AT_ ORGANIZATION_ NAME - ID_
AT_ POSTAL_ CODE - ID_
AT_ PSEUDONYM - ID_
AT_ SERIAL_ NUMBER - ID_
AT_ STATE_ OR_ PROVINCE_ NAME - ID_
AT_ STREET_ ADDRESS - ID_
AT_ SURNAME - ID_
AT_ TITLE - ID_CE
- ID_
CE_ AUTHORITY_ KEY_ IDENTIFIER - ID_
CE_ BASIC_ CONSTRAINTS - ID_
CE_ CERTIFICATE_ ISSUER - ID_
CE_ CERTIFICATE_ POLICIES - ID_
CE_ C_ RLDISTRIBUTION_ POINTS - ID_
CE_ C_ RLNUMBER - ID_
CE_ C_ RLREASON - ID_
CE_ DELTA_ CRLINDICATOR - ID_
CE_ EXT_ KEY_ USAGE - ID_
CE_ FRESHEST_ CRL - ID_
CE_ INHIBIT_ ANY_ POLICY - ID_
CE_ INVALIDITY_ DATE - ID_
CE_ ISSUER_ ALT_ NAME - ID_
CE_ ISSUING_ DISTRIBUTION_ POINT - ID_
CE_ KEY_ USAGE - ID_
CE_ NAME_ CONSTRAINTS - ID_
CE_ POLICY_ CONSTRAINTS - ID_
CE_ POLICY_ MAPPINGS - ID_
CE_ PRIVATE_ KEY_ USAGE_ PERIOD - ID_
CE_ SUBJECT_ ALT_ NAME - ID_
CE_ SUBJECT_ DIRECTORY_ ATTRIBUTES - ID_
CE_ SUBJECT_ KEY_ IDENTIFIER - ID_
CT_ SCTS - ID_DSA
- ID_
ED448 - ID_
ED25519 - ID_
EMAIL_ ADDRESS - ID_KP
- ID_
KP_ CLIENT_ AUTH - ID_
KP_ CODE_ SIGNING - ID_
KP_ EMAIL_ PROTECTION - ID_
KP_ OCSPSIGNING - ID_
KP_ SERVER_ AUTH - ID_
KP_ TIME_ STAMPING - ID_
MLDS A44_ ECDSA_ P256_ SHA256 - ID_
MLDS A44_ ED25519_ SHA512 - ID_
MLDS A44_ RSA2048_ PKCS15_ SHA256 - ID_
MLDS A44_ RSA2048_ PSS_ SHA256 - ID_
MLDS A65_ ECDSA_ BRAINPOOL_ P256 R1_ SHA512 - ID_
MLDS A65_ ECDSA_ P256_ SHA512 - ID_
MLDS A65_ ECDSA_ P384_ SHA512 - ID_
MLDS A65_ ED25519_ SHA512 - ID_
MLDS A65_ RSA3072_ PKCS15_ SHA512 - ID_
MLDS A65_ RSA3072_ PSS_ SHA512 - ID_
MLDS A65_ RSA4096_ PKCS15_ SHA512 - ID_
MLDS A65_ RSA4096_ PSS_ SHA512 - ID_
MLDS A87_ ECDSA_ BRAINPOOL_ P384 R1_ SHA512 - ID_
MLDS A87_ ECDSA_ P384_ SHA512 - ID_
MLDS A87_ ECDSA_ P521_ SHA512 - ID_
MLDS A87_ ED448_ SHAK E256 - ID_
MLDS A87_ RSA3072_ PSS_ SHA512 - ID_
MLDS A87_ RSA4096_ PSS_ SHA512 - ID_
ML_ DSA_ 44 - ID_
ML_ DSA_ 65 - ID_
ML_ DSA_ 87 - ID_
ML_ KEM_ 512 - ID_
ML_ KEM_ 768 - ID_
ML_ KEM_ 1024 - ID_PE
- ID_
PE_ AUTHORITY_ INFO_ ACCESS - ID_
PE_ SUBJECT_ INFO_ ACCESS - ID_SHA1
- ID_
SHA3_ 224 - ID_
SHA3_ 256 - ID_
SHA3_ 384 - ID_
SHA3_ 512 - ID_
SHA224 - ID_
SHA256 - ID_
SHA384 - ID_
SHA512 - ID_
SHA512_ 224 - ID_
SHA512_ 256 - ID_
SHAK E128 - ID_
SHAK E256 - ID_
SLH_ DSA_ SHA2_ 128F - ID_
SLH_ DSA_ SHA2_ 128S - ID_
SLH_ DSA_ SHA2_ 192F - ID_
SLH_ DSA_ SHA2_ 192S - ID_
SLH_ DSA_ SHA2_ 256F - ID_
SLH_ DSA_ SHA2_ 256S - ID_
SLH_ DSA_ SHAKE_ 128F - ID_
SLH_ DSA_ SHAKE_ 128S - ID_
SLH_ DSA_ SHAKE_ 192F - ID_
SLH_ DSA_ SHAKE_ 192S - ID_
SLH_ DSA_ SHAKE_ 256F - ID_
SLH_ DSA_ SHAKE_ 256S - KEM_
ALGS - KEY_
USAGE_ C_ RLSIGN - Bit position for
cRLSignin KeyUsage - KEY_
USAGE_ DATA_ ENCIPHERMENT - Bit position for
dataEnciphermentin KeyUsage - KEY_
USAGE_ DECIPHER_ ONLY - Bit position for
decipherOnlyin KeyUsage - KEY_
USAGE_ DIGITAL_ SIGNATURE - Bit position for
digitalSignaturein KeyUsage - KEY_
USAGE_ ENCIPHER_ ONLY - Bit position for
encipherOnlyin KeyUsage - KEY_
USAGE_ KEY_ AGREEMENT - Bit position for
keyAgreementin KeyUsage - KEY_
USAGE_ KEY_ CERT_ SIGN - Bit position for
keyCertSignin KeyUsage - KEY_
USAGE_ KEY_ ENCIPHERMENT - Bit position for
keyEnciphermentin KeyUsage - KEY_
USAGE_ NON_ REPUDIATION - Bit position for
nonRepudiationin KeyUsage - MD5_
WITH_ RSA - NIST_
ALGORITHMS - OIW_
SECSIG_ ALGORITHMS - PKCS_1
- PKCS_9
- PRIM
E256 V1 - REASON_
FLAGS_ AFFILIATION_ CHANGED - Bit position for
affiliationChangedin ReasonFlags - REASON_
FLAGS_ A_ ACOMPROMISE - Bit position for
aACompromisein ReasonFlags - REASON_
FLAGS_ CERTIFICATE_ HOLD - Bit position for
certificateHoldin ReasonFlags - REASON_
FLAGS_ CESSATION_ OF_ OPERATION - Bit position for
cessationOfOperationin ReasonFlags - REASON_
FLAGS_ C_ ACOMPROMISE - Bit position for
cACompromisein ReasonFlags - REASON_
FLAGS_ KEY_ COMPROMISE - Bit position for
keyCompromisein ReasonFlags - REASON_
FLAGS_ PRIVILEGE_ WITHDRAWN - Bit position for
privilegeWithdrawnin ReasonFlags - REASON_
FLAGS_ SUPERSEDED - Bit position for
supersededin ReasonFlags - REASON_
FLAGS_ UNUSED - Bit position for
unusedin ReasonFlags - RSA_
ENCRYPTION - SECP256
K1 - SECP384
R1 - SECP521
R1 - SHA1_
WITH_ RSA - SHA256_
WITH_ RSA - SHA384_
WITH_ RSA - SHA512_
WITH_ RSA - SIG_
ALGS - UID
Functions§
- cert_
byte_ ranges - Extract the byte ranges required for certificate signature verification
from a DER-encoded
Certificate. - decode_
extensions - Decode the raw DER bytes of an Extensions SEQUENCE OF into a
Vec<Extension>. - default_
block_ cipher_ provider - Return the default
BlockCipherProviderfor the active crypto backend. - default_
data_ hasher - Return the default
DataHasherfor the active crypto backend. - default_
hmac_ provider - Return the default
HmacProviderfor the active crypto backend. - default_
pbkdf2_ provider - Return the default
Pbkdf2Providerfor the active crypto backend. - default_
secure_ random - Return the default
SecureRandomfor the active crypto backend. - default_
streaming_ hasher - Return the default
StreamingHasherfor the active crypto backend. - default_
streaming_ hmac_ provider - Return the default
StreamingHmacProviderfor the active crypto backend. - digest_
alg_ id - Return the
AlgorithmIdentifierfor a named hash (digest) algorithm. - ec_
curve_ key_ bits - Return the key size in bits for a well-known EC named curve OID.
- ec_
curve_ nist_ name - Return the NIST curve name for a well-known EC named curve OID.
- ec_
curve_ short_ name - Return the short ASN.1 name for a well-known EC named curve OID.
- encode_
general_ names - Encode a list of
(tag_number, content_bytes)pairs as a DERSEQUENCE OF GeneralName. - extension_
oid_ name - Return the display name for a well-known X.509v3 extension OID.
- find_
extension_ value - Single-pass scan of a DER-encoded
SEQUENCE OF Extension, returning theextnValuecontent bytes of the first extension whoseextnIdmatchesoid. Stops as soon as the matching extension is found without decoding the remainder of the sequence. - format_
extension_ value - Format the human-readable content of a well-known X.509v3 extension value.
- identify_
public_ key_ algorithm - Return the canonical display name for a public key algorithm OID, if known.
- identify_
signature_ algorithm - Return the canonical display name for a signature algorithm OID.
- key_
usage_ bit - Test one bit in a
KeyUsageBIT STRING. - list_
pkcs11_ slots - List all PKCS#11 token slots using the active module.
- merge_
object_ label - RFC 7512
pkcs11:URI — holds the verbatim URI string and decoded attributes (token label, object label, CKA_ID, PIN). Returned byPkcs11Urifor HSM-backed keys. Insertobject=<label>into the path portion of apkcs11:URI, replacing any existingobject=segment. - parse_
general_ names - Parse a DER-encoded
SEQUENCE OF GeneralNameinto raw(tag_number, content)pairs. - pct_
encode_ path - RFC 7512
pkcs11:URI — holds the verbatim URI string and decoded attributes (token label, object label, CKA_ID, PIN). Returned byPkcs11Urifor HSM-backed keys. Percent-encode a string value for use in a PKCS#11 URI path component. - pkcs11_
manager - Return a
Pkcs11Managerusing the active module (resolved fromPKCS11_MODULE_PATHenv var or/usr/lib64/pkcs11/p11-kit-proxy.so). - signing_
algorithm_ der - Build and DER-encode a signing
AlgorithmIdentifierfrom a key type OID and a hash algorithm name. - validate_
envelope - Validate the outer Certificate SEQUENCE envelope without fully decoding.
Type Aliases§
- Attribute
Type - Attribute
Value - Authority
Info Access Syntax - CRLDistribution
Points - Certificate
Policies - Certificate
Serial Number - Extended
KeyUsage - Extensions
- FreshestCRL
- General
Names - General
Subtrees - Inhibit
AnyPolicy - Issuer
AltName - KeyPurpose
Id - KeyUsage
- Policy
Mappings - RDNSequence
- Reason
Flags - Relative
Distinguished Name - Subject
AltName - Subject
Info Access Syntax - Subject
KeyIdentifier - Unique
Identifier - Version