pub struct X509PubkeyRef(/* private fields */);
Expand description
Reference to X509Pubkey
.
Implementations§
Source§impl X509PubkeyRef
impl X509PubkeyRef
Sourcepub fn to_owned(&self) -> Result<X509Pubkey, ErrorStack>
pub fn to_owned(&self) -> Result<X509Pubkey, ErrorStack>
Copies the X509 SubjectPublicKeyInfo to a new X509Pubkey
.
This corresponds to X509_PUBKEY_dup
.
Sourcepub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
pub fn to_der(&self) -> Result<Vec<u8>, ErrorStack>
Serializes the X509 SubjectPublicKeyInfo to DER-encoded.
This corresponds to i2d_X509_PUBKEY
.
Sourcepub fn public_key(&self) -> Result<PKey<Public>, ErrorStack>
pub fn public_key(&self) -> Result<PKey<Public>, ErrorStack>
Returns the public key of the X509 SubjectPublicKeyInfo.
This corresponds to [`X509_PUBKEY_get“]
Sourcepub fn encoded_bytes(&self) -> Result<&[u8], ErrorStack>
pub fn encoded_bytes(&self) -> Result<&[u8], ErrorStack>
Get the encoded bytes of the X509 SubjectPublicKeyInfo.
This corresponds to ‘X509_PUBKEY_get0_param’
Trait Implementations§
Source§impl AsRef<X509PubkeyRef> for X509Pubkey
impl AsRef<X509PubkeyRef> for X509Pubkey
Source§fn as_ref(&self) -> &X509PubkeyRef
fn as_ref(&self) -> &X509PubkeyRef
Converts this type into a shared reference of the (usually inferred) input type.
Source§impl Borrow<X509PubkeyRef> for X509Pubkey
impl Borrow<X509PubkeyRef> for X509Pubkey
Source§fn borrow(&self) -> &X509PubkeyRef
fn borrow(&self) -> &X509PubkeyRef
Immutably borrows from an owned value. Read more
Source§impl ForeignTypeRef for X509PubkeyRef
impl ForeignTypeRef for X509PubkeyRef
Source§type CType = X509_PUBKEY
type CType = X509_PUBKEY
The raw C type.
Source§unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
unsafe fn from_ptr<'a>(ptr: *mut Self::CType) -> &'a Self
Constructs a shared instance of this type from its raw type.
Source§unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
unsafe fn from_ptr_mut<'a>(ptr: *mut Self::CType) -> &'a mut Self
Constructs a mutable reference of this type from its raw type.
impl Send for X509PubkeyRef
impl Sync for X509PubkeyRef
Auto Trait Implementations§
impl !Freeze for X509PubkeyRef
impl !RefUnwindSafe for X509PubkeyRef
impl Unpin for X509PubkeyRef
impl UnwindSafe for X509PubkeyRef
Blanket Implementations§
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
Mutably borrows from an owned value. Read more