aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-28 07:36:45 -0700
committerGravatar Craig Tiller <craig.tiller@gmail.com>2015-07-28 07:36:45 -0700
commit753b3cbb5bd6302d2f8569cb89bfc99a965985cb (patch)
tree64b045042c35db98dde57b5ff4b587516ab585d8 /include
parentdfc42da76011eec3270b3dbcc94748916e0aa5b2 (diff)
parent26d533ebb8579b1e1da3710631a890ebe38ab58c (diff)
Merge github.com:grpc/grpc into sometimes-its-good-just-to-check-in-with-each-other
Diffstat (limited to 'include')
-rw-r--r--include/grpc++/server_credentials.h3
-rw-r--r--include/grpc/grpc.h4
-rw-r--r--include/grpc/grpc_security.h9
3 files changed, 11 insertions, 5 deletions
diff --git a/include/grpc++/server_credentials.h b/include/grpc++/server_credentials.h
index 83ae9fd1eb..11acd67e8a 100644
--- a/include/grpc++/server_credentials.h
+++ b/include/grpc++/server_credentials.h
@@ -58,12 +58,15 @@ class ServerCredentials {
// Options to create ServerCredentials with SSL
struct SslServerCredentialsOptions {
+ SslServerCredentialsOptions() : force_client_auth(false) {}
+
struct PemKeyCertPair {
grpc::string private_key;
grpc::string cert_chain;
};
grpc::string pem_root_certs;
std::vector<PemKeyCertPair> pem_key_cert_pairs;
+ bool force_client_auth;
};
// Builds SSL ServerCredentials given SSL specific options
diff --git a/include/grpc/grpc.h b/include/grpc/grpc.h
index 4080debb68..cf59b943e9 100644
--- a/include/grpc/grpc.h
+++ b/include/grpc/grpc.h
@@ -469,8 +469,8 @@ char *grpc_channel_get_target(grpc_channel *channel);
clients will want to simply pass NULL. See grpc_channel_args definition for
more on this. The data in 'args' need only live through the invocation of
this function. */
-grpc_channel *grpc_channel_create(const char *target,
- const grpc_channel_args *args);
+grpc_channel *grpc_insecure_channel_create(const char *target,
+ const grpc_channel_args *args);
/** Create a lame client: this client fails every operation attempted on it. */
grpc_channel *grpc_lame_client_channel_create(const char *target);
diff --git a/include/grpc/grpc_security.h b/include/grpc/grpc_security.h
index 29eddc57a8..ff84050c6d 100644
--- a/include/grpc/grpc_security.h
+++ b/include/grpc/grpc_security.h
@@ -87,7 +87,7 @@ typedef struct {
directory).
- pem_key_cert_pair is a pointer on the object containing client's private
key and certificate chain. This parameter can be NULL if the client does
- not have such a key/cert pair. */
+ not have such a key/cert pair. */
grpc_credentials *grpc_ssl_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pair);
@@ -174,10 +174,13 @@ void grpc_server_credentials_release(grpc_server_credentials *creds);
- pem_key_cert_pairs is an array private key / certificate chains of the
server. This parameter cannot be NULL.
- num_key_cert_pairs indicates the number of items in the private_key_files
- and cert_chain_files parameters. It should be at least 1. */
+ and cert_chain_files parameters. It should be at least 1.
+ - force_client_auth, if set to non-zero will force the client to authenticate
+ with an SSL cert. Note that this option is ignored if pem_root_certs is
+ NULL. */
grpc_server_credentials *grpc_ssl_server_credentials_create(
const char *pem_root_certs, grpc_ssl_pem_key_cert_pair *pem_key_cert_pairs,
- size_t num_key_cert_pairs);
+ size_t num_key_cert_pairs, int force_client_auth);
/* --- Server-side secure ports. --- */