@@ -70,10 +70,7 @@ class DigestAlgorithm(FragmentLookupMixin, InvalidInputErrorMixin, Enum):
7070 SHA3_512 = "http://www.w3.org/2007/05/xmldsig-more#sha3-512"
7171
7272 SHA1 = "http://www.w3.org/2000/09/xmldsig#sha1"
73- """
74- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
75- Support for their algorithm identifiers is deprecated and will be removed in a future release.
76- """
73+ "See `SHA1 deprecation`_."
7774
7875 @property
7976 def implementation (self ) -> Callable :
@@ -123,29 +120,24 @@ class SignatureMethod(FragmentLookupMixin, InvalidInputErrorMixin, Enum):
123120
124121 DSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#dsa-sha1"
125122 """
126- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
127- Support for their algorithm identifiers is deprecated and will be removed in a future release.
123+ _`SHA1 deprecation`: SHA1 based algorithms are not secure for use in digital signatures. They are included for
124+ legacy compatibility only and disabled by default. To verify SHA1 based signatures, use::
125+
126+ XMLVerifier().verify(
127+ expect_config=SignatureConfiguration(
128+ signature_methods=...,
129+ digest_algorithms=...
130+ )
131+ )
128132 """
129133 HMAC_SHA1 = "http://www.w3.org/2000/09/xmldsig#hmac-sha1"
130- """
131- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
132- Support for their algorithm identifiers is deprecated and will be removed in a future release.
133- """
134+ "See `SHA1 deprecation`_."
134135 RSA_SHA1 = "http://www.w3.org/2000/09/xmldsig#rsa-sha1"
135- """
136- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
137- Support for their algorithm identifiers is deprecated and will be removed in a future release.
138- """
136+ "See `SHA1 deprecation`_."
139137 ECDSA_SHA1 = "http://www.w3.org/2001/04/xmldsig-more#ecdsa-sha1"
140- """
141- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
142- Support for their algorithm identifiers is deprecated and will be removed in a future release.
143- """
138+ "See `SHA1 deprecation`_."
144139 SHA1_RSA_MGF1 = "http://www.w3.org/2007/05/xmldsig-more#sha1-rsa-MGF1"
145- """
146- SHA1 based algorithms are not secure for use in digital signatures. They are included for legacy compatibility only.
147- Support for their algorithm identifiers is deprecated and will be removed in a future release.
148- """
140+ "See `SHA1 deprecation`_."
149141
150142
151143class CanonicalizationMethod (InvalidInputErrorMixin , Enum ):
0 commit comments