pub struct KeyLoader;Expand description
rustls CryptoProvider::key_provider 字段的实现:把
PrivateKeyDer(PKCS#8/SEC1/PKCS#1)分派到对应签名密钥类型。
Implementations§
Source§impl KeyLoader
impl KeyLoader
Sourcepub fn from_pkcs8(der: &[u8]) -> Result<Arc<dyn SigningKey>, RustlsError>
pub fn from_pkcs8(der: &[u8]) -> Result<Arc<dyn SigningKey>, RustlsError>
PKCS#8 通用分派(对 any_supported_type 与本 trait 共用)。
Trait Implementations§
Source§impl KeyProvider for KeyLoader
impl KeyProvider for KeyLoader
Source§fn load_private_key(
&self,
key_der: PrivateKeyDer<'static>,
) -> Result<Arc<dyn SigningKey>, RustlsError>
fn load_private_key( &self, key_der: PrivateKeyDer<'static>, ) -> Result<Arc<dyn SigningKey>, RustlsError>
Decode and validate a private signing key from
key_der. Read moreAuto Trait Implementations§
impl Freeze for KeyLoader
impl RefUnwindSafe for KeyLoader
impl Send for KeyLoader
impl Sync for KeyLoader
impl Unpin for KeyLoader
impl UnsafeUnpin for KeyLoader
impl UnwindSafe for KeyLoader
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