module Darwin
Darwin specific system operations.
Definitions
def self.install(certificate)
Install a certificate into the system trust store.
Signature
-
parameter
certificate
String
The path to the certificate file.
Implementation
def self.install(certificate)
login_keychain = File.expand_path("~/Library/Keychains/login.keychain-db")
system(
"security", "add-trusted-cert",
"-d", "-r", "trustRoot",
"-k", login_keychain,
certificate
)
end