summaryrefslogtreecommitdiffstats
path: root/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
diff options
context:
space:
mode:
authorheretic <[email protected]>2022-02-10 16:45:43 +0300
committerDaniil Cherednik <[email protected]>2022-02-10 16:45:43 +0300
commit397cbe258b9e064f49c4ca575279f02f39fef76e (patch)
treea0b0eb3cca6a14e4e8ea715393637672fa651284 /contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
parent43f5a35593ebc9f6bcea619bb170394ea7ae468e (diff)
Restoring authorship annotation for <[email protected]>. Commit 1 of 2.
Diffstat (limited to 'contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h')
-rw-r--r--contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h128
1 files changed, 64 insertions, 64 deletions
diff --git a/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h b/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
index f704cf61295..4ee7b3f4edc 100644
--- a/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
+++ b/contrib/libs/grpc/include/grpcpp/security/tls_credentials_options.h
@@ -24,9 +24,9 @@
#include <grpc/support/log.h>
#include <grpcpp/support/config.h>
-#include <memory>
-#include <vector>
-
+#include <memory>
+#include <vector>
+
typedef struct grpc_tls_credential_reload_arg grpc_tls_credential_reload_arg;
typedef struct grpc_tls_credential_reload_config
grpc_tls_credential_reload_config;
@@ -36,7 +36,7 @@ typedef struct grpc_tls_server_authorization_check_config
grpc_tls_server_authorization_check_config;
typedef struct grpc_tls_credentials_options grpc_tls_credentials_options;
-namespace grpc {
+namespace grpc {
namespace experimental {
/** TLS key materials config, wrapper for grpc_tls_key_materials_config. It is
@@ -44,67 +44,67 @@ namespace experimental {
class TlsKeyMaterialsConfig {
public:
struct PemKeyCertPair {
- TString private_key;
- TString cert_chain;
+ TString private_key;
+ TString cert_chain;
};
/** Getters for member fields. **/
- const TString pem_root_certs() const { return pem_root_certs_; }
+ const TString pem_root_certs() const { return pem_root_certs_; }
const std::vector<PemKeyCertPair>& pem_key_cert_pair_list() const {
return pem_key_cert_pair_list_;
}
int version() const { return version_; }
- /** Setter for key materials that will be called by the user. Ownership of the
- * arguments will not be transferred. **/
- void set_pem_root_certs(const TString& pem_root_certs);
+ /** Setter for key materials that will be called by the user. Ownership of the
+ * arguments will not be transferred. **/
+ void set_pem_root_certs(const TString& pem_root_certs);
void add_pem_key_cert_pair(const PemKeyCertPair& pem_key_cert_pair);
- void set_key_materials(
- const TString& pem_root_certs,
- const std::vector<PemKeyCertPair>& pem_key_cert_pair_list);
+ void set_key_materials(
+ const TString& pem_root_certs,
+ const std::vector<PemKeyCertPair>& pem_key_cert_pair_list);
void set_version(int version) { version_ = version; };
private:
int version_ = 0;
std::vector<PemKeyCertPair> pem_key_cert_pair_list_;
- TString pem_root_certs_;
+ TString pem_root_certs_;
};
/** TLS credential reload arguments, wraps grpc_tls_credential_reload_arg. It is
- * used for experimental purposes for now and it is subject to change.
+ * used for experimental purposes for now and it is subject to change.
*
- * The credential reload arg contains all the info necessary to schedule/cancel
- * a credential reload request. The callback function must be called after
- * finishing the schedule operation. See the description of the
- * grpc_tls_credential_reload_arg struct in grpc_security.h for more details.
+ * The credential reload arg contains all the info necessary to schedule/cancel
+ * a credential reload request. The callback function must be called after
+ * finishing the schedule operation. See the description of the
+ * grpc_tls_credential_reload_arg struct in grpc_security.h for more details.
* **/
class TlsCredentialReloadArg {
public:
/** TlsCredentialReloadArg does not take ownership of the C arg that is passed
- * to the constructor. One must remember to free any memory allocated to the
- * C arg after using the setter functions below. **/
+ * to the constructor. One must remember to free any memory allocated to the
+ * C arg after using the setter functions below. **/
TlsCredentialReloadArg(grpc_tls_credential_reload_arg* arg);
~TlsCredentialReloadArg();
- /** Getters for member fields. **/
+ /** Getters for member fields. **/
void* cb_user_data() const;
bool is_pem_key_cert_pair_list_empty() const;
grpc_ssl_certificate_config_reload_status status() const;
- TString error_details() const;
+ TString error_details() const;
- /** Setters for member fields. Ownership of the arguments will not be
- * transferred. **/
+ /** Setters for member fields. Ownership of the arguments will not be
+ * transferred. **/
void set_cb_user_data(void* cb_user_data);
- void set_pem_root_certs(const TString& pem_root_certs);
+ void set_pem_root_certs(const TString& pem_root_certs);
void add_pem_key_cert_pair(
- const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair);
- void set_key_materials(const TString& pem_root_certs,
- std::vector<TlsKeyMaterialsConfig::PemKeyCertPair>
- pem_key_cert_pair_list);
+ const TlsKeyMaterialsConfig::PemKeyCertPair& pem_key_cert_pair);
+ void set_key_materials(const TString& pem_root_certs,
+ std::vector<TlsKeyMaterialsConfig::PemKeyCertPair>
+ pem_key_cert_pair_list);
void set_key_materials_config(
const std::shared_ptr<TlsKeyMaterialsConfig>& key_materials_config);
void set_status(grpc_ssl_certificate_config_reload_status status);
- void set_error_details(const TString& error_details);
+ void set_error_details(const TString& error_details);
/** Calls the C arg's callback function. **/
void OnCredentialReloadDoneCallback();
@@ -184,23 +184,23 @@ class TlsServerAuthorizationCheckArg {
TlsServerAuthorizationCheckArg(grpc_tls_server_authorization_check_arg* arg);
~TlsServerAuthorizationCheckArg();
- /** Getters for member fields. **/
+ /** Getters for member fields. **/
void* cb_user_data() const;
int success() const;
- TString target_name() const;
- TString peer_cert() const;
- TString peer_cert_full_chain() const;
+ TString target_name() const;
+ TString peer_cert() const;
+ TString peer_cert_full_chain() const;
grpc_status_code status() const;
- TString error_details() const;
+ TString error_details() const;
- /** Setters for member fields. **/
+ /** Setters for member fields. **/
void set_cb_user_data(void* cb_user_data);
void set_success(int success);
- void set_target_name(const TString& target_name);
- void set_peer_cert(const TString& peer_cert);
- void set_peer_cert_full_chain(const TString& peer_cert_full_chain);
+ void set_target_name(const TString& target_name);
+ void set_peer_cert(const TString& peer_cert);
+ void set_peer_cert_full_chain(const TString& peer_cert_full_chain);
void set_status(grpc_status_code status);
- void set_error_details(const TString& error_details);
+ void set_error_details(const TString& error_details);
/** Calls the C arg's callback function. **/
void OnServerAuthorizationCheckDoneCallback();
@@ -278,24 +278,24 @@ class TlsServerAuthorizationCheckConfig {
* more details. **/
class TlsCredentialsOptions {
public:
- // Constructor for client.
- explicit TlsCredentialsOptions(
- grpc_tls_server_verification_option server_verification_option,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
- std::shared_ptr<TlsServerAuthorizationCheckConfig>
- server_authorization_check_config);
-
- // Constructor for server.
- explicit TlsCredentialsOptions(
- grpc_ssl_client_certificate_request_type cert_request_type,
- std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
- std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config);
-
- // This constructor will be deprecated.
+ // Constructor for client.
+ explicit TlsCredentialsOptions(
+ grpc_tls_server_verification_option server_verification_option,
+ std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
+ std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
+ std::shared_ptr<TlsServerAuthorizationCheckConfig>
+ server_authorization_check_config);
+
+ // Constructor for server.
+ explicit TlsCredentialsOptions(
+ grpc_ssl_client_certificate_request_type cert_request_type,
+ std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
+ std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config);
+
+ // This constructor will be deprecated.
TlsCredentialsOptions(
grpc_ssl_client_certificate_request_type cert_request_type,
- grpc_tls_server_verification_option server_verification_option,
+ grpc_tls_server_verification_option server_verification_option,
std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config,
std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config,
std::shared_ptr<TlsServerAuthorizationCheckConfig>
@@ -306,9 +306,9 @@ class TlsCredentialsOptions {
grpc_ssl_client_certificate_request_type cert_request_type() const {
return cert_request_type_;
}
- grpc_tls_server_verification_option server_verification_option() const {
- return server_verification_option_;
- }
+ grpc_tls_server_verification_option server_verification_option() const {
+ return server_verification_option_;
+ }
std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config() const {
return key_materials_config_;
}
@@ -329,9 +329,9 @@ class TlsCredentialsOptions {
* goes unused when creating channel credentials, and the user can set it to
* GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE. **/
grpc_ssl_client_certificate_request_type cert_request_type_;
- /** The server_verification_option_ flag is only relevant when the
- * TlsCredentialsOptions are used to instantiate client credentials; **/
- grpc_tls_server_verification_option server_verification_option_;
+ /** The server_verification_option_ flag is only relevant when the
+ * TlsCredentialsOptions are used to instantiate client credentials; **/
+ grpc_tls_server_verification_option server_verification_option_;
std::shared_ptr<TlsKeyMaterialsConfig> key_materials_config_;
std::shared_ptr<TlsCredentialReloadConfig> credential_reload_config_;
std::shared_ptr<TlsServerAuthorizationCheckConfig>
@@ -340,6 +340,6 @@ class TlsCredentialsOptions {
};
} // namespace experimental
-} // namespace grpc
+} // namespace grpc
#endif // GRPCPP_SECURITY_TLS_CREDENTIALS_OPTIONS_H