gcloud kms asymmetric-sign Stay organized with collections Save and categorize content based on your preferences.
- NAME
- gcloud kms asymmetric-sign - sign a user input file using an asymmetric-signing key version
- SYNOPSIS
gcloud kms asymmetric-sign--input-file=INPUT_FILE--signature-file=SIGNATURE_FILE[--digest-algorithm=DIGEST_ALGORITHM][--key=KEY][--keyring=KEYRING][--location=LOCATION][--skip-integrity-verification][--version=VERSION][GCLOUD_WIDE_FLAG …]
- DESCRIPTION
- Creates a digital signature of the input file using the providedasymmetric-signing key version and saves the base64 encoded signature.
The required flag
signature-fileindicates the path to storesignature.By default, the command performs integrity verification on data sent to andreceived from Cloud KMS. Use
--skip-integrity-verificationtodisable integrity verification. - EXAMPLES
- The following command will read the file '/tmp/my/file.to.sign', digest it withthe digest algorithm 'sha256' and sign it using the asymmetric CryptoKey
dont-panicVersion 3, and save the signature in base64 format to'/tmp/my/signature'.gcloudkmsasymmetric-sign--location=us-central1--keyring=hitchhiker--key=dont-panic--version=3--digest-algorithm=sha256--input-file=/tmp/my/file.to.sign--signature-file=/tmp/my/signature - REQUIRED FLAGS
--input-file=INPUT_FILE- Path to the input file to sign.
--signature-file=SIGNATURE_FILE- Path to the signature file to output.
- OPTIONAL FLAGS
--digest-algorithm=DIGEST_ALGORITHM- The algorithm to digest the input.
DIGEST_ALGORITHMmustbe one of:sha256,sha384,sha512. --key=KEY- to use for signing.
--keyring=KEYRING- Key ring of the key.
--location=LOCATION- Location of the keyring.
--skip-integrity-verification- Skip integrity verification on request and response API fields.
--version=VERSION- Version to use for signing.
- GCLOUD WIDE FLAGS
- These flags are available to all commands:
--access-token-file,--account,--billing-project,--configuration,--flags-file,--flatten,--format,--help,--impersonate-service-account,--log-http,--project,--quiet,--trace-token,--user-output-enabled,--verbosity.Run
$gcloud helpfor details. - NOTES
- These variants are also available:
gcloudalphakmsasymmetric-signgcloudbetakmsasymmetric-sign
Except as otherwise noted, the content of this page is licensed under theCreative Commons Attribution 4.0 License, and code samples are licensed under theApache 2.0 License. For details, see theGoogle Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-05-07 UTC.