1.0.6 • Published 7 years ago

import-certificate v1.0.6

Weekly downloads
-
License
ISC
Repository
-
Last release
7 years ago

import .p12 certificate

Command line

security import ./bundle.p12 -P secretPassword
  • import the 'bundle.p12' to the default keychain.
  • -k import to which keychain
  • -A Allow any application to access the imported key without warning (insecure, not recommended!)
  • -T Specify an application which may access the imported key (multiple -T options are allowed)

Ref

How to use

var importCertificate = require('import-certificate');
importCertificate('./cer.p12', '1111')
    .then((d) => {
        console.log(d);
    })
    .catch((e) => {
        console.log(e.error);
    })

Return value

success

{
    success: true,
}

fail

{
    success: false,
    error: 'security: SecKeychainItemImport: One or more parameters passed to a function were not valid.\n' 
}
1.0.6

7 years ago

1.0.5

7 years ago

1.0.4

7 years ago

1.0.3

7 years ago

1.0.2

7 years ago

1.0.1

7 years ago

1.0.0

7 years ago