summaryrefslogtreecommitdiff
path: root/grpc/src/cpp/client/secure_credentials.cc
diff options
context:
space:
mode:
Diffstat (limited to 'grpc/src/cpp/client/secure_credentials.cc')
-rw-r--r--grpc/src/cpp/client/secure_credentials.cc12
1 files changed, 4 insertions, 8 deletions
diff --git a/grpc/src/cpp/client/secure_credentials.cc b/grpc/src/cpp/client/secure_credentials.cc
index 4facd2b8..be99d542 100644
--- a/grpc/src/cpp/client/secure_credentials.cc
+++ b/grpc/src/cpp/client/secure_credentials.cc
@@ -109,8 +109,6 @@ std::shared_ptr<ChannelCredentials> GoogleDefaultCredentials() {
grpc_google_default_credentials_create(nullptr));
}
-namespace experimental {
-
std::shared_ptr<CallCredentials> ExternalAccountCredentials(
const grpc::string& json_string, const std::vector<grpc::string>& scopes) {
grpc::GrpcLibraryCodegen init; // To call grpc_init().
@@ -118,8 +116,6 @@ std::shared_ptr<CallCredentials> ExternalAccountCredentials(
json_string.c_str(), absl::StrJoin(scopes, ",").c_str()));
}
-} // namespace experimental
-
// Builds SSL Credentials given SSL specific options
std::shared_ptr<ChannelCredentials> SslCredentials(
const SslCredentialsOptions& options) {
@@ -161,7 +157,7 @@ grpc::Status StsCredentialsOptionsFromJson(const std::string& json_string,
"options cannot be nullptr.");
}
ClearStsCredentialsOptions(options);
- grpc_error* error = GRPC_ERROR_NONE;
+ grpc_error_handle error = GRPC_ERROR_NONE;
grpc_core::Json json = grpc_core::Json::Parse(json_string.c_str(), &error);
if (error != GRPC_ERROR_NONE ||
json.type() != grpc_core::Json::Type::OBJECT) {
@@ -219,7 +215,7 @@ grpc::Status StsCredentialsOptionsFromEnv(StsCredentialsOptions* options) {
ClearStsCredentialsOptions(options);
grpc_slice json_string = grpc_empty_slice();
char* sts_creds_path = gpr_getenv("STS_CREDENTIALS");
- grpc_error* error = GRPC_ERROR_NONE;
+ grpc_error_handle error = GRPC_ERROR_NONE;
grpc::Status status;
auto cleanup = [&json_string, &sts_creds_path, &error, &status]() {
grpc_slice_unref_internal(json_string);
@@ -236,7 +232,7 @@ grpc::Status StsCredentialsOptionsFromEnv(StsCredentialsOptions* options) {
error = grpc_load_file(sts_creds_path, 1, &json_string);
if (error != GRPC_ERROR_NONE) {
status =
- grpc::Status(grpc::StatusCode::NOT_FOUND, grpc_error_string(error));
+ grpc::Status(grpc::StatusCode::NOT_FOUND, grpc_error_std_string(error));
return cleanup();
}
status = StsCredentialsOptionsFromJson(
@@ -410,7 +406,7 @@ std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
}
namespace {
-void DeleteWrapper(void* wrapper, grpc_error* /*ignored*/) {
+void DeleteWrapper(void* wrapper, grpc_error_handle /*ignored*/) {
MetadataCredentialsPluginWrapper* w =
static_cast<MetadataCredentialsPluginWrapper*>(wrapper);
delete w;