2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-15 07:43:26 +00:00

Add MAC operation support for client

This commit is contained in:
Hao Shen
2017-01-31 09:06:24 -08:00
parent a2696b722f
commit 2d45f33d43
9 changed files with 423 additions and 10 deletions

View File

@@ -214,15 +214,32 @@ def build_cli_parser(operation=None):
"SECRET_DATA"))
elif operation is Operation.DISCOVER_VERSIONS:
parser.add_option(
"-v",
"--protocol-versions",
action="store",
type="str",
default=None,
dest="protocol_versions",
help=("Protocol versions supported by client. "
"ex. '1.1,1.2 1.3'"))
"-v",
"--protocol-versions",
action="store",
type="str",
default=None,
dest="protocol_versions",
help=("Protocol versions supported by client. "
"ex. '1.1,1.2 1.3'"))
elif operation is Operation.MAC:
parser.add_option(
"-i",
"--uuid",
action="store",
type="str",
default=None,
dest="uuid",
help="The unique ID of the managed object that is the key"
"to use for the MAC operation")
parser.add_option(
"-a",
"--algorithm",
action="store",
type="str",
default=None,
dest="algorithm",
help="Encryption algorithm for the secret (e.g., AES)")
return parser