File: gtm_tls.h

package info (click to toggle)
fis-gtm 7.1-006-1
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 32,908 kB
  • sloc: ansic: 344,906; asm: 5,184; csh: 4,859; sh: 2,000; awk: 294; makefile: 73; sed: 13
file content (108 lines) | stat: -rw-r--r-- 4,803 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
/****************************************************************
 *								*
 * Copyright (c) 2013-2023 Fidelity National Information	*
 * Services, Inc. and/or its subsidiaries. All rights reserved.	*
 *								*
 *	This source code contains the intellectual property	*
 *	of its copyright holder(s), and is made available	*
 *	under a license.  If you do not know the terms of	*
 *	the license, please stop and do not read further.	*
 *								*
 ****************************************************************/

#ifndef GTM_TLS_H
#define GTM_TLS_H

#define gtm_tls_get_error		(*gtm_tls_get_error_fptr)
#define gtm_tls_errno			(*gtm_tls_errno_fptr)
#define gtm_tls_init			(*gtm_tls_init_fptr)
#define gtm_tls_prefetch_passwd		(*gtm_tls_prefetch_passwd_fptr)
#define gtm_tls_socket			(*gtm_tls_socket_fptr)
#define gtm_tls_connect			(*gtm_tls_connect_fptr)
#define gtm_tls_accept			(*gtm_tls_accept_fptr)
#define gtm_tls_did_post_hand_shake	(*gtm_tls_did_post_hand_shake_fptr)
#define gtm_tls_do_post_hand_shake	(*gtm_tls_do_post_hand_shake_fptr)
#define gtm_tls_has_post_hand_shake	(*gtm_tls_has_post_hand_shake_fptr)
#define gtm_tls_repeat_hand_shake	(*gtm_tls_repeat_hand_shake_fptr)
#define gtm_tls_does_renegotiate	(*gtm_tls_does_renegotiate_fptr)
#define gtm_tls_renegotiate		(*gtm_tls_renegotiate_fptr)
#define gtm_tls_get_conn_info		(*gtm_tls_get_conn_info_fptr)
#define gtm_tls_send			(*gtm_tls_send_fptr)
#define gtm_tls_recv			(*gtm_tls_recv_fptr)
#define gtm_tls_cachedbytes		(*gtm_tls_cachedbytes_fptr)
#define gtm_tls_socket_close		(*gtm_tls_socket_close_fptr)
#define gtm_tls_session_close		(*gtm_tls_session_close_fptr)
#define gtm_tls_fini			(*gtm_tls_fini_fptr)
#define gtm_tls_store_passwd		(*gtm_tls_store_passwd_fptr)
#define gtm_tls_add_config		(*gtm_tls_add_config_fptr)
#define gtm_tls_renegotiate_options	(*gtm_tls_renegotiate_options_fptr)
#define gtm_tls_version			(*gtm_tls_version_fptr)

/* It's important that the "gtm_tls_interface.h" include should be *after* the above macro definitions. This way, the function
 * prototypes defined in the header file will automatically be expanded to function pointers saving us the trouble of explicitly
 * defining them once again.
 */
#include "gtm_tls_interface.h"

#undef gtm_tls_get_error
#undef gtm_tls_errno
#undef gtm_tls_init
#undef gtm_tls_prefetch_passwd
#undef gtm_tls_socket
#undef gtm_tls_connect
#undef gtm_tls_accept
#undef gtm_tls_did_post_hand_shake
#undef gtm_tls_do_post_hand_shake
#undef gtm_tls_has_post_hand_shake
#undef gtm_tls_repeat_hand_shake
#undef gtm_tls_does_renegotiate
#undef gtm_tls_renegotiate
#undef gtm_tls_get_conn_info
#undef gtm_tls_send
#undef gtm_tls_recv
#undef gtm_tls_cachedbytes
#undef gtm_tls_socket_close
#undef gtm_tls_session_close
#undef gtm_tls_fini
#undef gtm_tls_store_passwd
#undef gtm_tls_add_config
#undef gtm_tls_renegotiate_options
#undef gtm_tls_version

/* Now, we need to define prototypes for wrapper functions that will be defined in GT.M to defer interrupts before invoking the
 * corresponding TLS function. But, to avoid redefining the prototypes, include the gtm_tls_interface.h once again to automatically
 * generate the prototypes.
 */
#define gtm_tls_get_error		intrsafe_gtm_tls_get_error
#define gtm_tls_errno			intrsafe_gtm_tls_errno
#define gtm_tls_init			intrsafe_gtm_tls_init
#define gtm_tls_prefetch_passwd		intrsafe_gtm_tls_prefetch_passwd
#define gtm_tls_socket			intrsafe_gtm_tls_socket
#define gtm_tls_connect			intrsafe_gtm_tls_connect
#define gtm_tls_accept			intrsafe_gtm_tls_accept
#define gtm_tls_did_post_hand_shake	intrsafe_gtm_tls_did_post_hand_shake
#define gtm_tls_do_post_hand_shake	intrsafe_gtm_tls_do_post_hand_shake
#define gtm_tls_has_post_hand_shake	intrsafe_gtm_tls_has_post_hand_shake
#define gtm_tls_repeat_hand_shake	intrsafe_gtm_tls_repeat_hand_shake
#define gtm_tls_does_renegotiate	intrsafe_gtm_tls_does_renegotiate
#define gtm_tls_renegotiate		intrsafe_gtm_tls_renegotiate
#define gtm_tls_get_conn_info		intrsafe_gtm_tls_get_conn_info
#define gtm_tls_send			intrsafe_gtm_tls_send
#define gtm_tls_recv			intrsafe_gtm_tls_recv
#define gtm_tls_cachedbytes		intrsafe_gtm_tls_cachedbytes
#define gtm_tls_socket_close		intrsafe_gtm_tls_socket_close
#define gtm_tls_session_close		intrsafe_gtm_tls_session_close
#define gtm_tls_fini			intrsafe_gtm_tls_fini
#define gtm_tls_store_passwd		intrsafe_gtm_tls_store_passwd
#define gtm_tls_add_config		intrsafe_gtm_tls_add_config
#define gtm_tls_renegotiate_options	intrsafe_gtm_tls_renegotiate_options
#define gtm_tls_version			intrsafe_gtm_tls_version

#undef GTM_TLS_INTERFACE_H	/* Allows us to include gtm_tls_interface.h twice. */
#include "gtm_tls_interface.h"	/* BYPASSOK : intentional duplicate include. */

GBLREF	gtm_tls_ctx_t			*tls_ctx;

int	gtm_tls_loadlibrary(void);

#endif