Skip to content

Commit ebcb759

Browse files
fix
1 parent 800f9de commit ebcb759

File tree

6 files changed

+23
-10
lines changed

6 files changed

+23
-10
lines changed

src/aws_encryption_sdk/materials_managers/mpl/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Modules related to the MPL's materials managers interfaces."""
13+
"""Modules related to the MPL's materials managers interfaces.
14+
15+
The aws-cryptographic-materials-library MUST be installed to use these modules.
16+
"""

src/aws_encryption_sdk/materials_managers/mpl/cmm.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ def get_encryption_materials(
6060
:param request: Request for encryption materials
6161
"""
6262
try:
63-
mpl_input: MPL_GetEncryptionMaterialsInput = CryptoMaterialsManagerFromMPL._native_to_mpl_get_encryption_materials(
64-
request
65-
)
63+
mpl_input: MPL_GetEncryptionMaterialsInput = \
64+
CryptoMaterialsManagerFromMPL._native_to_mpl_get_encryption_materials(
65+
request
66+
)
6667
mpl_output: MPL_GetEncryptionMaterialsOutput = self.mpl_cmm.get_encryption_materials(mpl_input)
6768
return EncryptionMaterialsFromMPL(mpl_output.encryption_materials)
6869
except AwsCryptographicMaterialProvidersException as mpl_exception:

src/aws_encryption_sdk/streaming_client.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,7 +555,7 @@ def _prep_message(self):
555555
# MPL verification key is PEM bytes, not DER bytes.
556556
# If the underlying CMM is from the MPL, load PEM bytes.
557557
if (_HAS_MPL
558-
and isinstance(self.config.materials_manager, CryptoMaterialsManagerFromMPL)):
558+
and isinstance(self.config.materials_manager, CryptoMaterialsManagerFromMPL)):
559559
self.signer = Signer.from_key_bytes(
560560
algorithm=self._encryption_materials.algorithm, key_bytes=self._encryption_materials.signing_key,
561561
encoding=serialization.Encoding.PEM,
@@ -923,7 +923,7 @@ def _read_header(self):
923923
# MPL verification key is NOT key bytes; it is bytes of the compressed point.
924924
# If the underlying CMM is from the MPL, load bytes from encoded point.
925925
if (_HAS_MPL
926-
and isinstance(self.config.materials_manager, CryptoMaterialsManagerFromMPL)):
926+
and isinstance(self.config.materials_manager, CryptoMaterialsManagerFromMPL)):
927927
self.verifier = Verifier.from_encoded_point(
928928
algorithm=header.algorithm,
929929
encoded_point=base64.b64encode(decryption_materials.verification_key)

test/mpl/__init__.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,7 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Module containing tests that REQUIRE the aws-cryptographic-material-providers library to run."""
13+
"""Module testing components that use the MPL.
14+
15+
The aws-cryptographic-materials-library MUST be installed to run tests in this module.
16+
"""

test/mpl/unit/test_material_managers_mpl_cmm.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,10 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Unit test suite to validate aws_encryption_sdk.materials_managers.mpl.cmm logic."""
13+
"""Unit test suite to validate aws_encryption_sdk.materials_managers.mpl.cmm logic.
14+
15+
The aws-cryptographic-materials-library MUST be installed to run tests in this module.
16+
"""
1417

1518
import pytest
1619
from aws_cryptographic_materialproviders.mpl.errors import AwsCryptographicMaterialProvidersException

test/mpl/unit/test_material_managers_mpl_materials.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,18 @@
1010
# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF
1111
# ANY KIND, either express or implied. See the License for the specific
1212
# language governing permissions and limitations under the License.
13-
"""Unit test suite to validate aws_encryption_sdk.materials_managers.mpl.cmm logic."""
13+
"""Unit test suite to validate aws_encryption_sdk.materials_managers.mpl.materials logic.
14+
15+
The aws-cryptographic-materials-library MUST be installed to run tests in this module.
16+
"""
1417

1518
import pytest
1619
from aws_cryptographic_materialproviders.mpl.models import (
1720
DecryptionMaterials as MPL_DecryptionMaterials,
1821
EncryptedDataKey as MPL_EncryptedDataKey,
1922
EncryptionMaterials as MPL_EncryptionMaterials,
2023
)
21-
from mock import MagicMock, PropertyMock, patch
24+
from mock import MagicMock, patch
2225
from typing import Dict, List, Set
2326

2427
import aws_encryption_sdk.materials_managers.mpl.materials

0 commit comments

Comments
 (0)