File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2222from __future__ import absolute_import
2323
2424import io
25- import warnings
2625
2726from pyasn1 .codec .der import decoder # type: ignore
2827from pyasn1_modules import pem # type: ignore
4039_PKCS8_MARKER = ("-----BEGIN PRIVATE KEY-----" , "-----END PRIVATE KEY-----" )
4140_PKCS8_SPEC = PrivateKeyInfo ()
4241
43- warnings .warn (
44- (
45- "The 'rsa' library is deprecated and will be removed in a future release. "
46- "Please migrate to 'cryptography'."
47- ),
48- category = DeprecationWarning ,
49- stacklevel = 2 ,
50- )
51-
5242
5343def _bit_list_to_bytes (bit_list ):
5444 """Converts an iterable of 1s and 0s to bytes.
@@ -74,10 +64,6 @@ def _bit_list_to_bytes(bit_list):
7464class RSAVerifier (base .Verifier ):
7565 """Verifies RSA cryptographic signatures using public keys.
7666
77- .. deprecated::
78- The `rsa` library has been archived. Please migrate to
79- `cryptography`.
80-
8167 Args:
8268 public_key (rsa.key.PublicKey): The public key used to verify
8369 signatures.
@@ -130,10 +116,6 @@ def from_string(cls, public_key):
130116class RSASigner (base .Signer , base .FromServiceAccountMixin ):
131117 """Signs messages with an RSA private key.
132118
133- .. deprecated::
134- The `rsa` library has been archived. Please migrate to
135- `cryptography`.
136-
137119 Args:
138120 private_key (rsa.key.PrivateKey): The private key to sign with.
139121 key_id (str): Optional key ID used to identify this private key. This
Original file line number Diff line number Diff line change @@ -135,7 +135,6 @@ def unit(session):
135135 "--cov-report=term-missing" ,
136136 "tests" ,
137137 "tests_async" ,
138- * session .posargs ,
139138 )
140139
141140
Original file line number Diff line number Diff line change @@ -191,12 +191,3 @@ def test_from_service_account_file(self):
191191
192192 assert signer .key_id == SERVICE_ACCOUNT_INFO [base ._JSON_FILE_PRIVATE_KEY_ID ]
193193 assert isinstance (signer ._key , rsa .key .PrivateKey )
194-
195-
196- class TestModule (object ):
197- def test_import_warning (self ):
198- import importlib
199- from google .auth .crypt import _python_rsa
200-
201- with pytest .warns (DeprecationWarning , match = "The 'rsa' library is deprecated" ):
202- importlib .reload (_python_rsa )
You can’t perform that action at this time.
0 commit comments