Skip to content

Commit

Permalink
[EXPORTABLE_PRIVATE_KEY_FLAG] Added function to set machine keyset flag
Browse files Browse the repository at this point in the history
  • Loading branch information
cristianbdg committed Sep 5, 2023
1 parent 93fe14a commit 6d08a7a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/cert_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ impl PfxImportOptions {
)
}

/// If set, the private key in the archive will be exportable.
/// If set, the private key in the archive will be exportable.
pub fn exportable_private_key(
&mut self,
exportable_private_key: bool,
Expand All @@ -331,6 +331,11 @@ impl PfxImportOptions {
self
}

/// If set, the private keys are stored under the local computer and not under the current user.
pub fn machine_keyset(&mut self, machine_keyset: bool) -> &mut PfxImportOptions {
self.flag(Cryptography::CRYPT_MACHINE_KEYSET, machine_keyset)
}

/// Imports certificates from a PKCS #12 archive, returning a `CertStore` containing them.
pub fn import(&self, data: &[u8]) -> io::Result<CertStore> {
unsafe {
Expand Down

0 comments on commit 6d08a7a

Please sign in to comment.