Skip to content

Commit

Permalink
Bump aiobotocore 2.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
terricain committed Feb 4, 2024
1 parent 00c9ab6 commit c20451a
Show file tree
Hide file tree
Showing 5 changed files with 1,162 additions and 1,170 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@
History
=======

12.3.0 (2024-02-02)
-------------------

* Bumped aiobotocore to 2.11.2
* Fixed cryptography typing on the CSE module

12.2.0 (2024-01-16)
-------------------

Expand Down
10 changes: 5 additions & 5 deletions aioboto3/s3/cse.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
from cryptography.hazmat.primitives.ciphers.modes import CBC, CTR, ECB
from cryptography.hazmat.primitives.padding import PKCS7
from cryptography.exceptions import InvalidTag
from cryptography.hazmat.backends.openssl.rsa import _RSAPrivateKey, _RSAPublicKey
from cryptography.hazmat.primitives.asymmetric import padding
from cryptography.hazmat.primitives.asymmetric.types import PrivateKeyTypes, PublicKeyTypes
from cryptography.hazmat.primitives import serialization


Expand Down Expand Up @@ -94,8 +94,8 @@ class AsymmetricCryptoContext(CryptoContext):
:param loop: Event loop
"""

def __init__(self, public_key: Optional[_RSAPublicKey] = None,
private_key: Optional[_RSAPrivateKey] = None, loop: Optional[asyncio.AbstractEventLoop] = None):
def __init__(self, public_key: Optional[PublicKeyTypes] = None,
private_key: Optional[PrivateKeyTypes] = None, loop: Optional[asyncio.AbstractEventLoop] = None):

self.public_key = public_key
self.private_key = private_key
Expand Down Expand Up @@ -136,7 +136,7 @@ async def get_encryption_aes_key(self) -> Tuple[bytes, Dict[str, str], str]:
return random_bytes, {}, base64.b64encode(ciphertext).decode()

@staticmethod
def from_der_public_key(data: bytes) -> _RSAPublicKey:
def from_der_public_key(data: bytes) -> PublicKeyTypes:
"""
Convert public key in DER encoding to a Public key object
Expand All @@ -146,7 +146,7 @@ def from_der_public_key(data: bytes) -> _RSAPublicKey:
return serialization.load_der_public_key(data, default_backend())

@staticmethod
def from_der_private_key(data: bytes, password: Optional[str] = None) -> _RSAPrivateKey:
def from_der_private_key(data: bytes, password: Optional[str] = None) -> PrivateKeyTypes:
"""
Convert private key in DER encoding to a Private key object
Expand Down
Loading

0 comments on commit c20451a

Please sign in to comment.