pub struct SubjectAlternativeName { /* private fields */ }Expand description
An extension that allows additional identities to be bound to the subject of the certificate.
Implementations§
Source§impl SubjectAlternativeName
impl SubjectAlternativeName
Sourcepub fn new() -> SubjectAlternativeName
pub fn new() -> SubjectAlternativeName
Construct a new SubjectAlternativeName extension.
Sourcepub fn critical(&mut self) -> &mut SubjectAlternativeName
pub fn critical(&mut self) -> &mut SubjectAlternativeName
Sets the critical flag to true. The extension will be critical.
Sourcepub fn email(&mut self, email: &str) -> &mut SubjectAlternativeName
pub fn email(&mut self, email: &str) -> &mut SubjectAlternativeName
Sets the email flag.
Sourcepub fn uri(&mut self, uri: &str) -> &mut SubjectAlternativeName
pub fn uri(&mut self, uri: &str) -> &mut SubjectAlternativeName
Sets the uri flag.
Sourcepub fn dns(&mut self, dns: &str) -> &mut SubjectAlternativeName
pub fn dns(&mut self, dns: &str) -> &mut SubjectAlternativeName
Sets the dns flag.
Sourcepub fn rid(&mut self, rid: &str) -> &mut SubjectAlternativeName
pub fn rid(&mut self, rid: &str) -> &mut SubjectAlternativeName
Sets the rid flag.
Sourcepub fn ip(&mut self, ip: &str) -> &mut SubjectAlternativeName
pub fn ip(&mut self, ip: &str) -> &mut SubjectAlternativeName
Sets the ip flag.
Sourcepub fn dir_name(&mut self, _dir_name: &str) -> &mut SubjectAlternativeName
👎Deprecated: dir_name is deprecated and always panics. Please use dir_name2.
pub fn dir_name(&mut self, _dir_name: &str) -> &mut SubjectAlternativeName
Sets the dirName flag.
Not currently actually supported, always panics. Please use dir_name2
Sourcepub fn dir_name2(&mut self, dir_name: X509Name) -> &mut SubjectAlternativeName
pub fn dir_name2(&mut self, dir_name: X509Name) -> &mut SubjectAlternativeName
Sets the dirName flag.
Sourcepub fn other_name(&mut self, _other_name: &str) -> &mut SubjectAlternativeName
👎Deprecated: other_name is deprecated and always panics. Please use other_name2.
pub fn other_name(&mut self, _other_name: &str) -> &mut SubjectAlternativeName
Sets the otherName flag.
Not currently actually supported, always panics. Please use other_name2
Sourcepub fn other_name2(
&mut self,
oid: Asn1Object,
content: &[u8],
) -> &mut SubjectAlternativeName
pub fn other_name2( &mut self, oid: Asn1Object, content: &[u8], ) -> &mut SubjectAlternativeName
Sets the otherName flag.
content must be a valid der encoded ASN1_TYPE
If you want to add just a ia5string use other_name_ia5string
Sourcepub fn build(
&self,
_ctx: &X509v3Context<'_>,
) -> Result<X509Extension, ErrorStack>
pub fn build( &self, _ctx: &X509v3Context<'_>, ) -> Result<X509Extension, ErrorStack>
Return a SubjectAlternativeName extension as an X509Extension.
Trait Implementations§
Source§impl Default for SubjectAlternativeName
impl Default for SubjectAlternativeName
Source§fn default() -> SubjectAlternativeName
fn default() -> SubjectAlternativeName
Returns the “default value” for a type. Read more