Security News
Node.js EOL Versions CVE Dubbed the "Worst CVE of the Year" by Security Experts
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
add-trusted-cert
Advanced tools
An API for calling the security add-trusted-cert
command in macOS to add certificates to the system keychain.
For more information, see man security
and search for the add-trusted-cert
command.
import { addTrustedCert } from 'add-trusted-cert'
(async () => {
await addTrustedCert(options, certFileToAdd)
})()
Promise.<string>
Add certificate (in DER or PEM format) from certFile to per-user or local Admin Trust Settings. When modifying per-user Trust Settings, user authentication is required via an authentication dialog. When modifying admin Trust Settings, the process must be running as root, or admin authentication is required.
Returns: Promise.<string>
- Output of the security add-trusted-cert
command
See: man security add-trusted-cert
Param | Type | Description |
---|---|---|
options | object | |
[options.addToAdminCertStore] | boolean | If true, adds the cert to the admin cert store |
[options.resultType] | string | |
[options.policyConstraint] | Array.<string> | string | Policy constraints |
[options.appPath] | string | Application constraint |
[options.policyString] | string | Policy-specific string |
[options.allowedError] | Array.<(string|number)> | number | string | |
[options.keyUsageCode] | number | Key usage. For more than one usage, add values together (except -1). |
[options.keychain] | string | Keychain to which the cert is added |
[options.settingsFileIn] | string | Input trust settings file; default is user domain |
[options.settingsFileOut] | string | Output trust settings file; default is user domain |
certFile | string | Certificate file to add |
FAQs
Add trusted certificates to the macOS keychain via an API
We found that add-trusted-cert demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Critics call the Node.js EOL CVE a misuse of the system, sparking debate over CVE standards and the growing noise in vulnerability databases.
Security News
cURL and Go security teams are publicly rejecting CVSS as flawed for assessing vulnerabilities and are calling for more accurate, context-aware approaches.
Security News
Bun 1.2 enhances its JavaScript runtime with 90% Node.js compatibility, built-in S3 and Postgres support, HTML Imports, and faster, cloud-first performance.