mirror of https://github.com/OpenKMIP/PyKMIP.git
Merge pull request #131 from viktorTarasov/feature/utils/log-skey
utils: log symmetric key
This commit is contained in:
commit
5eb1625a23
|
@ -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:')
|
||||
|
|
Loading…
Reference in New Issue