File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -1343,6 +1343,26 @@ def set_tmp_ecdh(self, curve: _EllipticCurve) -> None:
13431343 """
13441344 _lib .SSL_CTX_set_tmp_ecdh (self ._context , curve ._to_EC_KEY ())
13451345
1346+ def set_ciphersuites (self , cipher_list : bytes ) -> None :
1347+ """
1348+ Set the list of ciphers to be used to configure the available TLSv1.3
1349+ ciphersuites for this context.
1350+
1351+ See the OpenSSL manual for more information (e.g.
1352+ :manpage:`ciphers(1)`).
1353+
1354+ :param bytes cipher_list: An OpenSSL cipher string.
1355+ :return: None
1356+ """
1357+ cipher_list = _text_to_bytes_and_warn ("cipher_list" , cipher_list )
1358+
1359+ if not isinstance (cipher_list , bytes ):
1360+ raise TypeError ("cipher_list must be a byte string." )
1361+
1362+ _openssl_assert (
1363+ _lib .SSL_CTX_set_ciphersuites (self ._context , cipher_list ) == 1
1364+ )
1365+
13461366 def set_cipher_list (self , cipher_list : bytes ) -> None :
13471367 """
13481368 Set the list of ciphers to be used in this context.
You can’t perform that action at this time.
0 commit comments