Index: components/proximity_auth/device_to_device_initiator_operations.cc |
diff --git a/components/proximity_auth/device_to_device_initiator_operations.cc b/components/proximity_auth/device_to_device_initiator_operations.cc |
index d0560cad7eed7f16ec6748b988c29d04459a68dc..01241408657fdcbaf1db2e6007e6753cb7d1d4ad 100644 |
--- a/components/proximity_auth/device_to_device_initiator_operations.cc |
+++ b/components/proximity_auth/device_to_device_initiator_operations.cc |
@@ -215,10 +215,11 @@ void OnInnerMessageUnwrappedForResponderAuth( |
if (!verified) |
PA_LOG(INFO) << "Failed to unwrap inner [Responder Auth] message."; |
+ // Note: The GMS Core implementation does not properly set the metadata |
+ // version, so we only check that the type is UNLOCK_KEY_SIGNED_CHALLENGE. |
cryptauth::GcmMetadata gcm_metadata; |
if (!gcm_metadata.ParseFromString(header.public_metadata()) || |
- gcm_metadata.type() != cryptauth::UNLOCK_KEY_SIGNED_CHALLENGE || |
- gcm_metadata.version() != kGcmMetadataVersion) { |
+ gcm_metadata.type() != cryptauth::UNLOCK_KEY_SIGNED_CHALLENGE) { |
PA_LOG(WARNING) << "Failed to validate GcmMetadata in inner-most " |
<< "[Responder Auth] message."; |
context.callback.Run(false, std::string()); |