-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(ffi): WinSCard FFI implementation (#205)
- Loading branch information
1 parent
147ccb4
commit cfc86d6
Showing
20 changed files
with
1,533 additions
and
320 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/// Emulated smart card PIN code. | ||
pub const WINSCARD_PIN_ENV: &str = "WINSCARD_PIN"; | ||
/// Path to the user certificate to be used in emulated smart card. | ||
pub const WINSCARD_CERT_PATH_ENV: &str = "WINSCARD_CERT_PATH"; | ||
/// Path to the certificate private key. | ||
pub const WINSCARD_PK_PATH_ENV: &str = "WINSCARD_PK_PATH"; | ||
/// Emulated smart card container name. | ||
pub const WINSCARD_CONTAINER_NAME_ENV: &str = "WINSCARD_CONTAINER"; | ||
/// Emulated smart card reader name. | ||
pub const WINSCARD_READER_NAME_ENV: &str = "WINSCARD_READER"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
macro_rules! env { | ||
($name:expr) => {{ | ||
std::env::var($name).map_err(|_| { | ||
crate::Error::new( | ||
crate::ErrorKind::InvalidParameter, | ||
format!("The {} env var is not present or invalid", $name), | ||
) | ||
}) | ||
}}; | ||
} |
Oops, something went wrong.