GRPC C++  1.30.0
server_credentials.h
Go to the documentation of this file.
1 /*
2  *
3  * Copyright 2019 gRPC authors.
4  *
5  * Licensed under the Apache License, Version 2.0 (the "License");
6  * you may not use this file except in compliance with the License.
7  * You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  *
17  */
18 
19 #ifndef GRPCPP_SECURITY_SERVER_CREDENTIALS_H
20 #define GRPCPP_SECURITY_SERVER_CREDENTIALS_H
21 
23 
24 namespace grpc_impl {
25 
26 class Server;
27 } // namespace grpc_impl
28 namespace grpc {
29 
31 
36  : force_client_auth(false),
40  : force_client_auth(false), client_certificate_request(request_type) {}
41 
42  struct PemKeyCertPair {
45  };
47  std::vector<PemKeyCertPair> pem_key_cert_pairs;
50 
56 };
57 
58 static inline std::shared_ptr<ServerCredentials> SslServerCredentials(
59  const SslServerCredentialsOptions& options) {
60  return ::grpc_impl::SslServerCredentials(options);
61 }
62 
63 static inline std::shared_ptr<ServerCredentials> InsecureServerCredentials() {
64  return ::grpc_impl::InsecureServerCredentials();
65 }
66 
67 namespace experimental {
68 
71 
72 static inline std::shared_ptr<ServerCredentials> AltsServerCredentials(
73  const AltsServerCredentialsOptions& options) {
74  return ::grpc_impl::experimental::AltsServerCredentials(options);
75 }
76 
77 static inline std::shared_ptr<ServerCredentials> LocalServerCredentials(
79  return ::grpc_impl::experimental::LocalServerCredentials(type);
80 }
81 
83 static inline std::shared_ptr<ServerCredentials> TlsServerCredentials(
84  const ::grpc_impl::experimental::TlsCredentialsOptions& options) {
85  return ::grpc_impl::experimental::TlsServerCredentials(options);
86 }
87 
88 } // namespace experimental
89 } // namespace grpc
90 
91 #endif // GRPCPP_SECURITY_SERVER_CREDENTIALS_H
grpc::SslServerCredentialsOptions::PemKeyCertPair
Definition: server_credentials.h:42
grpc
This header provides an object that reads bytes directly from a grpc::ByteBuffer, via the ZeroCopyInp...
Definition: alarm.h:24
grpc::SslServerCredentialsOptions::force_client_auth
bool force_client_auth
Definition: server_credentials.h:49
grpc::ServerCredentials
::grpc_impl::ServerCredentials ServerCredentials
Definition: server_credentials.h:30
grpc::Server
::grpc_impl::Server Server
Definition: server.h:26
grpc_impl::experimental::AltsServerCredentialsOptions
Options to create ServerCredentials with ALTS.
Definition: server_credentials_impl.h:71
grpc::experimental::AltsServerCredentialsOptions
::grpc_impl::experimental::AltsServerCredentialsOptions AltsServerCredentialsOptions
Definition: server_credentials.h:70
grpc::SslServerCredentialsOptions::PemKeyCertPair::cert_chain
grpc::string cert_chain
Definition: server_credentials.h:44
grpc::SslServerCredentialsOptions::pem_root_certs
grpc::string pem_root_certs
Definition: server_credentials.h:46
grpc_ssl_client_certificate_request_type
grpc_ssl_client_certificate_request_type
Definition: grpc_security_constants.h:62
grpc::SslServerCredentialsOptions::SslServerCredentialsOptions
SslServerCredentialsOptions()
Definition: server_credentials.h:35
grpc::SslServerCredentialsOptions
Options to create ServerCredentials with SSL.
Definition: server_credentials.h:33
grpc::SslServerCredentialsOptions::SslServerCredentialsOptions
SslServerCredentialsOptions(grpc_ssl_client_certificate_request_type request_type)
Definition: server_credentials.h:38
GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE
Server does not request client certificate.
Definition: grpc_security_constants.h:67
grpc::SslServerCredentialsOptions::pem_key_cert_pairs
std::vector< PemKeyCertPair > pem_key_cert_pairs
Definition: server_credentials.h:47
grpc::string
std::string string
Definition: config.h:35
grpc::SslServerCredentialsOptions::client_certificate_request
grpc_ssl_client_certificate_request_type client_certificate_request
If both force_client_auth and client_certificate_request fields are set, force_client_auth takes effe...
Definition: server_credentials.h:55
grpc_impl
An Alarm posts the user-provided tag to its associated completion queue or invokes the user-provided ...
Definition: alarm_impl.h:33
grpc::SslServerCredentialsOptions::PemKeyCertPair::private_key
grpc::string private_key
Definition: server_credentials.h:43
server_credentials_impl.h
grpc_local_connect_type
grpc_local_connect_type
Type of local connections for which local channel/server credentials will be applied.
Definition: grpc_security_constants.h:140