mirror of
https://github.com/pocoproject/poco.git
synced 2025-03-02 20:30:11 +01:00

Per https://www.openssl.org/docs/crypto/pem.html, specifying to encrypt a private key with DES *without* providing a passphrase causes OpenSSL to prompt for the passphrase to use on the console -- which is problematic for GUI applications which generally lack a console. This modifies the behavior of RSAKeyImpl::save() so that DES encryption of private keys will not be attempted unless the passphrase argument is non-empty. This will also suppress OpenSSL's prompting for that passphrase on the console. Also added a case to the test suite.