-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(trust_stores): imcomplete implementation
- Loading branch information
1 parent
bc14217
commit 76609c6
Showing
5 changed files
with
53 additions
and
0 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -1,5 +1,6 @@ | ||
mod commands; | ||
mod errors; | ||
mod trust_stores; | ||
mod utils; | ||
mod x509; | ||
use clap::{Parser, Subcommand}; | ||
|
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,33 @@ | ||
pub struct CAValue {} | ||
|
||
impl CAValue {} | ||
|
||
enum PossibleStores { | ||
RedHat, | ||
Debian, | ||
SuSE, | ||
Other, | ||
} | ||
|
||
impl PossibleStores { | ||
fn get_details(&self) -> (String, Vec<&'static str>) { | ||
match self { | ||
PossibleStores::RedHat => ( | ||
"/etc/pki/ca-trust/source/anchors/".to_string(), | ||
vec!["update-ca-trust", "extract"], | ||
), | ||
PossibleStores::Debian => ( | ||
"/usr/local/share/ca-certificates/".to_string(), | ||
vec!["update-ca-certificates"], | ||
), | ||
PossibleStores::SuSE => ( | ||
"/etc/ca-certificates/trust-source/anchors/".to_string(), | ||
vec!["trust", "extract-compat"], | ||
), | ||
PossibleStores::Other => ( | ||
"/usr/share/pki/trust/anchors/".to_string(), | ||
vec!["update-ca-certificates"], | ||
), | ||
} | ||
} | ||
} |
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 @@ | ||
// NOT YET IMPLEMENTED |
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,17 @@ | ||
#[cfg(target_os = "windows")] | ||
mod windows; | ||
|
||
#[cfg(target_os = "macos")] | ||
mod macos; | ||
|
||
#[cfg(target_os = "linux")] | ||
mod linux; | ||
|
||
#[cfg(target_os = "windows")] | ||
pub use self::windows::*; | ||
|
||
#[cfg(target_os = "macos")] | ||
pub use self::macos::*; | ||
|
||
#[cfg(target_os = "linux")] | ||
pub use self::linux::*; |
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 @@ | ||
// NOT YET IMPLEMENTED |