openssl: Don't refer to EVP_des_ecb() if OpenSSL is built without DES support
authorTobias Brunner <tobias@strongswan.org>
Fri, 17 Apr 2015 15:34:22 +0000 (17:34 +0200)
committerTobias Brunner <tobias@strongswan.org>
Fri, 17 Apr 2015 15:43:58 +0000 (17:43 +0200)
While DES-ECB is not registered by the plugin in this case (so the
function will never actually be called), the compiler still warns
about the implicitly declared function.

src/libstrongswan/plugins/openssl/openssl_crypter.c

index c2478a4..26f4700 100644 (file)
@@ -226,10 +226,12 @@ openssl_crypter_t *openssl_crypter_create(encryption_algorithm_t algo,
                                        return NULL;
                        }
                        break;
+#ifndef OPENSSL_NO_DES
                case ENCR_DES_ECB:
                        key_size = 8;
                        this->cipher = EVP_des_ecb();
                        break;
+#endif
                default:
                {
                        char* name;