Skip to content

Commit 0401aee

Browse files
committed
fix
1 parent 1d47afa commit 0401aee

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

examples/src/legacy/custom_cmm_example.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@
33
"""Example to create a custom crypto material manager class."""
44

55
import aws_encryption_sdk
6-
from aws_encryption_sdk import CommitmentPolicy
6+
from aws_encryption_sdk import CommitmentPolicy, StrictAwsKmsMasterKeyProvider
77
from aws_encryption_sdk.materials_managers.base import CryptoMaterialsManager
8+
from aws_encryption_sdk.materials_managers.default import DefaultCryptoMaterialsManager
89

910

1011
# Custom CMM implementation.
@@ -14,9 +15,9 @@
1415
class CustomSigningSuiteOnlyCMM(CryptoMaterialsManager):
1516
"""Example custom crypto materials manager class."""
1617

17-
def __init__(self, cmm: CryptoMaterialsManager) -> None:
18-
super().__init__()
19-
self.underlying_cmm = cmm
18+
def __init__(self, master_key_provider: StrictAwsKmsMasterKeyProvider) -> None:
19+
"""Constructor for CustomSigningSuiteOnlyCMM class."""
20+
self.underlying_cmm = DefaultCryptoMaterialsManager(master_key_provider)
2021

2122
def get_encryption_materials(self, request):
2223
"""Provides encryption materials appropriate for the request for the custom CMM.

0 commit comments

Comments
 (0)