Module objects

Source
Expand description

X.509 helper objects definitions and registry

All OID objects and definitions are now stored in the oid-registry crate.

This crate is re-exporting oid-registry, so to access the OID constants the x509_parser::oid_oid_registry namespace can be used (see example below).

§Example

To get the short name for a given OID:

use x509_parser::objects::*;
use x509_parser::oid_registry::*;

let oid = &OID_X509_COMMON_NAME;
let sn = oid2sn(oid, oid_registry());
assert_eq!(sn, Ok("commonName"));

Functions§

oid2abbrev
Return the abbreviation (for ex. CN for Common Name), or if not found, the OID short name
oid2description
Returns the description corresponding to the OID
oid2sn
Returns the short name corresponding to the OID
oid_registry
Return a reference to the default registry of known OIDs