Skip to content
This repository has been archived by the owner on Oct 2, 2023. It is now read-only.

Commit

Permalink
feat: add support for Raw PKCS#1 signing keys
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 403966825

Source-Link: googleapis/googleapis@5b0219d

Source-Link: googleapis/googleapis-gen@ea0000e
Copy-Tag: eyJwIjoiLmdpdGh1Yi8uT3dsQm90LnlhbWwiLCJoIjoiZWEwMDAwZTcwOGU4NjBiNjViNTc0NzgzZDVlYTYxYWQzNDA5MTFiZSJ9
  • Loading branch information
gcf-owl-bot[bot] committed Oct 19, 2021
1 parent ff530f0 commit c781995
Show file tree
Hide file tree
Showing 128 changed files with 13,783 additions and 22,934 deletions.

Large diffs are not rendered by default.

Expand Up @@ -30,6 +30,7 @@
import com.google.api.gax.rpc.ClientContext;
import com.google.api.gax.rpc.ClientSettings;
import com.google.api.gax.rpc.PagedCallSettings;
import com.google.api.gax.rpc.StubSettings;
import com.google.api.gax.rpc.TransportChannelProvider;
import com.google.api.gax.rpc.UnaryCallSettings;
import com.google.cloud.kms.v1.stub.KeyManagementServiceStubSettings;
Expand All @@ -49,9 +50,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (cloudkms.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (cloudkms.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -93,8 +94,7 @@ public class KeyManagementServiceSettings extends ClientSettings<KeyManagementSe

/** Returns the object with the settings used for calls to listCryptoKeyVersions. */
public PagedCallSettings<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings() {
return ((KeyManagementServiceStubSettings) getStubSettings()).listCryptoKeyVersionsSettings();
Expand Down Expand Up @@ -357,8 +357,7 @@ public Builder applyToAllUnaryMethods(

/** Returns the builder for the settings used for calls to listCryptoKeyVersions. */
public PagedCallSettings.Builder<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings() {
return getStubSettingsBuilder().listCryptoKeyVersionsSettings();
Expand Down
Expand Up @@ -27,10 +27,10 @@
* following objects:
*
* <ul>
* <li>[KeyRing][google.cloud.kms.v1.KeyRing]
* <li>[CryptoKey][google.cloud.kms.v1.CryptoKey]
* <li>[CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
* <li>[ImportJob][google.cloud.kms.v1.ImportJob]
* <li> [KeyRing][google.cloud.kms.v1.KeyRing]
* <li> [CryptoKey][google.cloud.kms.v1.CryptoKey]
* <li> [CryptoKeyVersion][google.cloud.kms.v1.CryptoKeyVersion]
* <li> [ImportJob][google.cloud.kms.v1.ImportJob]
* </ul>
*
* <p>If you are using manual gRPC libraries, see [Using gRPC with Cloud
Expand Down
Expand Up @@ -79,6 +79,7 @@
import io.grpc.MethodDescriptor;
import io.grpc.protobuf.ProtoUtils;
import java.io.IOException;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import javax.annotation.Generated;

Expand Down
Expand Up @@ -106,9 +106,9 @@
* <p>The default instance has everything set to sensible defaults:
*
* <ul>
* <li>The default service address (cloudkms.googleapis.com) and default port (443) are used.
* <li>Credentials are acquired automatically through Application Default Credentials.
* <li>Retries are configured for idempotent methods but not for non-idempotent methods.
* <li> The default service address (cloudkms.googleapis.com) and default port (443) are used.
* <li> Credentials are acquired automatically through Application Default Credentials.
* <li> Retries are configured for idempotent methods but not for non-idempotent methods.
* </ul>
*
* <p>The builder of this class is recursive, so contained classes are themselves builders. When
Expand Down Expand Up @@ -149,8 +149,7 @@ public class KeyManagementServiceStubSettings
ListCryptoKeysRequest, ListCryptoKeysResponse, ListCryptoKeysPagedResponse>
listCryptoKeysSettings;
private final PagedCallSettings<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings;
private final PagedCallSettings<
Expand Down Expand Up @@ -379,13 +378,11 @@ public ApiFuture<ListCryptoKeysPagedResponse> getFuturePagedResponse(
};

private static final PagedListResponseFactory<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
LIST_CRYPTO_KEY_VERSIONS_PAGE_STR_FACT =
new PagedListResponseFactory<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>() {
@Override
public ApiFuture<ListCryptoKeyVersionsPagedResponse> getFuturePagedResponse(
Expand Down Expand Up @@ -434,8 +431,7 @@ public ApiFuture<ListImportJobsPagedResponse> getFuturePagedResponse(

/** Returns the object with the settings used for calls to listCryptoKeyVersions. */
public PagedCallSettings<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings() {
return listCryptoKeyVersionsSettings;
Expand Down Expand Up @@ -702,8 +698,7 @@ public static class Builder
ListCryptoKeysRequest, ListCryptoKeysResponse, ListCryptoKeysPagedResponse>
listCryptoKeysSettings;
private final PagedCallSettings.Builder<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings;
private final PagedCallSettings.Builder<
Expand Down Expand Up @@ -1123,8 +1118,7 @@ public Builder applyToAllUnaryMethods(

/** Returns the builder for the settings used for calls to listCryptoKeyVersions. */
public PagedCallSettings.Builder<
ListCryptoKeyVersionsRequest,
ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsRequest, ListCryptoKeyVersionsResponse,
ListCryptoKeyVersionsPagedResponse>
listCryptoKeyVersionsSettings() {
return listCryptoKeyVersionsSettings;
Expand Down
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit c781995

Please sign in to comment.