summaryrefslogtreecommitdiffstats
path: root/unit-syspol.patch
blob: c79025c2bcfa4f8d29baf31fe515517dd5e43877 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
diff -up ./src/nxt_openssl.c.syspol ./src/nxt_openssl.c
--- ./src/nxt_openssl.c.syspol	2021-05-28 07:49:58.267866774 +0200
+++ ./src/nxt_openssl.c	2021-05-28 07:52:44.119844098 +0200
@@ -269,7 +269,7 @@ nxt_openssl_server_init(nxt_task_t *task
     nxt_mp_t *mp, nxt_conf_value_t *conf_cmds, nxt_bool_t last)
 {
     SSL_CTX                *ctx;
-    const char             *ciphers, *ca_certificate;
+    const char             *ca_certificate;
     STACK_OF(X509_NAME)    *list;
     nxt_tls_bundle_conf_t  *bundle;
 
@@ -327,13 +327,13 @@ nxt_openssl_server_init(nxt_task_t *task
     }
 */
 
-    ciphers = (conf->ciphers != NULL) ? conf->ciphers : "HIGH:!aNULL:!MD5";
-
-    if (SSL_CTX_set_cipher_list(ctx, ciphers) == 0) {
-        nxt_openssl_log_error(task, NXT_LOG_ALERT,
+    if (conf->ciphers) { /* else use system crypto policy */
+        if (SSL_CTX_set_cipher_list(ctx, conf->ciphers) == 0) {
+            nxt_openssl_log_error(task, NXT_LOG_ALERT,
                               "SSL_CTX_set_cipher_list(\"%s\") failed",
-                              ciphers);
-        goto fail;
+                              conf->ciphers);
+            goto fail;
+        }
     }
 
 #if (NXT_HAVE_OPENSSL_CONF_CMD)