|
|
@ -222,7 +222,7 @@ int grpc_ssl_cmp_target_name(absl::string_view target_name, |
|
|
|
return overridden_target_name.compare(other_overridden_target_name); |
|
|
|
return overridden_target_name.compare(other_overridden_target_name); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
static bool isSpiffeId(absl::string_view uri) { |
|
|
|
static bool IsSpiffeId(absl::string_view uri) { |
|
|
|
// Return false without logging for a non-spiffe uri scheme.
|
|
|
|
// Return false without logging for a non-spiffe uri scheme.
|
|
|
|
if (!absl::StartsWith(uri, "spiffe://")) { |
|
|
|
if (!absl::StartsWith(uri, "spiffe://")) { |
|
|
|
return false; |
|
|
|
return false; |
|
|
@ -291,7 +291,7 @@ grpc_core::RefCountedPtr<grpc_auth_context> grpc_ssl_peer_to_auth_context( |
|
|
|
prop->value.data, prop->value.length); |
|
|
|
prop->value.data, prop->value.length); |
|
|
|
} else if (strcmp(prop->name, TSI_X509_URI_PEER_PROPERTY) == 0) { |
|
|
|
} else if (strcmp(prop->name, TSI_X509_URI_PEER_PROPERTY) == 0) { |
|
|
|
absl::string_view spiffe_id(prop->value.data, prop->value.length); |
|
|
|
absl::string_view spiffe_id(prop->value.data, prop->value.length); |
|
|
|
if (isSpiffeId(spiffe_id)) { |
|
|
|
if (IsSpiffeId(spiffe_id)) { |
|
|
|
spiffe_data = prop->value.data; |
|
|
|
spiffe_data = prop->value.data; |
|
|
|
spiffe_length = prop->value.length; |
|
|
|
spiffe_length = prop->value.length; |
|
|
|
spiffe_id_count += 1; |
|
|
|
spiffe_id_count += 1; |
|
|
|