]> granicus.if.org Git - curl/commitdiff
openssl: exclude DSA code when OPENSSL_NO_DSA is defined
authorJay Satiro <raysatiro@yahoo.com>
Tue, 28 Mar 2017 06:56:00 +0000 (02:56 -0400)
committerJay Satiro <raysatiro@yahoo.com>
Tue, 28 Mar 2017 07:54:31 +0000 (03:54 -0400)
- Fix compile errors that occur in openssl.c when OpenSSL lib was
  built without DSA support.

Bug: https://github.com/curl/curl/issues/1361
Reported-by: neheb@users.noreply.github.com
lib/vtls/openssl.c

index 67425566de2f1f05d702275835f0fbec10f54dea..f426f32ffb8115c1a8b23d749bde8f6f89f00a44 100644 (file)
@@ -55,7 +55,9 @@
 #include <openssl/ssl.h>
 #include <openssl/rand.h>
 #include <openssl/x509v3.h>
+#ifndef OPENSSL_NO_DSA
 #include <openssl/dsa.h>
+#endif
 #include <openssl/dh.h>
 #include <openssl/err.h>
 #include <openssl/md5.h>
@@ -2640,6 +2642,7 @@ static CURLcode get_cert_chain(struct connectdata *conn,
       }
       case EVP_PKEY_DSA:
       {
+#ifndef OPENSSL_NO_DSA
         DSA *dsa;
 #ifdef HAVE_OPAQUE_EVP_PKEY
         dsa = EVP_PKEY_get0_DSA(pubkey);
@@ -2670,6 +2673,7 @@ static CURLcode get_cert_chain(struct connectdata *conn,
         print_pubkey_BN(dsa, priv_key, i);
         print_pubkey_BN(dsa, pub_key, i);
 #endif
+#endif /* !OPENSSL_NO_DSA */
         break;
       }
       case EVP_PKEY_DH: