Skip to content

Commit dcdba1a

Browse files
committed
pki_crypto: Avoid segfault with OpenSSL 1.1.0
1 parent 5f2a45d commit dcdba1a

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/pki_crypto.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -454,6 +454,10 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
454454
int pki_key_generate_dss(ssh_key key, int parameter){
455455
int rc;
456456
#if OPENSSL_VERSION_NUMBER > 0x10100000L
457+
key->dsa = DSA_new();
458+
if (!key->dsa) {
459+
return SSH_ERROR;
460+
}
457461
rc = DSA_generate_parameters_ex(key->dsa,
458462
parameter,
459463
NULL, /* seed */

0 commit comments

Comments
 (0)