Skip to content
Permalink
Browse files
feat: add support for Raw PKCS#1 signing keys (#651)
* feat: add support for Raw PKCS#1 signing keys

PiperOrigin-RevId: 403966825

Source-Link: googleapis/googleapis@5b0219d

Source-Link: https://github.com/googleapis/googleapis-gen/commit/ea0000e708e860b65b574783d5ea61ad340911be
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWEwMDAwZTcwOGU4NjBiNjViNTc0NzgzZDVlYTYxYWQzNDA5MTFiZSJ9

* 🦉 Updates from OwlBot

See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md

Co-authored-by: Owl Bot <gcf-owl-bot[bot]@users.noreply.github.com>
  • Loading branch information
gcf-owl-bot[bot] and gcf-owl-bot[bot] committed Oct 21, 2021
1 parent fcbcc2e commit 1c7a18db7dbb6e25a27384ed693bfa16280fd4d7
Showing with 1,298 additions and 418 deletions.
  1. +6 −2 google-cloud-kms/src/main/java/com/google/cloud/kms/v1/KeyManagementServiceClient.java
  2. +2 −0 google-cloud-kms/src/test/java/com/google/cloud/kms/v1/KeyManagementServiceClientTest.java
  3. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricDecryptRequest.java
  4. +558 −26 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequest.java
  5. +95 −6 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignRequestOrBuilder.java
  6. +120 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponse.java
  7. +20 −0 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/AsymmetricSignResponseOrBuilder.java
  8. +4 −4 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CreateCryptoKeyRequest.java
  9. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CreateCryptoKeyVersionRequest.java
  10. +4 −4 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CreateImportJobRequest.java
  11. +4 −4 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CreateKeyRingRequest.java
  12. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKey.java
  13. +72 −6 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/CryptoKeyVersion.java
  14. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DecryptRequest.java
  15. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/DestroyCryptoKeyVersionRequest.java
  16. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptRequest.java
  17. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/EncryptResponse.java
  18. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ExternalProtectionLevelOptions.java
  19. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GenerateRandomBytesRequest.java
  20. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GetCryptoKeyRequest.java
  21. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GetCryptoKeyVersionRequest.java
  22. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GetImportJobRequest.java
  23. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GetKeyRingRequest.java
  24. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/GetPublicKeyRequest.java
  25. +6 −6 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ImportCryptoKeyVersionRequest.java
  26. +4 −4 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ImportJob.java
  27. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KeyRing.java
  28. +206 −198 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsProto.java
  29. +68 −66 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/KmsResourcesProto.java
  30. +8 −8 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListCryptoKeyVersionsRequest.java
  31. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListCryptoKeyVersionsResponse.java
  32. +8 −8 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListCryptoKeysRequest.java
  33. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListCryptoKeysResponse.java
  34. +8 −8 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListImportJobsRequest.java
  35. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListImportJobsResponse.java
  36. +8 −8 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListKeyRingsRequest.java
  37. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/ListKeyRingsResponse.java
  38. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/MacSignRequest.java
  39. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/MacSignResponse.java
  40. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/MacVerifyRequest.java
  41. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/MacVerifyResponse.java
  42. +4 −4 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/PublicKey.java
  43. +2 −2 proto-google-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/RestoreCryptoKeyVersionRequest.java
  44. +4 −4 ...ogle-cloud-kms-v1/src/main/java/com/google/cloud/kms/v1/UpdateCryptoKeyPrimaryVersionRequest.java
  45. +9 −0 proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/resources.proto
  46. +32 −2 proto-google-cloud-kms-v1/src/main/proto/google/cloud/kms/v1/service.proto
@@ -2943,7 +2943,7 @@ public final UnaryCallable<DecryptRequest, DecryptResponse> decryptCallable() {
*
* @param name Required. The resource name of the
* [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for signing.
* @param digest Required. The digest of the data to sign. The digest must be produced with the
* @param digest Optional. The digest of the data to sign. The digest must be produced with the
* same digest algorithm as specified by the key version's
* [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm].
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -2980,7 +2980,7 @@ public final AsymmetricSignResponse asymmetricSign(CryptoKeyVersionName name, Di
*
* @param name Required. The resource name of the
* [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion] to use for signing.
* @param digest Required. The digest of the data to sign. The digest must be produced with the
* @param digest Optional. The digest of the data to sign. The digest must be produced with the
* same digest algorithm as specified by the key version's
* [algorithm][google.cloud.kms.v1.CryptoKeyVersion.algorithm].
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
@@ -3015,6 +3015,8 @@ public final AsymmetricSignResponse asymmetricSign(String name, Digest digest) {
* .toString())
* .setDigest(Digest.newBuilder().build())
* .setDigestCrc32C(Int64Value.newBuilder().build())
* .setData(ByteString.EMPTY)
* .setDataCrc32C(Int64Value.newBuilder().build())
* .build();
* AsymmetricSignResponse response = keyManagementServiceClient.asymmetricSign(request);
* }
@@ -3051,6 +3053,8 @@ public final AsymmetricSignResponse asymmetricSign(AsymmetricSignRequest request
* .toString())
* .setDigest(Digest.newBuilder().build())
* .setDigestCrc32C(Int64Value.newBuilder().build())
* .setData(ByteString.EMPTY)
* .setDataCrc32C(Int64Value.newBuilder().build())
* .build();
* ApiFuture<AsymmetricSignResponse> future =
* keyManagementServiceClient.asymmetricSignCallable().futureCall(request);
@@ -2077,6 +2077,7 @@ public void asymmetricSignTest() throws Exception {
.setSignatureCrc32C(Int64Value.newBuilder().build())
.setVerifiedDigestCrc32C(true)
.setName("name3373707")
.setVerifiedDataCrc32C(true)
.setProtectionLevel(ProtectionLevel.forNumber(0))
.build();
mockKeyManagementService.addResponse(expectedResponse);
@@ -2126,6 +2127,7 @@ public void asymmetricSignTest2() throws Exception {
.setSignatureCrc32C(Int64Value.newBuilder().build())
.setVerifiedDigestCrc32C(true)
.setName("name3373707")
.setVerifiedDataCrc32C(true)
.setProtectionLevel(ProtectionLevel.forNumber(0))
.build();
mockKeyManagementService.addResponse(expectedResponse);
@@ -310,7 +310,7 @@ public final boolean isInitialized() {

@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!ciphertext_.isEmpty()) {
@@ -328,7 +328,7 @@ public int getSerializedSize() {
if (size != -1) return size;

size = 0;
if (!getNameBytes().isEmpty()) {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (!ciphertext_.isEmpty()) {

0 comments on commit 1c7a18d

Please sign in to comment.