mirror of
https://github.com/certbot/certbot.git
synced 2026-08-04 08:03:44 +02:00
Remove use of sha1 (#4271)
These are not security critical uses of sha1 but they should still be removed.
This commit is contained in:
committed by
Jacob Hoffman-Andrews
parent
93908a33bc
commit
12a6e49cf1
@@ -445,7 +445,7 @@ class TLSSNI01Response(KeyAuthorizationChallengeResponse):
|
|||||||
"""
|
"""
|
||||||
# pylint: disable=protected-access
|
# pylint: disable=protected-access
|
||||||
sans = crypto_util._pyopenssl_cert_or_req_san(cert)
|
sans = crypto_util._pyopenssl_cert_or_req_san(cert)
|
||||||
logger.debug('Certificate %s. SANs: %s', cert.digest('sha1'), sans)
|
logger.debug('Certificate %s. SANs: %s', cert.digest('sha256'), sans)
|
||||||
return self.z_domain.decode() in sans
|
return self.z_domain.decode() in sans
|
||||||
|
|
||||||
def simple_verify(self, chall, domain, account_public_key,
|
def simple_verify(self, chall, domain, account_public_key,
|
||||||
|
|||||||
@@ -336,8 +336,8 @@ class CertLoaderTest(unittest.TestCase):
|
|||||||
from certbot.crypto_util import pyopenssl_load_certificate
|
from certbot.crypto_util import pyopenssl_load_certificate
|
||||||
|
|
||||||
cert, file_type = pyopenssl_load_certificate(CERT)
|
cert, file_type = pyopenssl_load_certificate(CERT)
|
||||||
self.assertEqual(cert.digest('sha1'),
|
self.assertEqual(cert.digest('sha256'),
|
||||||
OpenSSL.crypto.load_certificate(file_type, CERT).digest('sha1'))
|
OpenSSL.crypto.load_certificate(file_type, CERT).digest('sha256'))
|
||||||
|
|
||||||
def test_load_invalid_cert(self):
|
def test_load_invalid_cert(self):
|
||||||
from certbot.crypto_util import pyopenssl_load_certificate
|
from certbot.crypto_util import pyopenssl_load_certificate
|
||||||
|
|||||||
Reference in New Issue
Block a user