diff --git a/kmip/demos/utils.py b/kmip/demos/utils.py index 3d7709a..2558798 100644 --- a/kmip/demos/utils.py +++ b/kmip/demos/utils.py @@ -468,6 +468,8 @@ def log_secret(logger, secret_type, secret_value): log_private_key(logger, secret_value) elif secret_type is ObjectType.PUBLIC_KEY: log_public_key(logger, secret_value) + elif secret_type is ObjectType.SYMMETRIC_KEY: + log_symmetric_key(logger, secret_value) else: logger.info('generic secret: {0}'.format(secret_value)) @@ -492,6 +494,12 @@ def log_private_key(logger, private_key): log_key_block(logger, key_block) +def log_symmetric_key(logger, skey): + key_block = skey.key_block + + log_key_block(logger, key_block) + + def log_key_block(logger, key_block): if key_block is not None: logger.info('key block:')