diff options
Diffstat (limited to 'src/core/lib/security')
17 files changed, 34 insertions, 102 deletions
diff --git a/src/core/lib/security/context/security_context.h b/src/core/lib/security/context/security_context.h index 4f049c4a3b..261bc167f5 100644 --- a/src/core/lib/security/context/security_context.h +++ b/src/core/lib/security/context/security_context.h @@ -26,9 +26,7 @@ extern grpc_tracer_flag grpc_trace_auth_context_refcount; #endif -#ifdef __cplusplus -extern "C" { -#endif + /* --- grpc_auth_context --- @@ -116,8 +114,6 @@ grpc_auth_context* grpc_auth_context_from_arg(const grpc_arg* arg); grpc_auth_context* grpc_find_auth_context_in_args( const grpc_channel_args* args); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CONTEXT_SECURITY_CONTEXT_H */ diff --git a/src/core/lib/security/credentials/composite/composite_credentials.h b/src/core/lib/security/credentials/composite/composite_credentials.h index efb5f4f0c4..e3438dd3d1 100644 --- a/src/core/lib/security/credentials/composite/composite_credentials.h +++ b/src/core/lib/security/credentials/composite/composite_credentials.h @@ -21,9 +21,7 @@ #include "src/core/lib/security/credentials/credentials.h" -#ifdef __cplusplus -extern "C" { -#endif + typedef struct { grpc_call_credentials** creds_array; @@ -57,9 +55,7 @@ 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 c65b9660ea..f74b047edc 100644 --- a/src/core/lib/security/credentials/credentials.h +++ b/src/core/lib/security/credentials/credentials.h @@ -29,9 +29,7 @@ #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; @@ -256,8 +254,6 @@ 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 b8b58cc8fd..7645671cee 100644 --- a/src/core/lib/security/credentials/fake/fake_credentials.h +++ b/src/core/lib/security/credentials/fake/fake_credentials.h @@ -21,9 +21,7 @@ #include "src/core/lib/security/credentials/credentials.h" -#ifdef __cplusplus -extern "C" { -#endif + /* -- Fake transport security credentials. -- */ @@ -60,8 +58,6 @@ typedef struct { bool is_async; } grpc_md_only_test_credentials; -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_FAKE_FAKE_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/google_default/google_default_credentials.h b/src/core/lib/security/credentials/google_default/google_default_credentials.h index a0f8dc954e..6453480f0f 100644 --- a/src/core/lib/security/credentials/google_default/google_default_credentials.h +++ b/src/core/lib/security/credentials/google_default/google_default_credentials.h @@ -23,9 +23,7 @@ #include "src/core/lib/security/credentials/credentials.h" -#ifdef __cplusplus -extern "C" { -#endif + #define GRPC_GOOGLE_CLOUD_SDK_CONFIG_DIRECTORY "gcloud" #define GRPC_GOOGLE_WELL_KNOWN_CREDENTIALS_FILE \ @@ -45,9 +43,7 @@ extern "C" { void grpc_flush_cached_google_default_credentials(void); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_GOOGLE_DEFAULT_GOOGLE_DEFAULT_CREDENTIALS_H \ */ diff --git a/src/core/lib/security/credentials/jwt/json_token.h b/src/core/lib/security/credentials/jwt/json_token.h index b2c3c09c25..038f470a42 100644 --- a/src/core/lib/security/credentials/jwt/json_token.h +++ b/src/core/lib/security/credentials/jwt/json_token.h @@ -19,9 +19,7 @@ #ifndef GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H #define GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H -#ifdef __cplusplus -extern "C" { -#endif + #include <grpc/slice.h> #include <openssl/rsa.h> @@ -74,8 +72,6 @@ typedef char* (*grpc_jwt_encode_and_sign_override)( void grpc_jwt_encode_and_sign_set_override( grpc_jwt_encode_and_sign_override func); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JSON_TOKEN_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_credentials.h b/src/core/lib/security/credentials/jwt/jwt_credentials.h index d554613eed..cd461d217e 100644 --- a/src/core/lib/security/credentials/jwt/jwt_credentials.h +++ b/src/core/lib/security/credentials/jwt/jwt_credentials.h @@ -22,9 +22,7 @@ #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; @@ -49,8 +47,6 @@ 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); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_JWT_JWT_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/jwt/jwt_verifier.h b/src/core/lib/security/credentials/jwt/jwt_verifier.h index 8083cf9beb..98db50887b 100644 --- a/src/core/lib/security/credentials/jwt/jwt_verifier.h +++ b/src/core/lib/security/credentials/jwt/jwt_verifier.h @@ -32,9 +32,7 @@ #define GRPC_GOOGLE_SERVICE_ACCOUNTS_KEY_URL_PREFIX \ "www.googleapis.com/robot/v1/metadata/x509" -#ifdef __cplusplus -extern "C" { -#endif + /* --- grpc_jwt_verifier_status. --- */ @@ -126,8 +124,6 @@ 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 32d3ff760d..57332f0a39 100644 --- a/src/core/lib/security/credentials/oauth2/oauth2_credentials.h +++ b/src/core/lib/security/credentials/oauth2/oauth2_credentials.h @@ -22,9 +22,7 @@ #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 { @@ -106,8 +104,6 @@ grpc_oauth2_token_fetcher_credentials_parse_server_response( grpc_exec_ctx* exec_ctx, const struct grpc_http_response* response, grpc_mdelem* token_md, grpc_millis* token_lifetime); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_OAUTH2_OAUTH2_CREDENTIALS_H */ diff --git a/src/core/lib/security/credentials/ssl/ssl_credentials.h b/src/core/lib/security/credentials/ssl/ssl_credentials.h index 82b9ce11f6..5d10de71a3 100644 --- a/src/core/lib/security/credentials/ssl/ssl_credentials.h +++ b/src/core/lib/security/credentials/ssl/ssl_credentials.h @@ -20,9 +20,7 @@ #include "src/core/lib/security/credentials/credentials.h" -#ifdef __cplusplus -extern "C" { -#endif + typedef struct { grpc_channel_credentials base; @@ -53,8 +51,6 @@ tsi_ssl_pem_key_cert_pair* grpc_convert_grpc_to_tsi_cert_pairs( void grpc_tsi_ssl_pem_key_cert_pairs_destroy(tsi_ssl_pem_key_cert_pair* kp, size_t num_key_cert_pairs); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_CREDENTIALS_SSL_SSL_CREDENTIALS_H */ diff --git a/src/core/lib/security/transport/auth_filters.h b/src/core/lib/security/transport/auth_filters.h index 6376929890..add335d74f 100644 --- a/src/core/lib/security/transport/auth_filters.h +++ b/src/core/lib/security/transport/auth_filters.h @@ -22,9 +22,7 @@ #include <grpc/grpc_security.h> #include "src/core/lib/channel/channel_stack.h" -#ifdef __cplusplus -extern "C" { -#endif + extern const grpc_channel_filter grpc_client_auth_filter; extern const grpc_channel_filter grpc_server_auth_filter; @@ -36,8 +34,6 @@ void grpc_auth_metadata_context_build( void grpc_auth_metadata_context_reset(grpc_auth_metadata_context* context); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_AUTH_FILTERS_H */ diff --git a/src/core/lib/security/transport/lb_targets_info.h b/src/core/lib/security/transport/lb_targets_info.h index b4a0bc91da..0442d8df0b 100644 --- a/src/core/lib/security/transport/lb_targets_info.h +++ b/src/core/lib/security/transport/lb_targets_info.h @@ -21,9 +21,7 @@ #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( @@ -33,8 +31,6 @@ 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); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_LB_TARGETS_INFO_H */ diff --git a/src/core/lib/security/transport/secure_endpoint.h b/src/core/lib/security/transport/secure_endpoint.h index db8233f6e6..7f0843f17a 100644 --- a/src/core/lib/security/transport/secure_endpoint.h +++ b/src/core/lib/security/transport/secure_endpoint.h @@ -22,9 +22,7 @@ #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; @@ -40,8 +38,6 @@ grpc_endpoint* grpc_secure_endpoint_create( grpc_endpoint* to_wrap, grpc_slice* leftover_slices, size_t leftover_nslices); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURE_ENDPOINT_H */ diff --git a/src/core/lib/security/transport/security_connector.h b/src/core/lib/security/transport/security_connector.h index 79fdbc1a66..d680db6c8e 100644 --- a/src/core/lib/security/transport/security_connector.h +++ b/src/core/lib/security/transport/security_connector.h @@ -29,9 +29,7 @@ #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; @@ -261,8 +259,6 @@ 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 174f70f0dd..fd23a784a4 100644 --- a/src/core/lib/security/transport/security_handshaker.h +++ b/src/core/lib/security/transport/security_handshaker.h @@ -23,9 +23,7 @@ #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( @@ -35,8 +33,6 @@ grpc_handshaker* grpc_security_handshaker_create( /// Registers security handshaker factories. void grpc_security_register_handshaker_factories(); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_SECURITY_HANDSHAKER_H */ diff --git a/src/core/lib/security/transport/tsi_error.h b/src/core/lib/security/transport/tsi_error.h index 4e8418f3fd..9dd7ab4a4e 100644 --- a/src/core/lib/security/transport/tsi_error.h +++ b/src/core/lib/security/transport/tsi_error.h @@ -22,14 +22,10 @@ #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); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_TRANSPORT_TSI_ERROR_H */ diff --git a/src/core/lib/security/util/json_util.h b/src/core/lib/security/util/json_util.h index 7538f76120..f99edcd153 100644 --- a/src/core/lib/security/util/json_util.h +++ b/src/core/lib/security/util/json_util.h @@ -28,9 +28,7 @@ #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, @@ -41,8 +39,6 @@ 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); -#ifdef __cplusplus -} -#endif + #endif /* GRPC_CORE_LIB_SECURITY_UTIL_JSON_UTIL_H */ |