Struct cargo_packager::config::WindowsConfig
source · #[non_exhaustive]pub struct WindowsConfig {
pub digest_algorithm: Option<String>,
pub certificate_thumbprint: Option<String>,
pub tsp: bool,
pub timestamp_url: Option<String>,
pub allow_downgrades: bool,
pub sign_command: Option<String>,
}
Expand description
The Windows configuration.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. }
syntax; cannot be matched against without a wildcard ..
; and struct update syntax will not work.digest_algorithm: Option<String>
The file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.
certificate_thumbprint: Option<String>
The SHA1 hash of the signing certificate.
tsp: bool
Whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.
timestamp_url: Option<String>
Server to use during timestamping.
allow_downgrades: bool
Whether to validate a second app installation, blocking the user from installing an older version if set to false
.
For instance, if 1.2.1
is installed, the user won’t be able to install app version 1.2.0
or 1.1.5
.
The default value of this flag is true
.
sign_command: Option<String>
Specify a custom command to sign the binaries.
This command needs to have a %1
in it which is just a placeholder for the binary path,
which we will detect and replace before calling the command.
By Default we use signtool.exe
which can be found only on Windows so
if you are on another platform and want to cross-compile and sign you will
need to use another tool like osslsigncode
.
Implementations§
source§impl WindowsConfig
impl WindowsConfig
sourcepub fn new() -> Self
pub fn new() -> Self
Creates a new WindowsConfig
.
sourcepub fn digest_algorithm<S: Into<String>>(self, digest_algorithm: S) -> Self
pub fn digest_algorithm<S: Into<String>>(self, digest_algorithm: S) -> Self
Set the file digest algorithm to use for creating file signatures. Required for code signing. SHA-256 is recommended.
sourcepub fn certificate_thumbprint<S: Into<String>>(
self,
certificate_thumbprint: S
) -> Self
pub fn certificate_thumbprint<S: Into<String>>( self, certificate_thumbprint: S ) -> Self
Set the SHA1 hash of the signing certificate.
sourcepub fn tsp(self, tsp: bool) -> Self
pub fn tsp(self, tsp: bool) -> Self
Set whether to use Time-Stamp Protocol (TSP, a.k.a. RFC 3161) for the timestamp server. Your code signing provider may use a TSP timestamp server, like e.g. SSL.com does. If so, enable TSP by setting to true.
sourcepub fn timestamp_url<S: Into<String>>(self, timestamp_url: S) -> Self
pub fn timestamp_url<S: Into<String>>(self, timestamp_url: S) -> Self
Set server url to use during timestamping.
sourcepub fn allow_downgrades(self, allow: bool) -> Self
pub fn allow_downgrades(self, allow: bool) -> Self
Set whether to validate a second app installation, blocking the user from installing an older version if set to false
.
For instance, if 1.2.1
is installed, the user won’t be able to install app version 1.2.0
or 1.1.5
.
The default value of this flag is true
.
Trait Implementations§
source§impl Clone for WindowsConfig
impl Clone for WindowsConfig
source§fn clone(&self) -> WindowsConfig
fn clone(&self) -> WindowsConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for WindowsConfig
impl Debug for WindowsConfig
source§impl Default for WindowsConfig
impl Default for WindowsConfig
source§impl<'de> Deserialize<'de> for WindowsConfig
impl<'de> Deserialize<'de> for WindowsConfig
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Auto Trait Implementations§
impl Freeze for WindowsConfig
impl RefUnwindSafe for WindowsConfig
impl Send for WindowsConfig
impl Sync for WindowsConfig
impl Unpin for WindowsConfig
impl UnwindSafe for WindowsConfig
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
source§impl<T> Instrument for T
impl<T> Instrument for T
source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§impl<T> Pointable for T
impl<T> Pointable for T
source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.