File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change 3
3
"""Example to create a custom crypto material manager class."""
4
4
5
5
import aws_encryption_sdk
6
- from aws_encryption_sdk import CommitmentPolicy
6
+ from aws_encryption_sdk import CommitmentPolicy , StrictAwsKmsMasterKeyProvider
7
7
from aws_encryption_sdk .materials_managers .base import CryptoMaterialsManager
8
+ from aws_encryption_sdk .materials_managers .default import DefaultCryptoMaterialsManager
8
9
9
10
10
11
# Custom CMM implementation.
14
15
class CustomSigningSuiteOnlyCMM (CryptoMaterialsManager ):
15
16
"""Example custom crypto materials manager class."""
16
17
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 )
20
21
21
22
def get_encryption_materials (self , request ):
22
23
"""Provides encryption materials appropriate for the request for the custom CMM.
You can’t perform that action at this time.
0 commit comments