mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-04 12:20:42 +09:00
pki_crypto: Avoid segfault with OpenSSL 1.1.0
Signed-off-by: Jakub Jelen <jjelen@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
committed by
Andreas Schneider
parent
d29d199592
commit
16818bd0e4
@@ -454,6 +454,10 @@ 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
|
||||
key->dsa = DSA_new();
|
||||
if (!key->dsa) {
|
||||
return SSH_ERROR;
|
||||
}
|
||||
rc = DSA_generate_parameters_ex(key->dsa,
|
||||
parameter,
|
||||
NULL, /* seed */
|
||||
|
||||
Reference in New Issue
Block a user