mirror of
https://github.com/Grasscutters/Cultivation.git
synced 2025-12-12 23:24:35 +01:00
Install certificate into the user's root instead of the system's root
This commit is contained in:
@@ -164,7 +164,7 @@ pub fn generate_ca_files(path: &str) {
|
||||
params.key_usages = vec![
|
||||
KeyUsagePurpose::DigitalSignature,
|
||||
KeyUsagePurpose::KeyCertSign,
|
||||
KeyUsagePurpose::CrlSign,
|
||||
KeyUsagePurpose::CrlSign
|
||||
];
|
||||
|
||||
// Create certificate.
|
||||
@@ -203,7 +203,7 @@ pub fn generate_ca_files(path: &str) {
|
||||
*/
|
||||
pub fn install_ca_files(path: &str) {
|
||||
if cfg!(target_os = "windows") {
|
||||
run_command(format!("certutil -addstore -f \"ROOT\" {}\\ca\\cert.crt", path).to_string());
|
||||
run_command(format!("certutil -user -addstore \"Root\" {}\\ca\\cert.crt", path).to_string());
|
||||
} else {
|
||||
run_command(format!("security add-trusted-cert -d -r trustRoot -k /Library/Keychains/System.keychain {}/ca/cert.crt", path).to_string());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user