Enum tugger_code_signing::SigningCertificate [−][src]
pub enum SigningCertificate { Memory(CapturedX509Certificate, InMemorySigningKeyPair), PfxFile(PathBuf, String, CapturedX509Certificate, InMemorySigningKeyPair), WindowsStoreAuto, WindowsStoreSubject(SystemStore, String), WindowsStoreSha1Thumbprint(SystemStore, String), }
Represents a signing key and public certificate to sign something.
Variants
A parsed certificate and signing key stored in memory.
The private key is managed by the ring
crate.
PfxFile(PathBuf, String, CapturedX509Certificate, InMemorySigningKeyPair)
A PFX file containing validated certificate data.
The password to open the file is also tracked.
Use an automatically chosen certificate in the Windows certificate store.
WindowsStoreSubject(SystemStore, String)
A certificate stored in a Windows certificate store with a subject name string.
See SystemStore for the possible system stores. SystemStore::My (the current user’s store) is typically where code signing certificates are located.
The string defines a value to match against in the certificate’s subject
field to locate the certificate.
WindowsStoreSha1Thumbprint(SystemStore, String)
A certificate stored in a Windows certificate with a specified SHA-1 thumbprint.
See SystemStore for the possible system stores. SystemStore::My (the current user’s store) is typically where code signing certificates re located.
The string defines the SHA-1 thumbprint of the certificate. You can find this
in the Details
tab of the certificate when viewed in certmgr.msc
.
Implementations
impl SigningCertificate
[src]
impl SigningCertificate
[src]pub fn from_pfx_file(
path: impl AsRef<Path>,
password: &str
) -> Result<Self, SigningError>
[src]
pub fn from_pfx_file(
path: impl AsRef<Path>,
password: &str
) -> Result<Self, SigningError>
[src]Obtain an instance referencing a file containing PFX / PKCS #12 data.
This is like Self::from_pfx_data except the certificate is referenced by path instead of persisted into memory. However, we do read the certificate data as part of constructing the instance to verify the certificate is well-formed.
pub fn from_pfx_data(data: &[u8], password: &str) -> Result<Self, SigningError>
[src]
pub fn from_pfx_data(data: &[u8], password: &str) -> Result<Self, SigningError>
[src]Obtain an instance by parsing PFX / PKCS #12 data.
PFX data is commonly encountered in .pfx
or .p12
files, such as
those created when exporting certificates from Apple’s Keychain Access
or Windows’ certmgr
.
The contents of the file require a password to decrypt. However, if no password was provided to create the data, this password may be the empty string.
pub fn windows_store_with_subject(
store: &str,
subject: impl ToString
) -> Result<Self, SigningError>
[src]
pub fn windows_store_with_subject(
store: &str,
subject: impl ToString
) -> Result<Self, SigningError>
[src]Construct an instance referring to a named certificate in a Windows certificate store.
store
is the name of a Windows certificate store to open. See
SystemStore for possible values. The My
store (the store for the current
user) is likely where code signing certificates live.
subject
is a string to match against the certificate’s subject
field
to locate the certificate.
pub fn windows_store_with_sha1_thumbprint(
store: &str,
thumbprint: impl ToString
) -> Result<Self, SigningError>
[src]
pub fn windows_store_with_sha1_thumbprint(
store: &str,
thumbprint: impl ToString
) -> Result<Self, SigningError>
[src]Construct an instance referring to a certificate with a SHA-1 thumbprint in a Windows certificate store.
store
is the name of a Windows certificate store to open. See
SystemStore for possible values. The My
store (the store for the current
user) is likely where code signing certificates live.
thumbprint
is the SHA-1 thumbprint of the certificate. It should uniquely identify
any X.509 certificate.
pub fn to_windows_code_signing_certificate(
&self
) -> Result<CodeSigningCertificate, SigningError>
[src]
pub fn to_windows_code_signing_certificate(
&self
) -> Result<CodeSigningCertificate, SigningError>
[src]Attempt to convert this instance to a CodeSigningCertificate for use signing on Windows.
Trait Implementations
impl Debug for SigningCertificate
[src]
impl Debug for SigningCertificate
[src]impl From<SigningCertificate> for Signer
[src]
impl From<SigningCertificate> for Signer
[src]fn from(cert: SigningCertificate) -> Self
[src]
fn from(cert: SigningCertificate) -> Self
[src]Performs the conversion.
Auto Trait Implementations
impl RefUnwindSafe for SigningCertificate
impl Send for SigningCertificate
impl Sync for SigningCertificate
impl Unpin for SigningCertificate
impl UnwindSafe for SigningCertificate
Blanket Implementations
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]pub fn borrow_mut(&mut self) -> &mut T
[src]
pub fn borrow_mut(&mut self) -> &mut T
[src]Mutably borrows from an owned value. Read more
impl<T> Instrument for T
[src]
impl<T> Instrument for T
[src]fn instrument(self, span: Span) -> Instrumented<Self>
[src]
fn instrument(self, span: Span) -> Instrumented<Self>
[src]Instruments this type with the provided Span
, returning an
Instrumented
wrapper. Read more
fn in_current_span(self) -> Instrumented<Self>
[src]
fn in_current_span(self) -> Instrumented<Self>
[src]impl<T> Same<T> for T
impl<T> Same<T> for T
type Output = T
type Output = T
Should always be Self
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
impl<V, T> VZip<V> for T where
V: MultiLane<T>,
pub fn vzip(self) -> V
impl<T> SendSyncUnwindSafe for T where
T: Send + Sync + UnwindSafe + ?Sized,
[src]
T: Send + Sync + UnwindSafe + ?Sized,