Skip to content

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.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src

Merge request reports

Loading