crypto: Fix compilation for OpenSSL without deprecated APIs

Added missing bn.h include.

Made engine.h include conditional, otherwise it would fail.

DSA_generate_parameters was deprecated long before 1.1.0.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
This commit is contained in:
Rosen Penev
2018-11-07 18:07:30 -08:00
committed by Andreas Schneider
parent aa899f8ec0
commit 61cac32288
3 changed files with 6 additions and 2 deletions

View File

@@ -516,7 +516,7 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
int pki_key_generate_dss(ssh_key key, int parameter){
int rc;
#if OPENSSL_VERSION_NUMBER > 0x10100000L
#if OPENSSL_VERSION_NUMBER > 0x00908000L
key->dsa = DSA_new();
if (key->dsa == NULL) {
return SSH_ERROR;