How to get .pfx file from .cer and .key in NodeJS?
class SAT {
constructor() {
this.options = {
wsdl_options: {
pfx: {
cer: fs.readFileSync(publicKeyPath),
key: fs.readFileSync(privateKeyPath)
}
},
passphrase: PASSWORD_PKEY
}
}
You can use the chilkat library. The pfx library is free. Load the appropriate library found at https://www.chilkatsoft.com/nodejs.asp:
Use the following code to produce a Pfx File: