aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/core/lib/security
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/lib/security')
-rw-r--r--src/core/lib/security/credentials/composite/composite_credentials.h8
-rw-r--r--src/core/lib/security/credentials/credentials.h8
-rw-r--r--src/core/lib/security/credentials/fake/fake_credentials.h10
-rw-r--r--src/core/lib/security/credentials/jwt/json_token.h10
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_credentials.h10
-rw-r--r--src/core/lib/security/credentials/jwt/jwt_verifier.h8
-rw-r--r--src/core/lib/security/credentials/oauth2/oauth2_credentials.h10
-rw-r--r--src/core/lib/security/transport/lb_targets_info.h10
-rw-r--r--src/core/lib/security/transport/secure_endpoint.h10
-rw-r--r--src/core/lib/security/transport/security_connector.h8
-rw-r--r--src/core/lib/security/transport/security_handshaker.h10
-rw-r--r--src/core/lib/security/transport/tsi_error.h10
-rw-r--r--src/core/lib/security/util/json_util.h10
13 files changed, 113 insertions, 9 deletions
diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h
index 3076afcb7e..6e9f9a8f6f 100644
--- a/src/core/lib/security/credentials/composite/composite_credentials.h
+++ b/src/core/lib/security/credentials/composite/composite_credentials.h
@@ -21,6 +21,10 @@
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_call_credentials **creds_array;
size_t num_creds;
@@ -53,5 +57,9 @@ typedef struct {
grpc_call_credentials_array inner;
} grpc_composite_call_credentials;
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_COMPOSITE_COMPOSITE_CREDENTIALS_H \
*/
diff --git a/src/core/lib/security/credentials/credentials.h b/src/core/lib/security/credentials/credentials.h
index 04a54b0ca8..73e39ae039 100644
--- a/src/core/lib/security/credentials/credentials.h
+++ b/src/core/lib/security/credentials/credentials.h
@@ -29,6 +29,10 @@
#include "src/core/lib/iomgr/polling_entity.h"
#include "src/core/lib/security/transport/security_connector.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct grpc_http_response;
/* --- Constants. --- */
@@ -252,4 +256,8 @@ grpc_credentials_metadata_request *grpc_credentials_metadata_request_create(
void grpc_credentials_metadata_request_destroy(
grpc_exec_ctx *exec_ctx, grpc_credentials_metadata_request *r);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_CREDENTIALS_H */
diff --git a/src/core/lib/security/credentials/fake/fake_credentials.h b/src/core/lib/security/credentials/fake/fake_credentials.h
index aa0f3b6e20..64f6f439f0 100644
--- a/src/core/lib/security/credentials/fake/fake_credentials.h
+++ b/src/core/lib/security/credentials/fake/fake_credentials.h
@@ -21,6 +21,10 @@
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* -- Fake transport security credentials. -- */
/* Creates a fake transport security credentials object for testing. */
@@ -56,4 +60,8 @@ typedef struct {
bool is_async;
} grpc_md_only_test_credentials;
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h
index e50790ef2e..486fd981af 100644
--- a/src/core/lib/security/credentials/jwt/json_token.h
+++ b/src/core/lib/security/credentials/jwt/json_token.h
@@ -28,6 +28,10 @@
#define GRPC_JWT_OAUTH2_AUDIENCE "https://www.googleapis.com/oauth2/v3/token"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* --- auth_json_key parsing. --- */
typedef struct {
@@ -70,4 +74,8 @@ typedef char *(*grpc_jwt_encode_and_sign_override)(
void grpc_jwt_encode_and_sign_set_override(
grpc_jwt_encode_and_sign_override func);
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h
index 07f4022669..c09485fd55 100644
--- a/src/core/lib/security/credentials/jwt/jwt_credentials.h
+++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h
@@ -22,6 +22,10 @@
#include "src/core/lib/security/credentials/credentials.h"
#include "src/core/lib/security/credentials/jwt/json_token.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct {
grpc_call_credentials base;
@@ -45,4 +49,8 @@ grpc_service_account_jwt_access_credentials_create_from_auth_json_key(
grpc_exec_ctx *exec_ctx, grpc_auth_json_key key,
gpr_timespec token_lifetime);
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h
index 8fac452d4e..0603811627 100644
--- a/src/core/lib/security/credentials/jwt/jwt_verifier.h
+++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h
@@ -32,6 +32,10 @@
#define GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX \
"www.googleapis.com/robot/v1/metadata/x509"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* --- grpc_jwt_verifier_status. --- */
typedef enum {
@@ -122,4 +126,8 @@ grpc_jwt_verifier_status grpc_jwt_claims_check(const grpc_jwt_claims *claims,
const char *audience);
const char *grpc_jwt_issuer_email_domain(const char *issuer);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_VERIFIER_H */
diff --git a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
index d9ad6691b8..c8a9333417 100644
--- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
+++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h
@@ -22,6 +22,10 @@
#include "src/core/lib/json/json.h"
#include "src/core/lib/security/credentials/credentials.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// auth_refresh_token parsing.
typedef struct {
const char *type;
@@ -102,4 +106,8 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response(
grpc_exec_ctx *exec_ctx, const struct grpc_http_response *response,
grpc_mdelem *token_md, gpr_timespec *token_lifetime);
-#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h
index c3d685df5f..705d33b0ab 100644
--- a/src/core/lib/security/transport/lb_targets_info.h
+++ b/src/core/lib/security/transport/lb_targets_info.h
@@ -21,6 +21,10 @@
#include "src/core/lib/slice/slice_hash_table.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/** Return a channel argument containing \a targets_info. */
grpc_arg grpc_lb_targets_info_create_channel_arg(
grpc_slice_hash_table *targets_info);
@@ -29,4 +33,8 @@ grpc_arg grpc_lb_targets_info_create_channel_arg(
grpc_slice_hash_table *grpc_lb_targets_info_find_in_args(
const grpc_channel_args *args);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h
index 3323a6ff42..832cc1c0ce 100644
--- a/src/core/lib/security/transport/secure_endpoint.h
+++ b/src/core/lib/security/transport/secure_endpoint.h
@@ -22,6 +22,10 @@
#include <grpc/slice.h>
#include "src/core/lib/iomgr/endpoint.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
struct tsi_frame_protector;
struct tsi_zero_copy_grpc_protector;
@@ -36,4 +40,8 @@ grpc_endpoint *grpc_secure_endpoint_create(
grpc_endpoint *to_wrap, grpc_slice *leftover_slices,
size_t leftover_nslices);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h
index 4f9b63ad20..4d87cd0c80 100644
--- a/src/core/lib/security/transport/security_connector.h
+++ b/src/core/lib/security/transport/security_connector.h
@@ -29,6 +29,10 @@
#include "src/core/tsi/ssl_transport_security.h"
#include "src/core/tsi/transport_security_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef NDEBUG
extern grpc_tracer_flag grpc_trace_security_connector_refcount;
#endif
@@ -245,4 +249,8 @@ tsi_peer tsi_shallow_peer_from_ssl_auth_context(
const grpc_auth_context *auth_context);
void tsi_shallow_peer_destruct(tsi_peer *peer);
+#ifdef __cplusplus
+}
+#endif
+
#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_CONNECTOR_H */
diff --git a/src/core/lib/security/transport/security_handshaker.h b/src/core/lib/security/transport/security_handshaker.h
index 95bf127fc6..345065f26c 100644
--- a/src/core/lib/security/transport/security_handshaker.h
+++ b/src/core/lib/security/transport/security_handshaker.h
@@ -23,6 +23,10 @@
#include "src/core/lib/iomgr/exec_ctx.h"
#include "src/core/lib/security/transport/security_connector.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/// Creates a security handshaker using \a handshaker.
grpc_handshaker *grpc_security_handshaker_create(
grpc_exec_ctx *exec_ctx, tsi_handshaker *handshaker,
@@ -31,4 +35,8 @@ grpc_handshaker *grpc_security_handshaker_create(
/// Registers security handshaker factories.
void grpc_security_register_handshaker_factories();
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ \ No newline at end of file
diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h
index 87a63a8a7c..4c78b06603 100644
--- a/src/core/lib/security/transport/tsi_error.h
+++ b/src/core/lib/security/transport/tsi_error.h
@@ -22,6 +22,14 @@
#include "src/core/lib/iomgr/error.h"
#include "src/core/tsi/transport_security_interface.h"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
grpc_error *grpc_set_tsi_error_result(grpc_error *error, tsi_result result);
-#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */ \ No newline at end of file
diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h
index 5ea831e27e..43a2f6b9d1 100644
--- a/src/core/lib/security/util/json_util.h
+++ b/src/core/lib/security/util/json_util.h
@@ -28,6 +28,10 @@
#define GRPC_AUTH_JSON_TYPE_SERVICE_ACCOUNT "service_account"
#define GRPC_AUTH_JSON_TYPE_AUTHORIZED_USER "authorized_user"
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// Gets a child property from a json node.
const char *grpc_json_get_string_property(const grpc_json *json,
const char *prop_name);
@@ -37,4 +41,8 @@ const char *grpc_json_get_string_property(const grpc_json *json,
bool grpc_copy_json_string_property(const grpc_json *json,
const char *prop_name, char **copied_value);
-#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */ \ No newline at end of file