2
0
mirror of https://github.com/openkmip/pykmip synced 2025-12-14 15:23:27 +00:00

Add CryptographicLength filtering support for the Locate operation

This change updates Locate operation support in the PyKMIP server,
allowing users to filter objects based on the object's
Cryptographic Length. If an object's type does not support the
Cryptographic Length attribute, the object is not a match. Unit
tests and integration tests have been added to test and verify
the correctness of this feature.

Additionally, the Locate demo scripts have also been updated to
support Cryptographic Length filtering. Simply use the
"--cryptographic-length" flag to specify a Cryptographic Length
integer value for the Locate script to filter on.
This commit is contained in:
Peter Hamilton
2019-07-31 12:07:28 -04:00
committed by Peter Hamilton
parent bf518c8393
commit 6dcae13c5b
7 changed files with 199 additions and 0 deletions

View File

@@ -279,6 +279,14 @@ def build_cli_parser(operation=None):
dest="cryptographic_algorithm",
help="The cryptographic algorithm of the secret (e.g., AES, RSA)"
)
parser.add_option(
"--cryptographic-length",
action="store",
type="int",
default=None,
dest="cryptographic_length",
help="The cryptographic length of the secret (e.g., 128, 2048)"
)
elif operation is Operation.REGISTER:
parser.add_option(
"-f",