syslog-ng source
grpc-credentials-builder.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2023 Attila Szakacs
3  *
4  * This program is free software; you can redistribute it and/or modify it
5  * under the terms of the GNU General Public License version 2 as published
6  * by the Free Software Foundation, or (at your option) any later version.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11  * GNU General Public License for more details.
12  *
13  * You should have received a copy of the GNU General Public License
14  * along with this program; if not, write to the Free Software
15  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
16  *
17  * As an additional exemption you are allowed to compile & link against the
18  * OpenSSL libraries as published by the OpenSSL project. See the file
19  * COPYING for details.
20  *
21  */
22 
23 #ifndef GRPC_CREDENTIALS_BUILDER_H
24 #define GRPC_CREDENTIALS_BUILDER_H
25 
26 #include "syslog-ng.h"
27 
28 #include "compat/cpp-start.h"
29 
30 /* Server */
31 
32 typedef enum
33 {
38 
39 typedef enum
40 {
46 
47 typedef struct GrpcServerCredentialsBuilderW_ GrpcServerCredentialsBuilderW; // Wrapper struct
48 
54  GrpcServerTlsPeerVerify peer_verify);
55 
56 /* Client */
57 
58 typedef enum
59 {
66 
67 typedef struct GrpcClientCredentialsBuilderW_ GrpcClientCredentialsBuilderW; // Wrapper struct
68 
74  const gchar *target_service_account);
76  const gchar *key_path);
78  guint64 validity_duration);
79 
80 #include "compat/cpp-end.h"
81 
82 #endif
GProcessMode mode
Definition: gprocess.c:118
struct GrpcClientCredentialsBuilderW_ GrpcClientCredentialsBuilderW
Definition: grpc-credentials-builder.h:67
GrpcServerTlsPeerVerify
Definition: grpc-credentials-builder.h:40
@ GSTPV_REQUIRED_TRUSTED
Definition: grpc-credentials-builder.h:44
@ GSTPV_OPTIONAL_UNTRUSTED
Definition: grpc-credentials-builder.h:41
@ GSTPV_OPTIONAL_TRUSTED
Definition: grpc-credentials-builder.h:42
@ GSTPV_REQUIRED_UNTRUSTED
Definition: grpc-credentials-builder.h:43
gboolean grpc_server_credentials_builder_set_tls_cert_path(GrpcServerCredentialsBuilderW *s, const gchar *cert_path)
void grpc_server_credentials_builder_set_tls_peer_verify(GrpcServerCredentialsBuilderW *s, GrpcServerTlsPeerVerify peer_verify)
GrpcServerAuthMode
Definition: grpc-credentials-builder.h:33
@ GSAM_INSECURE
Definition: grpc-credentials-builder.h:34
@ GSAM_ALTS
Definition: grpc-credentials-builder.h:36
@ GSAM_TLS
Definition: grpc-credentials-builder.h:35
gboolean grpc_client_credentials_builder_set_tls_key_path(GrpcClientCredentialsBuilderW *s, const gchar *key_path)
struct GrpcServerCredentialsBuilderW_ GrpcServerCredentialsBuilderW
Definition: grpc-credentials-builder.h:47
gboolean grpc_client_credentials_builder_service_account_set_key(GrpcClientCredentialsBuilderW *s, const gchar *key_path)
gboolean grpc_client_credentials_builder_set_tls_cert_path(GrpcClientCredentialsBuilderW *s, const gchar *cert_path)
void grpc_client_credentials_builder_service_account_set_validity_duration(GrpcClientCredentialsBuilderW *s, guint64 validity_duration)
GrpcClientAuthMode
Definition: grpc-credentials-builder.h:59
@ GCAM_SERVICE_ACCOUNT
Definition: grpc-credentials-builder.h:64
@ GCAM_TLS
Definition: grpc-credentials-builder.h:61
@ GCAM_INSECURE
Definition: grpc-credentials-builder.h:60
@ GCAM_ADC
Definition: grpc-credentials-builder.h:63
@ GCAM_ALTS
Definition: grpc-credentials-builder.h:62
void grpc_server_credentials_builder_set_mode(GrpcServerCredentialsBuilderW *s, GrpcServerAuthMode mode)
void grpc_client_credentials_builder_add_alts_target_service_account(GrpcClientCredentialsBuilderW *s, const gchar *target_service_account)
void grpc_client_credentials_builder_set_mode(GrpcClientCredentialsBuilderW *s, GrpcClientAuthMode mode)
gboolean grpc_client_credentials_builder_set_tls_ca_path(GrpcClientCredentialsBuilderW *s, const gchar *ca_path)
gboolean grpc_server_credentials_builder_set_tls_key_path(GrpcServerCredentialsBuilderW *s, const gchar *key_path)
gboolean grpc_server_credentials_builder_set_tls_ca_path(GrpcServerCredentialsBuilderW *s, const gchar *ca_path)