Skip to content

Commit 23d5e24

Browse files
author
Jean-Daniel Dupas
committed
Line lenght.
1 parent 4688f4f commit 23d5e24

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

src/OpenSSL/SSL.py

+7-5
Original file line numberDiff line numberDiff line change
@@ -1222,10 +1222,12 @@ def set_sigalgs_list(self, sigalgs_list):
12221222
if not isinstance(sigalgs_list, bytes):
12231223
raise TypeError("sigalgs_list must be a byte string.")
12241224

1225-
if _lib.Cryptography_HAS_SIGALGS:
1226-
_openssl_assert(
1227-
_lib.SSL_CTX_set1_sigalgs_list(self._context, sigalgs_list) == 1
1228-
)
1225+
if not _lib.Cryptography_HAS_SIGALGS:
1226+
return
1227+
1228+
_openssl_assert(
1229+
_lib.SSL_CTX_set1_sigalgs_list(self._context, sigalgs_list) == 1
1230+
)
12291231

12301232
def set_client_ca_list(self, certificate_authorities):
12311233
"""
@@ -2041,7 +2043,7 @@ def get_cipher_list(self):
20412043

20422044
def get_sigalgs(self):
20432045
"""
2044-
Retrieve the list of signature algorithms used by the Connection object.
2046+
Retrieve list of signature algorithms used by the Connection object.
20452047
Must be used after handshake only.
20462048
See :manpage:`SSL_get_sigalgs(3)`.
20472049

tests/test_ssl.py

+7-6
Original file line numberDiff line numberDiff line change
@@ -489,9 +489,9 @@ def test_set_sigalgs_list_invalid_name(self, context):
489489

490490
def test_set_sigalgs_list_not_supported(self):
491491
"""
492-
If no signature algorithms supported by the server are set, the handshake
493-
fails with a `"no suitable signature algorithm"` reason string,
494-
or 'no shared cipher' on older OpenSSL releases.
492+
If no signature algorithms supported by the server are set,
493+
the handshake fails with a `"no suitable signature algorithm"`
494+
reason string, or 'no shared cipher' on older OpenSSL releases.
495495
"""
496496

497497
def make_client(socket):
@@ -506,8 +506,8 @@ def make_client(socket):
506506

507507
def test_get_sigalgs(self):
508508
"""
509-
`Connection.get_sigalgs` returns the signature algorithms send by the client to the server.
510-
This is supported only in TLS1_2 and later.
509+
`Connection.get_sigalgs` returns the signature algorithms send by
510+
the client to the server. This is supported only in TLS1_2 and later.
511511
"""
512512
def make_client(socket):
513513
context = Context(TLSv1_2_METHOD)
@@ -517,7 +517,8 @@ def make_client(socket):
517517
return c
518518

519519
srv, client = loopback(
520-
server_factory=lambda s: loopback_server_factory(s, TLSv1_2_METHOD),
520+
server_factory=lambda s: loopback_server_factory(s,
521+
TLSv1_2_METHOD),
521522
client_factory=make_client)
522523

523524
sigalgs = srv.get_sigalgs()

0 commit comments

Comments
 (0)