File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -1500,6 +1500,29 @@ def set_cipher_list(self, cipher_list: bytes) -> None:
1500
1500
],
1501
1501
)
1502
1502
1503
+ @_require_not_used
1504
+ def set_ciphersuites (self , ciphersuites : bytes ) -> None :
1505
+ """
1506
+ Set the list of TLS 1.3 ciphers to be used in this context.
1507
+ OpenSSL maintains a separate list of TLS 1.3+ ciphers to
1508
+ ciphers for TLS 1.2 and lowers.
1509
+
1510
+ See the OpenSSL manual for more information (e.g.
1511
+ :manpage:`ciphers(1)`).
1512
+
1513
+ :param bytes ciphersuites: An OpenSSL cipher string containing
1514
+ TLS 1.3+ ciphersuites.
1515
+ :return: None
1516
+ """
1517
+ ciphersuites = _text_to_bytes_and_warn ("ciphersuites" , ciphersuites )
1518
+
1519
+ if not isinstance (ciphersuites , bytes ):
1520
+ raise TypeError ("ciphersuites must be a byte string." )
1521
+
1522
+ _openssl_assert (
1523
+ _lib .SSL_CTX_set_ciphersuites (self ._context , ciphersuites ) == 1
1524
+ )
1525
+
1503
1526
@_require_not_used
1504
1527
def set_client_ca_list (
1505
1528
self , certificate_authorities : Sequence [X509Name ]
You can’t perform that action at this time.
0 commit comments