Enum tugger_code_signing::SigningCertificate [−][src]
pub enum SigningCertificate {
Memory(CapturedX509Certificate, InMemorySigningKeyPair),
PfxFile(PathBuf, String, CapturedX509Certificate, InMemorySigningKeyPair),
WindowsStoreAuto,
WindowsStoreSubject(SystemStore, String),
WindowsStoreSha1Thumbprint(SystemStore, String),
}Expand description
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.
Tuple Fields of Memory
PfxFile(PathBuf, String, CapturedX509Certificate, InMemorySigningKeyPair)A PFX file containing validated certificate data.
The password to open the file is also tracked.
Tuple Fields of PfxFile
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.
Tuple Fields of WindowsStoreSubject
0: SystemStore1: StringWindowsStoreSha1Thumbprint(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.
Tuple Fields of WindowsStoreSha1Thumbprint
0: SystemStore1: StringImplementations
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.
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>
pub fn windows_store_with_subject(
store: &str,
subject: impl ToString
) -> Result<Self, SigningError>
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>
pub fn windows_store_with_sha1_thumbprint(
store: &str,
thumbprint: impl ToString
) -> Result<Self, SigningError>
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>
pub fn to_windows_code_signing_certificate(
&self
) -> Result<CodeSigningCertificate, SigningError>
Attempt to convert this instance to a CodeSigningCertificate for use signing on Windows.
Trait Implementations
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
Mutably borrows from an owned value. Read more
pub fn vzip(self) -> V
Attaches the provided Subscriber to this type, returning a
WithDispatch wrapper. Read more
Attaches the current default Subscriber to this type, returning a
WithDispatch wrapper. Read more