You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

29 lines
931 B

  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. Signed-off-by: Jakub Jelen <jjelen@redhat.com>
  6. Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
  7. ---
  8. src/pki_crypto.c | 4 ++++
  9. 1 file changed, 4 insertions(+)
  10. diff --git a/src/pki_crypto.c b/src/pki_crypto.c
  11. index 34d6e81c..30f49a81 100644
  12. --- a/src/pki_crypto.c
  13. +++ b/src/pki_crypto.c
  14. @@ -452,6 +452,10 @@ int pki_key_generate_rsa(ssh_key key, int parameter){
  15. int pki_key_generate_dss(ssh_key key, int parameter){
  16. int rc;
  17. #if OPENSSL_VERSION_NUMBER > 0x10100000L
  18. + key->dsa = DSA_new();
  19. + if (!key->dsa) {
  20. + return SSH_ERROR;
  21. + }
  22. rc = DSA_generate_parameters_ex(key->dsa,
  23. parameter,
  24. NULL, /* seed */
  25. --
  26. 2.19.1