diff options
author | Jay Satiro <raysatiro@yahoo.com> | 2017-03-28 02:56:00 -0400 |
---|---|---|
committer | Jay Satiro <raysatiro@yahoo.com> | 2017-03-28 03:54:31 -0400 |
commit | b04e4ebdd87619d7235ac574275ed11f2a540721 (patch) | |
tree | 09137dcc0e7ebd9fb1d65d6da4a9b2bd0eb39f88 /lib | |
parent | 041ded04591dc565f15abda806ad7b77f1ddd9ef (diff) |
openssl: exclude DSA code when OPENSSL_NO_DSA is defined
- 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
Diffstat (limited to 'lib')
-rw-r--r-- | lib/vtls/openssl.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/vtls/openssl.c b/lib/vtls/openssl.c index 67425566d..f426f32ff 100644 --- a/lib/vtls/openssl.c +++ b/lib/vtls/openssl.c @@ -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: |