diff options
author | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-15 21:33:41 +0300 |
---|---|---|
committer | arcadia-devtools <arcadia-devtools@yandex-team.ru> | 2022-03-15 21:33:41 +0300 |
commit | 3dd665b514943f69657b593eb51af90b99b1206b (patch) | |
tree | 0eb633e628bb1fe6c639574b1184d43def7c0a73 /contrib/libs/grpc/src/cpp/client/secure_credentials.h | |
parent | a68afc731202027f105bc5723ee11788017c29e2 (diff) | |
download | ydb-3dd665b514943f69657b593eb51af90b99b1206b.tar.gz |
intermediate changes
ref:953ca886ec160075b38c0f3614de029b423f0a9e
Diffstat (limited to 'contrib/libs/grpc/src/cpp/client/secure_credentials.h')
-rw-r--r-- | contrib/libs/grpc/src/cpp/client/secure_credentials.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/contrib/libs/grpc/src/cpp/client/secure_credentials.h b/contrib/libs/grpc/src/cpp/client/secure_credentials.h index 4fc79346bf..9325f365b1 100644 --- a/contrib/libs/grpc/src/cpp/client/secure_credentials.h +++ b/contrib/libs/grpc/src/cpp/client/secure_credentials.h @@ -26,6 +26,7 @@ #include <grpcpp/support/config.h> #include "y_absl/strings/str_cat.h" +// TODO(yashykt): We shouldn't be including "src/core" headers. #include "src/core/lib/security/credentials/credentials.h" #include "src/cpp/server/thread_pool_interface.h" @@ -36,7 +37,7 @@ class Channel; class SecureChannelCredentials final : public ChannelCredentials { public: explicit SecureChannelCredentials(grpc_channel_credentials* c_creds); - ~SecureChannelCredentials() { + ~SecureChannelCredentials() override { if (c_creds_ != nullptr) c_creds_->Unref(); } grpc_channel_credentials* GetRawCreds() { return c_creds_; } @@ -58,7 +59,7 @@ class SecureChannelCredentials final : public ChannelCredentials { class SecureCallCredentials final : public CallCredentials { public: explicit SecureCallCredentials(grpc_call_credentials* c_creds); - ~SecureCallCredentials() { + ~SecureCallCredentials() override { if (c_creds_ != nullptr) c_creds_->Unref(); } grpc_call_credentials* GetRawCreds() { return c_creds_; } @@ -74,6 +75,13 @@ class SecureCallCredentials final : public CallCredentials { grpc_call_credentials* const c_creds_; }; +namespace internal { + +std::shared_ptr<ChannelCredentials> WrapChannelCredentials( + grpc_channel_credentials* creds); + +} // namespace internal + namespace experimental { // Transforms C++ STS Credentials options to core options. The pointers of the |