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 @@ -1320,6 +1320,26 @@ def set_tmp_ecdh(self, curve):
1320
1320
"""
1321
1321
_lib .SSL_CTX_set_tmp_ecdh (self ._context , curve ._to_EC_KEY ())
1322
1322
1323
+ def set_ciphersuites (self , cipher_list ):
1324
+ """
1325
+ Set the list of ciphers to be used to configure the available TLSv1.3
1326
+ ciphersuites for this context.
1327
+
1328
+ See the OpenSSL manual for more information (e.g.
1329
+ :manpage:`ciphers(1)`).
1330
+
1331
+ :param bytes cipher_list: An OpenSSL cipher string.
1332
+ :return: None
1333
+ """
1334
+ cipher_list = _text_to_bytes_and_warn ("cipher_list" , cipher_list )
1335
+
1336
+ if not isinstance (cipher_list , bytes ):
1337
+ raise TypeError ("cipher_list must be a byte string." )
1338
+
1339
+ _openssl_assert (
1340
+ _lib .SSL_CTX_set_ciphersuites (self ._context , cipher_list ) == 1
1341
+ )
1342
+
1323
1343
def set_cipher_list (self , cipher_list ):
1324
1344
"""
1325
1345
Set the list of ciphers to be used in this context.
You can’t perform that action at this time.
0 commit comments