Thursday 7 January 2021

How do I specify the passphrase for a private key in saml2-js?

I see the option to do this in saml-passport but I've already set things up using saml2-js. My key/cert has a passphrase that is required or I get a bad decrypt error. Is it possible to set this passphrase?

Here are the SP options

var sp_options = {
  entity_id: "/startpoint",
  private_key: fs.readFileSync(`${dir}src/certs/key.pem`).toString(),
  certificate: fs.readFileSync(`${dir}src/certs/cert.pem`).toString(),
  assert_endpoint: '/assert',
  sign_get_request: true
}
var sp = new saml2.ServiceProvider(sp_options)

I would expect to have a key 'passphrase' under the private_key key but there is no key like that specified in the docs.



from How do I specify the passphrase for a private key in saml2-js?

No comments:

Post a Comment