]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
allow named to build w/o openssl
authorMark Andrews <marka@isc.org>
Wed, 8 Jul 2015 01:54:25 +0000 (11:54 +1000)
committerMark Andrews <marka@isc.org>
Wed, 8 Jul 2015 01:54:25 +0000 (11:54 +1000)
bin/named/client.c
bin/named/server.c

index f97e590a16dfb13e65cb73a767f362cf80807b47..f1f85154093aa57802f65c510a95afebacdf7123 100644 (file)
@@ -1629,6 +1629,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
               isc_buffer_t *buf)
 {
        switch (ns_g_server->cookiealg) {
+#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
        case ns_cookiealg_aes: {
                unsigned char digest[ISC_AES_BLOCK_LENGTH];
                unsigned char input[4 + 4 + 16];
@@ -1668,6 +1669,7 @@ compute_cookie(ns_client_t *client, isc_uint32_t when, isc_uint32_t nonce,
                isc_buffer_putmem(buf, digest, 8);
                break;
        }
+#endif
 
        case ns_cookiealg_sha1: {
                unsigned char digest[ISC_SHA1_DIGESTLENGTH];
index d07e9aaba8df0dcec678c0dcc264eb8007ce9edd..ee337739e0dd12babac6e5146453080fb38e494a 100644 (file)
@@ -6418,7 +6418,11 @@ load_configuration(const char *filename, ns_server_t *server,
        result = ns_config_get(maps, "cookie-algorithm", &obj);
        INSIST(result == ISC_R_SUCCESS);
        if (strcasecmp(cfg_obj_asstring(obj), "aes") == 0)
+#if defined(HAVE_OPENSSL_AES) || defined(HAVE_OPENSSL_EVP_AES)
                server->cookiealg = ns_cookiealg_aes;
+#else
+               INSIST(0);
+#endif
        else if (strcasecmp(cfg_obj_asstring(obj), "sha1") == 0)
                server->cookiealg = ns_cookiealg_sha1;
        else if (strcasecmp(cfg_obj_asstring(obj), "sha256") == 0)