Remove protobuf WKT doppleganglers from QUICHE. The bespoke quiche.protobuf.Any message does not behave like google.protobuf.Any due to special casing in protobuf's code. Both google.protobuf.Any and google.protobuf.Timestamp are protobuf well-known-types that should be available to any protobuf user. Recent changes in Chromium's build system make this true there too, so we can finally fix this. PiperOrigin-RevId: 929197056
diff --git a/build/source_list.bzl b/build/source_list.bzl index 1329e37..ebc17ad 100644 --- a/build/source_list.bzl +++ b/build/source_list.bzl
@@ -1825,7 +1825,6 @@ "blind_sign_auth/cached_blind_sign_auth_test.cc", ] protobuf_blind_sign_auth = [ - "blind_sign_auth/proto/any.proto", "blind_sign_auth/proto/attest_and_sign.proto", "blind_sign_auth/proto/attestation.proto", "blind_sign_auth/proto/auth_and_sign.proto",
diff --git a/build/source_list.gni b/build/source_list.gni index a851de2..0bc2ac7 100644 --- a/build/source_list.gni +++ b/build/source_list.gni
@@ -1831,7 +1831,6 @@ "src/quiche/blind_sign_auth/cached_blind_sign_auth_test.cc", ] protobuf_blind_sign_auth = [ - "src/quiche/blind_sign_auth/proto/any.proto", "src/quiche/blind_sign_auth/proto/attest_and_sign.proto", "src/quiche/blind_sign_auth/proto/attestation.proto", "src/quiche/blind_sign_auth/proto/auth_and_sign.proto",
diff --git a/build/source_list.json b/build/source_list.json index 5c9c47b..1b3cbe7 100644 --- a/build/source_list.json +++ b/build/source_list.json
@@ -1830,7 +1830,6 @@ "quiche/blind_sign_auth/cached_blind_sign_auth_test.cc" ], "protobuf_blind_sign_auth": [ - "quiche/blind_sign_auth/proto/any.proto", "quiche/blind_sign_auth/proto/attest_and_sign.proto", "quiche/blind_sign_auth/proto/attestation.proto", "quiche/blind_sign_auth/proto/auth_and_sign.proto",
diff --git a/quiche/blind_sign_auth/blind_sign_auth.cc b/quiche/blind_sign_auth/blind_sign_auth.cc index 1c13313..de86473 100644 --- a/quiche/blind_sign_auth/blind_sign_auth.cc +++ b/quiche/blind_sign_auth/blind_sign_auth.cc
@@ -53,7 +53,7 @@ constexpr std::array<const uint16_t, kExpectedExtensionTypesSize> kExpectedExtensionTypes = {0x0001, 0x0002, 0xF001, 0xF002, 0xF003}; -using quiche::protobuf::Any; +using google::protobuf::Any; using privacy::ppn::AndroidAttestationData; using privacy::ppn::AttestAndSignRequest; using privacy::ppn::AttestAndSignResponse;
diff --git a/quiche/blind_sign_auth/blind_sign_auth_protos.h b/quiche/blind_sign_auth/blind_sign_auth_protos.h index d3cc3f2..25fa62d 100644 --- a/quiche/blind_sign_auth/blind_sign_auth_protos.h +++ b/quiche/blind_sign_auth/blind_sign_auth_protos.h
@@ -1,8 +1,8 @@ #ifndef QUICHE_BLIND_SIGN_AUTH_BLIND_SIGN_AUTH_PROTOS_H_ #define QUICHE_BLIND_SIGN_AUTH_BLIND_SIGN_AUTH_PROTOS_H_ -#include "quiche/blind_sign_auth/proto/any.pb.h" // IWYU pragma: export -#include "anonymous_tokens/proto/anonymous_tokens.pb.h" // IWYU pragma: export +#include "google/protobuf/any.pb.h" // IWYU pragma: export +#include "google/protobuf/timestamp.pb.h" // IWYU pragma: export #include "quiche/blind_sign_auth/proto/attestation.pb.h" // IWYU pragma: export #include "quiche/blind_sign_auth/proto/attest_and_sign.pb.h" // IWYU pragma: export #include "quiche/blind_sign_auth/proto/auth_and_sign.pb.h" // IWYU pragma: export
diff --git a/quiche/blind_sign_auth/proto/any.proto b/quiche/blind_sign_auth/proto/any.proto deleted file mode 100644 index 59e3eaf..0000000 --- a/quiche/blind_sign_auth/proto/any.proto +++ /dev/null
@@ -1,29 +0,0 @@ -// Copyright 2023 Google LLC -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// https://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS-IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -syntax = "proto3"; - -package quiche.protobuf; - -option java_multiple_files = true; -option java_package = "com.google.privacy.ppn.proto"; - -// Cloned from -// https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/any.proto. -message Any { - string type_url = 1; - - // Must be a valid serialized protocol buffer of the above specified type. - bytes value = 2; -}
diff --git a/quiche/blind_sign_auth/proto/attestation.proto b/quiche/blind_sign_auth/proto/attestation.proto index 7ab2f56..1e1a774 100644 --- a/quiche/blind_sign_auth/proto/attestation.proto +++ b/quiche/blind_sign_auth/proto/attestation.proto
@@ -16,7 +16,7 @@ package privacy.ppn; -import "quiche/blind_sign_auth/proto/any.proto"; +import "google/protobuf/any.proto"; option java_multiple_files = true; option java_outer_classname = "AttestationProto"; @@ -117,5 +117,5 @@ } message AttestationData { - quiche.protobuf.Any attestation_data = 1; + google.protobuf.Any attestation_data = 1; }
diff --git a/quiche/blind_sign_auth/proto/public_metadata.proto b/quiche/blind_sign_auth/proto/public_metadata.proto index 31b993b..a57728b 100644 --- a/quiche/blind_sign_auth/proto/public_metadata.proto +++ b/quiche/blind_sign_auth/proto/public_metadata.proto
@@ -16,7 +16,7 @@ package privacy.ppn; -import "anonymous_tokens/proto/anonymous_tokens.proto"; +import "google/protobuf/timestamp.proto"; option java_multiple_files = true; option java_package = "com.google.privacy.ppn.proto"; @@ -43,7 +43,7 @@ string service_type = 2; // When the token and metadata expire. - anonymous_tokens.Timestamp expiration = 3; + google.protobuf.Timestamp expiration = 3; // Indicates the debug context of this payload. enum DebugMode {