Branch data Line data Source code
1 : : /* symbols.c --- Test if all exported symbols are available.
2 : : * Copyright (C) 2010-2012 Simon Josefsson
3 : : *
4 : : * This file is part of GNU SASL.
5 : : *
6 : : * This program is free software: you can redistribute it and/or modify
7 : : * it under the terms of the GNU General Public License as published by
8 : : * the Free Software Foundation, either version 3 of the License, or
9 : : * (at your option) any later version.
10 : : *
11 : : * This program is distributed in the hope that it will be useful,
12 : : * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 : : * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 : : * GNU General Public License for more details.
15 : : *
16 : : * You should have received a copy of the GNU General Public License
17 : : * along with this program. If not, see <http://www.gnu.org/licenses/>.
18 : : *
19 : : */
20 : :
21 : : #ifdef HAVE_CONFIG_H
22 : : # include "config.h"
23 : : #endif
24 : :
25 : : #include <gsasl.h>
26 : :
27 : : #include "utils.h"
28 : :
29 : : static void
30 : 116 : assert_symbol_exists (const void *p)
31 : : {
32 [ - + ]: 116 : if (!p)
33 : 0 : fail ("null symbol?!\n");
34 : 116 : }
35 : :
36 : : void
37 : 1 : doit (void)
38 : : {
39 : : /* LIBGSASL_1.1 */
40 : 1 : assert_symbol_exists ((const void *) GSASL_VALID_MECHANISM_CHARACTERS);
41 : 1 : assert_symbol_exists ((const void *) gsasl_base64_from);
42 : 1 : assert_symbol_exists ((const void *) gsasl_base64_to);
43 : 1 : assert_symbol_exists ((const void *) gsasl_callback);
44 : 1 : assert_symbol_exists ((const void *) gsasl_callback_hook_get);
45 : 1 : assert_symbol_exists ((const void *) gsasl_callback_hook_set);
46 : 1 : assert_symbol_exists ((const void *) gsasl_callback_set);
47 : 1 : assert_symbol_exists ((const void *) gsasl_check_version);
48 : 1 : assert_symbol_exists ((const void *) gsasl_client_mechlist);
49 : 1 : assert_symbol_exists ((const void *) gsasl_client_start);
50 : 1 : assert_symbol_exists ((const void *) gsasl_client_suggest_mechanism);
51 : 1 : assert_symbol_exists ((const void *) gsasl_client_support_p);
52 : 1 : assert_symbol_exists ((const void *) gsasl_decode);
53 : 1 : assert_symbol_exists ((const void *) gsasl_done);
54 : 1 : assert_symbol_exists ((const void *) gsasl_encode);
55 : 1 : assert_symbol_exists ((const void *) gsasl_finish);
56 : 1 : assert_symbol_exists ((const void *) gsasl_free);
57 : 1 : assert_symbol_exists ((const void *) gsasl_hmac_md5);
58 : 1 : assert_symbol_exists ((const void *) gsasl_init);
59 : 1 : assert_symbol_exists ((const void *) gsasl_md5);
60 : 1 : assert_symbol_exists ((const void *) gsasl_mechanism_name);
61 : 1 : assert_symbol_exists ((const void *) gsasl_nonce);
62 : 1 : assert_symbol_exists ((const void *) gsasl_property_fast);
63 : 1 : assert_symbol_exists ((const void *) gsasl_property_get);
64 : 1 : assert_symbol_exists ((const void *) gsasl_property_set);
65 : 1 : assert_symbol_exists ((const void *) gsasl_property_set_raw);
66 : 1 : assert_symbol_exists ((const void *) gsasl_random);
67 : 1 : assert_symbol_exists ((const void *) gsasl_register);
68 : 1 : assert_symbol_exists ((const void *) gsasl_saslprep);
69 : 1 : assert_symbol_exists ((const void *) gsasl_server_mechlist);
70 : 1 : assert_symbol_exists ((const void *) gsasl_server_start);
71 : 1 : assert_symbol_exists ((const void *) gsasl_server_support_p);
72 : 1 : assert_symbol_exists ((const void *) gsasl_session_hook_get);
73 : 1 : assert_symbol_exists ((const void *) gsasl_session_hook_set);
74 : 1 : assert_symbol_exists ((const void *) gsasl_simple_getpass);
75 : 1 : assert_symbol_exists ((const void *) gsasl_step64);
76 : 1 : assert_symbol_exists ((const void *) gsasl_step);
77 : 1 : assert_symbol_exists ((const void *) gsasl_strerror);
78 : 1 : assert_symbol_exists ((const void *) gsasl_strerror_name);
79 : :
80 : : #ifndef GSASL_NO_OBSOLETE
81 : : /* LIBGSASL_1.1: Old interfaces */
82 : 1 : assert_symbol_exists ((const void *) gsasl_appinfo_get);
83 : 1 : assert_symbol_exists ((const void *) gsasl_appinfo_set);
84 : 1 : assert_symbol_exists ((const void *) gsasl_application_data_get);
85 : 1 : assert_symbol_exists ((const void *) gsasl_application_data_set);
86 : 1 : assert_symbol_exists ((const void *) gsasl_base64_decode);
87 : 1 : assert_symbol_exists ((const void *) gsasl_base64_encode);
88 : 1 : assert_symbol_exists ((const void *) gsasl_client_application_data_get);
89 : 1 : assert_symbol_exists ((const void *) gsasl_client_application_data_set);
90 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_anonymous_get);
91 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_anonymous_set);
92 : 1 : assert_symbol_exists ((const void *)
93 : : gsasl_client_callback_authentication_id_get);
94 : 1 : assert_symbol_exists ((const void *)
95 : : gsasl_client_callback_authentication_id_set);
96 : 1 : assert_symbol_exists ((const void *)
97 : : gsasl_client_callback_authorization_id_get);
98 : 1 : assert_symbol_exists ((const void *)
99 : : gsasl_client_callback_authorization_id_set);
100 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_maxbuf_get);
101 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_maxbuf_set);
102 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_passcode_get);
103 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_passcode_set);
104 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_password_get);
105 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_password_set);
106 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_pin_get);
107 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_pin_set);
108 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_qop_get);
109 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_qop_set);
110 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_realm_get);
111 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_realm_set);
112 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_service_get);
113 : 1 : assert_symbol_exists ((const void *) gsasl_client_callback_service_set);
114 : 1 : assert_symbol_exists ((const void *) gsasl_client_ctx_get);
115 : 1 : assert_symbol_exists ((const void *) gsasl_client_finish);
116 : 1 : assert_symbol_exists ((const void *) gsasl_client_listmech);
117 : 1 : assert_symbol_exists ((const void *) gsasl_client_step);
118 : 1 : assert_symbol_exists ((const void *) gsasl_client_step_base64);
119 : 1 : assert_symbol_exists ((const void *) gsasl_ctx_get);
120 : 1 : assert_symbol_exists ((const void *) gsasl_decode_inline);
121 : 1 : assert_symbol_exists ((const void *) gsasl_encode_inline);
122 : 1 : assert_symbol_exists ((const void *) gsasl_md5pwd_get_password);
123 : 1 : assert_symbol_exists ((const void *) gsasl_randomize);
124 : 1 : assert_symbol_exists ((const void *) gsasl_server_application_data_get);
125 : 1 : assert_symbol_exists ((const void *) gsasl_server_application_data_set);
126 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_anonymous_get);
127 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_anonymous_set);
128 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_cipher_get);
129 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_cipher_set);
130 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_cram_md5_get);
131 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_cram_md5_set);
132 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_digest_md5_get);
133 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_digest_md5_set);
134 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_external_get);
135 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_external_set);
136 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_gssapi_get);
137 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_gssapi_set);
138 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_maxbuf_get);
139 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_maxbuf_set);
140 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_qop_get);
141 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_qop_set);
142 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_realm_get);
143 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_realm_set);
144 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_retrieve_get);
145 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_retrieve_set);
146 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_securid_get);
147 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_securid_set);
148 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_service_get);
149 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_service_set);
150 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_validate_get);
151 : 1 : assert_symbol_exists ((const void *) gsasl_server_callback_validate_set);
152 : 1 : assert_symbol_exists ((const void *) gsasl_server_ctx_get);
153 : 1 : assert_symbol_exists ((const void *) gsasl_server_finish);
154 : 1 : assert_symbol_exists ((const void *) gsasl_server_listmech);
155 : 1 : assert_symbol_exists ((const void *) gsasl_server_step);
156 : 1 : assert_symbol_exists ((const void *) gsasl_server_step_base64);
157 : 1 : assert_symbol_exists ((const void *) gsasl_server_suggest_mechanism);
158 : 1 : assert_symbol_exists ((const void *) gsasl_stringprep_nfkc);
159 : 1 : assert_symbol_exists ((const void *) gsasl_stringprep_saslprep);
160 : 1 : assert_symbol_exists ((const void *) gsasl_stringprep_trace);
161 : : #endif
162 : :
163 : : /* LIBGSASL_1.4 */
164 : 1 : assert_symbol_exists ((const void *) gsasl_sha1);
165 : 1 : assert_symbol_exists ((const void *) gsasl_hmac_sha1);
166 : :
167 : 1 : success ("all symbols exists\n");
168 : 1 : }
|