aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/grpc++/security
diff options
context:
space:
mode:
Diffstat (limited to 'include/grpc++/security')
-rw-r--r--include/grpc++/security/auth_context.h8
-rw-r--r--include/grpc++/security/auth_metadata_processor.h6
-rw-r--r--include/grpc++/security/credentials.h8
-rw-r--r--include/grpc++/security/server_credentials.h21
4 files changed, 28 insertions, 15 deletions
diff --git a/include/grpc++/security/auth_context.h b/include/grpc++/security/auth_context.h
index bca8fa7c0c..424418386a 100644
--- a/include/grpc++/security/auth_context.h
+++ b/include/grpc++/security/auth_context.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015-2016, Google Inc.
+ * Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,9 +31,9 @@
*
*/
-#ifndef GRPCXX_SUPPORT_AUTH_CONTEXT_H
-#define GRPCXX_SUPPORT_AUTH_CONTEXT_H
+#ifndef GRPCXX_SECURITY_AUTH_CONTEXT_H
+#define GRPCXX_SECURITY_AUTH_CONTEXT_H
#include <grpc++/impl/codegen/security/auth_context.h>
-#endif // GRPCXX_SUPPORT_AUTH_CONTEXT_H
+#endif // GRPCXX_SECURITY_AUTH_CONTEXT_H
diff --git a/include/grpc++/security/auth_metadata_processor.h b/include/grpc++/security/auth_metadata_processor.h
index 25011f33ba..1ae32d0f6c 100644
--- a/include/grpc++/security/auth_metadata_processor.h
+++ b/include/grpc++/security/auth_metadata_processor.h
@@ -31,8 +31,8 @@
*
*/
-#ifndef GRPCXX_AUTH_METADATA_PROCESSOR_H_
-#define GRPCXX_AUTH_METADATA_PROCESSOR_H_
+#ifndef GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H
+#define GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H
#include <map>
@@ -70,4 +70,4 @@ class AuthMetadataProcessor {
} // namespace grpc
-#endif // GRPCXX_AUTH_METADATA_PROCESSOR_H_
+#endif // GRPCXX_SECURITY_AUTH_METADATA_PROCESSOR_H
diff --git a/include/grpc++/security/credentials.h b/include/grpc++/security/credentials.h
index f2e2efd7a6..5439244b02 100644
--- a/include/grpc++/security/credentials.h
+++ b/include/grpc++/security/credentials.h
@@ -1,6 +1,6 @@
/*
*
- * Copyright 2015-2016, Google Inc.
+ * Copyright 2015, Google Inc.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -31,8 +31,8 @@
*
*/
-#ifndef GRPCXX_CREDENTIALS_H
-#define GRPCXX_CREDENTIALS_H
+#ifndef GRPCXX_SECURITY_CREDENTIALS_H
+#define GRPCXX_SECURITY_CREDENTIALS_H
#include <map>
#include <memory>
@@ -229,4 +229,4 @@ std::shared_ptr<CallCredentials> MetadataCredentialsFromPlugin(
} // namespace grpc
-#endif // GRPCXX_CREDENTIALS_H
+#endif // GRPCXX_SECURITY_CREDENTIALS_H
diff --git a/include/grpc++/security/server_credentials.h b/include/grpc++/security/server_credentials.h
index e933825ec3..229bab8d84 100644
--- a/include/grpc++/security/server_credentials.h
+++ b/include/grpc++/security/server_credentials.h
@@ -31,14 +31,15 @@
*
*/
-#ifndef GRPCXX_SERVER_CREDENTIALS_H
-#define GRPCXX_SERVER_CREDENTIALS_H
+#ifndef GRPCXX_SECURITY_SERVER_CREDENTIALS_H
+#define GRPCXX_SECURITY_SERVER_CREDENTIALS_H
#include <memory>
#include <vector>
#include <grpc++/security/auth_metadata_processor.h>
#include <grpc++/support/config.h>
+#include <grpc/grpc_security_constants.h>
struct grpc_server;
@@ -69,7 +70,13 @@ class ServerCredentials {
/// Options to create ServerCredentials with SSL
struct SslServerCredentialsOptions {
- SslServerCredentialsOptions() : force_client_auth(false) {}
+ // Deprecated
+ SslServerCredentialsOptions()
+ : force_client_auth(false),
+ client_certificate_request(GRPC_SSL_DONT_REQUEST_CLIENT_CERTIFICATE) {}
+ SslServerCredentialsOptions(
+ grpc_ssl_client_certificate_request_type request_type)
+ : force_client_auth(false), client_certificate_request(request_type) {}
struct PemKeyCertPair {
grpc::string private_key;
@@ -77,7 +84,13 @@ struct SslServerCredentialsOptions {
};
grpc::string pem_root_certs;
std::vector<PemKeyCertPair> pem_key_cert_pairs;
+ // Deprecated
bool force_client_auth;
+
+ // If both force_client_auth and client_certificate_request fields are set,
+ // force_client_auth takes effect i.e
+ // REQUEST_AND_REQUIRE_CLIENT_CERTIFICATE_AND_VERIFY will be enforced.
+ grpc_ssl_client_certificate_request_type client_certificate_request;
};
/// Builds SSL ServerCredentials given SSL specific options
@@ -89,4 +102,4 @@ std::shared_ptr<ServerCredentials> InsecureServerCredentials();
} // namespace grpc
-#endif // GRPCXX_SERVER_CREDENTIALS_H
+#endif // GRPCXX_SECURITY_SERVER_CREDENTIALS_H