Struct X509Extension
pub struct X509Extension(/* private fields */);
Expand description
Permit additional fields to be added to an X509
v3 certificate.
Implementations§
§impl X509Extension
impl X509Extension
pub 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.
pub 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.
Methods from Deref<Target = X509ExtensionRef>§
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the Extension to its standard DER encoding.
Trait Implementations§
§impl AsMut<X509ExtensionRef> for X509Extension
impl AsMut<X509ExtensionRef> for X509Extension
§fn as_mut(&mut self) -> &mut X509ExtensionRef
fn as_mut(&mut self) -> &mut X509ExtensionRef
§impl AsRef<X509ExtensionRef> for X509Extension
impl AsRef<X509ExtensionRef> for X509Extension
§fn as_ref(&self) -> &X509ExtensionRef
fn as_ref(&self) -> &X509ExtensionRef
§impl Borrow<X509ExtensionRef> for X509Extension
impl Borrow<X509ExtensionRef> for X509Extension
§fn borrow(&self) -> &X509ExtensionRef
fn borrow(&self) -> &X509ExtensionRef
§impl BorrowMut<X509ExtensionRef> for X509Extension
impl BorrowMut<X509ExtensionRef> for X509Extension
§fn borrow_mut(&mut self) -> &mut X509ExtensionRef
fn borrow_mut(&mut self) -> &mut X509ExtensionRef
§impl Deref for X509Extension
impl Deref for X509Extension
§type Target = X509ExtensionRef
type Target = X509ExtensionRef
§fn deref(&self) -> &X509ExtensionRef
fn deref(&self) -> &X509ExtensionRef
§impl DerefMut for X509Extension
impl DerefMut for X509Extension
§fn deref_mut(&mut self) -> &mut X509ExtensionRef
fn deref_mut(&mut self) -> &mut X509ExtensionRef
§impl ForeignType for X509Extension
impl ForeignType for X509Extension
§type Ref = X509ExtensionRef
type Ref = X509ExtensionRef
§unsafe fn from_ptr(ptr: *mut X509_extension_st) -> X509Extension
unsafe fn from_ptr(ptr: *mut X509_extension_st) -> X509Extension
§impl Stackable for X509Extension
impl Stackable for X509Extension
impl Send for X509Extension
impl Sync for X509Extension
Auto Trait Implementations§
impl Freeze for X509Extension
impl RefUnwindSafe for X509Extension
impl Unpin for X509Extension
impl UnwindSafe for X509Extension
Blanket Implementations§
§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> FutureExt for T
impl<T> FutureExt for T
§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
§fn and<P, B, E>(self, other: P) -> And<T, P>
fn and<P, B, E>(self, other: P) -> And<T, P>
Policy
that returns Action::Follow
only if self
and other
return
Action::Follow
. Read more