Skip to content
This repository was archived by the owner on Mar 6, 2026. It is now read-only.

Commit 23c8865

Browse files
committed
added comments
1 parent 57f9d69 commit 23c8865

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

google/auth/crypt/_cryptography_rsa.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,10 @@ def _warn_rsa_type(key_type):
6262
class RSAVerifier(base.Verifier):
6363
"""Verifies RSA cryptographic signatures using public keys.
6464
65+
Note: rsa.key.PublicKey keys are currently supported, but the `rsa` library
66+
is deprecated. Please migrate to `cryptography` keys or use
67+
`.from_string()` instead
68+
6569
Args:
6670
public_key (
6771
cryptography.hazmat.primitives.asymmetric.rsa.RSAPublicKey):
@@ -117,6 +121,10 @@ def from_string(cls, public_key):
117121
class RSASigner(base.Signer, base.FromServiceAccountMixin):
118122
"""Signs messages with an RSA private key.
119123
124+
Note: rsa.key.PrivateKey keys are currently supported, but the `rsa` library
125+
is deprecated. Please migrate to `cryptography` keys or use
126+
`.from_string()` instead
127+
120128
Args:
121129
private_key (
122130
cryptography.hazmat.primitives.asymmetric.rsa.RSAPrivateKey):

tests/crypt/test__cryptography_rsa.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,9 @@ def test_pickle(self):
179179

180180
@pytest.mark.skipif(rsa is None, reason="rsa library is not installed")
181181
class TestRSATransparency(object):
182+
"""
183+
RSASigner and RSAVerifier should be backwards compatible with rsa keys
184+
"""
182185
@classmethod
183186
def setup_class(cls):
184187
import rsa

0 commit comments

Comments
 (0)