Struct openssl::x509::X509Extension
source · pub struct X509Extension(_);
Expand description
Permit additional fields to be added to an X509
v3 certificate.
Implementations§
source§impl X509Extension
impl X509Extension
sourcepub fn new(
conf: Option<&ConfRef>,
context: Option<&X509v3Context<'_>>,
name: &str,
value: &str
) -> Result<X509Extension, ErrorStack>
pub fn new(
conf: Option<&ConfRef>,
context: Option<&X509v3Context<'_>>,
name: &str,
value: &str
) -> Result<X509Extension, ErrorStack>
Constructs an X509 extension value. See man x509v3_config
for information on supported
names and their value formats.
Some extension types, such as subjectAlternativeName
, require an X509v3Context
to be
provided.
See the extension module for builder types which will construct certain common extensions.
sourcepub fn new_nid(
conf: Option<&ConfRef>,
context: Option<&X509v3Context<'_>>,
name: Nid,
value: &str
) -> Result<X509Extension, ErrorStack>
pub fn new_nid(
conf: Option<&ConfRef>,
context: Option<&X509v3Context<'_>>,
name: Nid,
value: &str
) -> Result<X509Extension, ErrorStack>
Constructs an X509 extension value. See man x509v3_config
for information on supported
extensions and their value formats.
Some extension types, such as nid::SUBJECT_ALTERNATIVE_NAME
, require an X509v3Context
to
be provided.
See the extension module for builder types which will construct certain common extensions.
sourcepub unsafe fn add_alias(to: Nid, from: Nid) -> Result<(), ErrorStack>
pub unsafe fn add_alias(to: Nid, from: Nid) -> Result<(), ErrorStack>
Adds an alias for an extension
Safety
This method modifies global state without locking and therefore is not thread safe
This corresponds to X509V3_EXT_add_alias
.