pub enum SigningCertificate {
    Memory(CapturedX509CertificateInMemoryPrivateKey),
    PfxFile(PathBufStringCapturedX509CertificateInMemoryPrivateKey),
    WindowsStoreAuto,
    WindowsStoreSubject(SystemStoreString),
    WindowsStoreSha1Thumbprint(SystemStoreString),
}
Expand description

Represents a signing key and public certificate to sign something.

Variants§

§

Memory(CapturedX509CertificateInMemoryPrivateKey)

A parsed certificate and signing key stored in memory.

The private key is managed by the ring crate.

§

PfxFile(PathBufStringCapturedX509CertificateInMemoryPrivateKey)

A PFX file containing validated certificate data.

The password to open the file is also tracked.

§

WindowsStoreAuto

Use an automatically chosen certificate in the Windows certificate store.

§

WindowsStoreSubject(SystemStoreString)

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(SystemStoreString)

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§

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.

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.

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.

Attempt to convert this instance to a CodeSigningCertificate for use signing on Windows.

Trait Implementations§

Formats the value using the given formatter. Read more
Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
Should always be Self
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.
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