src: split CryptoPemCallback into two functions · nodejs/node@4166128 · GitHub
Skip to content

Commit 4166128

Browse files
danbevMylesBorins
authored andcommitted
src: split CryptoPemCallback into two functions
Currently the function CryptoPemCallback is used for two things: 1. As a passphrase callback. 2. To avoid the default OpenSSL passphrase routine. The default OpenSSL passphase routine would apply if both the callback and the passphrase are null pointers and the typical behaviour is to prompt for the passphase which is not appropriate in node. This commit suggests that the PasswordCallback function only handle passphrases, and that an additional function named NoPasswordCallback used for the second case to avoid OpenSSL's passphase routine. PR-URL: #12827 Reviewed-By: Sam Roberts <vieuxtech@gmail.com> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
1 parent 2aa6828 commit 4166128

1 file changed

Lines changed: 22 additions & 11 deletions

File tree

src/node_crypto.cc

Lines changed: 22 additions & 11 deletions

0 commit comments

Comments
 (0)