src: accept passphrase when crypto signing with private key
authorThom Seddon <thom@nightworld.com>
Fri, 4 Oct 2013 11:59:38 +0000 (12:59 +0100)
committerFedor Indutny <fedor.indutny@gmail.com>
Tue, 29 Oct 2013 10:19:47 +0000 (14:19 +0400)
commitf755ecf484a9789525746475b924ddf2b3f316d0
treec3f21019f8ed4ab0c13474022e80251bb858bda3
parent81307440440127c7c99183734098f97fac5e214d
src: accept passphrase when crypto signing with private key

Previous behaviour was to drop to an openssl prompt
("Enter PEM pass phrase:") when supplying a private key with a
passphrase. This change adds a fourth, optional, paramter that
will be used as the passphrase.
To include this parameter in a backwards compatible way it was
necessary to expose the previously undocumented (and unexposed)
feature of being able to explitly setting the output encoding.
doc/api/crypto.markdown
lib/crypto.js
src/node_crypto.cc
src/node_crypto.h
test/fixtures/test_dsa_privkey_encrypted.pem [new file with mode: 0644]
test/fixtures/test_rsa_privkey_encrypted.pem [new file with mode: 0644]
test/simple/test-crypto.js