Crate spki[][src]

Expand description

X.509 Subject Public Key Info (SPKI) types describing public keys and their associated AlgorithmIdentifier OIDs.

Described in RFC 5280 Section 4.1.

Minimum Supported Rust Version

This crate requires Rust 1.51 at a minimum.

Usage

The following example demonstrates how to use an OID as the parameters of an AlgorithmIdentifier.

Borrow the ObjectIdentifier first then use Into (or Any::from):

use spki::{AlgorithmIdentifier, ObjectIdentifier};

let alg_oid = "1.2.840.10045.2.1".parse::<ObjectIdentifier>().unwrap();
let params_oid = "1.2.840.10045.3.1.7".parse::<ObjectIdentifier>().unwrap();

let alg_id = AlgorithmIdentifier {
    oid: alg_oid,
    parameters: Some((&params_oid).into())
};

Re-exports

pub use der;

Structs

X.509 AlgorithmIdentifier as defined in RFC 5280 Section 4.1.1.2.

Object identifier (OID).

X.509 SubjectPublicKeyInfo (SPKI) as defined in RFC 5280 Section 4.1.2.7.