Merge pull request #10994 from BKPepe/libseccomp
[feed/packages.git] / libs / libssh / patches / 0011-pki_crypto-Avoid-segfault-with-OpenSSL-1.1.0.patch
1 From ab67e42d6a0529f5fb81ee86049bf10abe99f839 Mon Sep 17 00:00:00 2001
2 From: Jakub Jelen <jjelen@redhat.com>
3 Date: Tue, 7 Nov 2017 09:38:40 +0100
4 Subject: [PATCH] pki_crypto: Avoid segfault with OpenSSL 1.1.0
5
6 Signed-off-by: Jakub Jelen <jjelen@redhat.com>
7 Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
8 ---
9 src/pki_crypto.c | 4 ++++
10 1 file changed, 4 insertions(+)
11
12 diff --git a/src/pki_crypto.c b/src/pki_crypto.c
13 index 34d6e81c..30f49a81 100644
14 --- a/src/pki_crypto.c
15 +++ b/src/pki_crypto.c
16 @@ -452,6 +452,10 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
17 int pki_key_generate_dss(ssh_key key, int parameter){
18 int rc;
19 #if OPENSSL_VERSION_NUMBER > 0x10100000L
20 + key->dsa = DSA_new();
21 + if (!key->dsa) {
22 + return SSH_ERROR;
23 + }
24 rc = DSA_generate_parameters_ex(key->dsa,
25 parameter,
26 NULL, /* seed */
27 --
28 2.19.1
29