pub struct X509Extension(/* private fields */);
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.
DO NOT CALL THIS WITH UNTRUSTED value
: value
is an OpenSSL
mini-language that can read arbitrary files.
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.
DO NOT CALL THIS WITH UNTRUSTED value
: value
is an OpenSSL
mini-language that can read arbitrary files.
See the extension module for builder types which will construct certain common extensions.