{"Entry":{"collection":"guc","key":"ssl_ciphers","name":"ssl_ciphers","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Connections and Authentication / SSL","category_zh":"","changed_in":["9.3","9.4","10","11","18"],"changes":[{"documentation_changed":false,"fields":{},"from":"8.2","status":"added","to":"8.3"},{"documentation_changed":true,"fields":{},"from":"9.0","status":"changed","to":"9.1"},{"documentation_changed":false,"fields":{"boot_val":{"from":"ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH","to":"DEFAULT:!LOW:!EXP:!MD5:@STRENGTH"}},"from":"9.2","status":"changed","to":"9.3"},{"documentation_changed":true,"fields":{"boot_val":{"from":"DEFAULT:!LOW:!EXP:!MD5:@STRENGTH","to":"HIGH:MEDIUM:+3DES:!aNULL"}},"from":"9.3","status":"changed","to":"9.4"},{"documentation_changed":true,"fields":{},"from":"9.4","status":"changed","to":"9.5"},{"documentation_changed":true,"fields":{"context":{"from":"postmaster","to":"sighup"}},"from":"9.6","status":"changed","to":"10"},{"documentation_changed":false,"fields":{"category":{"from":"Connections and Authentication / Security and Authentication","to":"Connections and Authentication / SSL"}},"from":"10","status":"changed","to":"11"},{"documentation_changed":true,"fields":{},"from":"13","status":"changed","to":"14"},{"documentation_changed":true,"fields":{},"from":"15","status":"changed","to":"16"},{"documentation_changed":true,"fields":{"short_desc":{"from":"Sets the list of allowed SSL ciphers.","to":"Sets the list of allowed TLSv1.2 (and lower) ciphers."}},"from":"17","status":"changed","to":"18"}],"content_hash":"9dffc0cb21146916776c773a837880051a60c62cf6be983006ec8b9ae05bb5a9","context":"","default_changed_in":["9.3","9.4"],"default_history":[{"from":"9.1","to":"9.2","value":"ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH"},{"from":"9.3","to":"9.3","value":"DEFAULT:!LOW:!EXP:!MD5:@STRENGTH"},{"from":"9.4","to":"19","value":"HIGH:MEDIUM:+3DES:!aNULL"}],"editorial":{"advice":{"olap":"Use the same TLS floor for analytical traffic; benchmark only after correctness because bulk transfer may expose CPU cost but is not a reason to accept obsolete protocols.","oltp":"Treat ssl_ciphers as transport-security policy rather than a performance knob. Follow the organization's TLS baseline and test certificate rotation, reload, and every client class.","small":"Keep ssl_ciphers simple and secure, using managed certificates and library defaults reviewed for the installed OpenSSL version. Rehearse renewal before expiry."},"mechanism":["The ssl_ciphers name already exists in PostgreSQL's GUC source at the project's 2008 history boundary and in PG9.0, where it is compiled only under USE_SSL. The audited PG9.0 fallback build does not enable OpenSSL, so the name first appears in the PG9.1 official-image snapshot; that matrix boundary reflects build capability, not the feature's original invention.","The OpenSSL cipher string governs TLS 1.2 and older handshakes. PostgreSQL 18 and later configure TLS 1.3 suites separately with ssl_tls13_ciphers. A SIGHUP reload changes the policy for new TLS contexts and connections but does not renegotiate sessions that are already established.","Treat ssl_ciphers as one part of a complete transport policy with ssl, pg_hba.conf, certificate and key files, CA and revocation settings, protocol floors and ceilings, ssl_groups, and client capabilities. Validate the exact installed OpenSSL build because accepted cipher names and security levels are library-dependent."],"pitfalls":["Editing ssl_ciphers without reloading configuration and verifying the effective value and subsequent behavior.","Updating only one TLS file or policy knob and leaving an invalid chain, unreadable key, or incompatible protocol set.","Assuming a reload renegotiates existing sessions; TLS policy changes affect new handshakes.","Changing ssl_ciphers globally without a rollback plan and a client or operational compatibility test."],"references":[{"title":"PostgreSQL 19 Beta 4: ssl_ciphers","url":"https://www.postgresql.org/docs/19/runtime-config-connection.html#GUC-SSL-CIPHERS"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["ssl_tls13_ciphers","ssl_min_protocol_version","ssl_max_protocol_version","ssl_prefer_server_ciphers","ssl_groups"],"summary":"ssl_ciphers is the PostgreSQL setting that defines the list of allowed TLSv1.2 (and lower) ciphers."},"enumvals":[],"first_version":"8.3","group":"Connections and Authentication","group_slug":"connection","imported_at":"2026-09-27T17:57:31.999035+08:00","intro_commit":{"status":"predates_history_boundary"},"key":"ssl_ciphers","last_version":"20","max_val":"","min_val":"","name":"ssl_ciphers","position":368,"present_in":["8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6","10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections.","short_desc_zh":"","source_rev":"english-manuals:0f4270e2c811734df6e7e24ff2439ae63972836df0931be1e937680ba40a93b1","unit":"","vartype":"string"}},"Definition":{"Collection":"guc","Key":"ssl_ciphers","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"ssl_ciphers","SourceRevision":"english-manuals:0f4270e2c811734df6e7e24ff2439ae63972836df0931be1e937680ba40a93b1","Facts":{"boot_val":"HIGH:MEDIUM:+3DES:!aNULL","category":"Connections and Authentication / SSL","context":"sighup","description":"Specifies a list of SSL ciphers that are allowed by connections using TLS version 1.2 and lower, see ssl_tls13_ciphers for TLS version 1.3 connections. See the ciphers manual page in the OpenSSL package for the syntax of this setting and a list of supported values. The default value is HIGH:MEDIUM:+3DES:!aNULL. The default is usually a reasonable choice unless you have specific security requirements. This parameter can only be set in the postgresql.conf file or on the server command line. Explanation of the default value: HIGH # Cipher suites that use ciphers from HIGH group (e.g., AES, Camellia, 3DES) MEDIUM # Cipher suites that use ciphers from MEDIUM group (e.g., RC4, SEED) +3DES # The OpenSSL default order for HIGH is problematic because it orders 3DES higher than AES128. This is wrong because 3DES offers less security than AES128, and it is also much slower. +3DES reorders it after all other HIGH and MEDIUM ciphers. !aNULL # Disables anonymous cipher suites that do no authentication. Such cipher suites are vulnerable to MITM attacks and therefore should not be used. Available cipher suite details will vary across OpenSSL versions. Use the command openssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL' to see actual details for the currently installed OpenSSL version. Note that this list is filtered at run time based on the server key type.","doc":{"anchor":"GUC-SSL-CIPHERS","file":"runtime-config-connection.html","lang":"en","sha256":"567ba928f3e4c4783f548dc8a54f1e748f02bbe163924605f2132eb5b0da440d","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"ssl_ciphers","short_desc":"Sets the list of allowed TLSv1.2 (and lower) ciphers.","source":"pg-settings-source-snapshot","unit":null,"vartype":"string"},"ManualEvidence":{"doc":{"anchor":"GUC-SSL-CIPHERS","file":"runtime-config-connection.html","lang":"en","sha256":"567ba928f3e4c4783f548dc8a54f1e748f02bbe163924605f2132eb5b0da440d","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"ssl_ciphers","SourceDatabase":"pgweb","Version":"18","Locale":"zh-Hans","Title":"ssl_ciphers","Summary":"","BodyHTML":"\u003cp\u003e指定允许用于 TLS 1.2 及更低版本连接的 SSL 密码套件列表；对于 TLS 1.3 连接，请参见\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-SSL-TLS13-CIPHERS\" rel=\"nofollow\"\u003essl_tls13_ciphers\u003c/a\u003e。该设置的语法及支持的值列表可参见 \u003cspan\u003eOpenSSL\u003c/span\u003e 包中的 \u003cspan\u003e\u003cspan\u003eciphers\u003c/span\u003e\u003c/span\u003e 手册页。默认值是\u003ccode\u003eHIGH:MEDIUM:+3DES:!aNULL\u003c/code\u003e。除非你有特定的安全需求，否则这个默认值通常是合理的选择。\u003c/p\u003e\u003cp\u003e这个参数只能在\u003ccode\u003epostgresql.conf\u003c/code\u003e文件中或者服务器命令行上设置。\u003c/p\u003e\u003cp\u003e默认值的解释：\u003c/p\u003e\u003cdiv\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eHIGH\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e使用\u003ccode\u003eHIGH\u003c/code\u003e组中密码算法（例如 AES、Camellia、3DES）的密码套件。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003eMEDIUM\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e使用\u003ccode\u003eMEDIUM\u003c/code\u003e组中密码算法（例如 RC4、SEED）的密码套件。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e+3DES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\u003cspan\u003eOpenSSL\u003c/span\u003e对\u003ccode\u003eHIGH\u003c/code\u003e的默认排序有问题，因为它将 3DES 排在 AES128 之前。这是不正确的，因为 3DES 的安全性低于 AES128，并且速度也慢得多。\u003ccode\u003e+3DES\u003c/code\u003e会把它重新排序到其他所有 \u003ccode\u003eHIGH\u003c/code\u003e和\u003ccode\u003eMEDIUM\u003c/code\u003e密码套件之后。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan\u003e\u003ccode\u003e!aNULL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e禁用不进行认证的匿名密码套件。这类密码套件容易遭受MITM攻击，因此不应使用。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e可用的密码套件细节可能会随着\u003cspan\u003eOpenSSL\u003c/span\u003e 版本变化。可使用命令 \u003ccode\u003eopenssl ciphers -v \u0026#39;HIGH:MEDIUM:+3DES:!aNULL\u0026#39;\u003c/code\u003e来查看当前安装的\u003cspan\u003eOpenSSL\u003c/span\u003e版本的实际细节。注意这个列表是根据服务器密钥类型在运行时过滤过的。\u003c/p\u003e","SourceRevision":"2026-09-11@29c86d9","ContentHash":"1532fba06926250eef3128ea635760460a55191e3f7e67aa3cf71bf3e0e5db91","Payload":{"carried_from":"","carry_reason":"","doc_html":"\u003cp\u003e指定允许用于 TLS 1.2 及更低版本连接的 SSL 密码套件列表；对于 TLS 1.3 连接，请参见\u003ca href=\"/docs/18/runtime-config-connection.html#GUC-SSL-TLS13-CIPHERS\"\u003essl_tls13_ciphers\u003c/a\u003e。该设置的语法及支持的值列表可参见 \u003cspan class=\"productname\"\u003eOpenSSL\u003c/span\u003e 包中的 \u003cspan class=\"citerefentry\"\u003e\u003cspan class=\"refentrytitle\"\u003eciphers\u003c/span\u003e\u003c/span\u003e 手册页。默认值是\u003ccode class=\"literal\"\u003eHIGH:MEDIUM:+3DES:!aNULL\u003c/code\u003e。除非你有特定的安全需求，否则这个默认值通常是合理的选择。\u003c/p\u003e\u003cp\u003e这个参数只能在\u003ccode class=\"filename\"\u003epostgresql.conf\u003c/code\u003e文件中或者服务器命令行上设置。\u003c/p\u003e\u003cp\u003e默认值的解释：\u003c/p\u003e\u003cdiv class=\"variablelist\"\u003e\u003cdl\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eHIGH\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e使用\u003ccode class=\"literal\"\u003eHIGH\u003c/code\u003e组中密码算法（例如 AES、Camellia、3DES）的密码套件。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003eMEDIUM\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e使用\u003ccode class=\"literal\"\u003eMEDIUM\u003c/code\u003e组中密码算法（例如 RC4、SEED）的密码套件。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e+3DES\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e\u003cspan class=\"productname\"\u003eOpenSSL\u003c/span\u003e对\u003ccode class=\"literal\"\u003eHIGH\u003c/code\u003e的默认排序有问题，因为它将 3DES 排在 AES128 之前。这是不正确的，因为 3DES 的安全性低于 AES128，并且速度也慢得多。\u003ccode class=\"literal\"\u003e+3DES\u003c/code\u003e会把它重新排序到其他所有 \u003ccode class=\"literal\"\u003eHIGH\u003c/code\u003e和\u003ccode class=\"literal\"\u003eMEDIUM\u003c/code\u003e密码套件之后。\u003c/p\u003e\u003c/dd\u003e\u003cdt\u003e\u003cspan class=\"term\"\u003e\u003ccode class=\"literal\"\u003e!aNULL\u003c/code\u003e\u003c/span\u003e\u003c/dt\u003e\u003cdd\u003e\u003cp\u003e禁用不进行认证的匿名密码套件。这类密码套件容易遭受MITM攻击，因此不应使用。\u003c/p\u003e\u003c/dd\u003e\u003c/dl\u003e\u003c/div\u003e\u003cp\u003e可用的密码套件细节可能会随着\u003cspan class=\"productname\"\u003eOpenSSL\u003c/span\u003e 版本变化。可使用命令 \u003ccode class=\"literal\"\u003eopenssl ciphers -v 'HIGH:MEDIUM:+3DES:!aNULL'\u003c/code\u003e来查看当前安装的\u003cspan class=\"productname\"\u003eOpenSSL\u003c/span\u003e版本的实际细节。注意这个列表是根据服务器密钥类型在运行时过滤过的。\u003c/p\u003e","doc_same_as":""}},"RequestedLocale":"zh-Hans","Fallback":false,"Versions":["10","11","12","13","14","15","16","17","18","19","20","8.3","8.4","9.0","9.1","9.2","9.3","9.4","9.5","9.6"],"Locales":["en","zh-Hans"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
