git-svn-id: https://openser.svn.sourceforge.net/svnroot/openser/trunk@1266 689a6050-402a-0410-94f2-e92a70836424
... | ... |
@@ -236,6 +236,7 @@ struct module_exports exports= { |
236 | 236 |
params, /* exported params */ |
237 | 237 |
0, /* exported statistics */ |
238 | 238 |
0, /* exported MI functions */ |
239 |
+ 0, /* exported pseudo-variables */ |
|
239 | 240 |
mod_init, /* initialization module */ |
240 | 241 |
0, /* response function */ |
241 | 242 |
destroy, /* destroy function */ |
... | ... |
@@ -100,6 +100,7 @@ struct module_exports exports = { |
100 | 100 |
params, /* Exported parameters */ |
101 | 101 |
0, /* exported statistics */ |
102 | 102 |
0, /* exported MI functions */ |
103 |
+ 0, /* exported pseudo-variables */ |
|
103 | 104 |
mod_init, /* module initialization function */ |
104 | 105 |
0, /* response function */ |
105 | 106 |
destroy, /* destroy function */ |
... | ... |
@@ -153,6 +153,7 @@ struct module_exports exports = { |
153 | 153 |
params, |
154 | 154 |
0, /* exported statistics */ |
155 | 155 |
0, /* exported MI functions */ |
156 |
+ 0, /* exported pseudo-variables */ |
|
156 | 157 |
mod_init, /* module initialization function */ |
157 | 158 |
0, /* response function */ |
158 | 159 |
destroy, /* destroy function */ |
... | ... |
@@ -147,6 +147,7 @@ struct module_exports exports = { |
147 | 147 |
params, /* Exported parameters */ |
148 | 148 |
0, /* exported statistics */ |
149 | 149 |
0, /* exported MI functions */ |
150 |
+ 0, /* exported pseudo-variables */ |
|
150 | 151 |
mod_init, /* module initialization function */ |
151 | 152 |
0, /* response function */ |
152 | 153 |
destroy, /* destroy function */ |
... | ... |
@@ -105,6 +105,7 @@ struct module_exports exports = { |
105 | 105 |
params, /* Exported parameters */ |
106 | 106 |
0, /* exported statistics */ |
107 | 107 |
0, /* exported MI functions */ |
108 |
+ 0, /* exported pseudo-variables */ |
|
108 | 109 |
mod_init, /* module initialization function */ |
109 | 110 |
0, /* response function */ |
110 | 111 |
0, /* destroy function */ |
... | ... |
@@ -95,6 +95,7 @@ struct module_exports exports = { |
95 | 95 |
params, /* Exported parameters */ |
96 | 96 |
0, /* exported statistics */ |
97 | 97 |
0, /* exported MI functions */ |
98 |
+ 0, /* exported pseudo-variables */ |
|
98 | 99 |
mod_init, /* module initialization function */ |
99 | 100 |
0, /* response function */ |
100 | 101 |
0, /* destroy function */ |
... | ... |
@@ -99,6 +99,7 @@ struct module_exports exports = { |
99 | 99 |
params, /* Exported parameters */ |
100 | 100 |
0, /* exported statistics */ |
101 | 101 |
0, /* exported MI functions */ |
102 |
+ 0, /* exported pseudo-variables */ |
|
102 | 103 |
mod_init, /* module initialization function */ |
103 | 104 |
0, /* response function*/ |
104 | 105 |
0, /* destroy function */ |
... | ... |
@@ -156,6 +156,7 @@ struct module_exports exports = { |
156 | 156 |
params, /* Exported parameters */ |
157 | 157 |
0, /* exported statistics */ |
158 | 158 |
0, /* exported MI functions */ |
159 |
+ 0, /* exported pseudo-variables */ |
|
159 | 160 |
avpops_init,/* Module initialization function */ |
160 | 161 |
(response_function) 0, |
161 | 162 |
(destroy_function) 0, |
... | ... |
@@ -170,6 +170,7 @@ struct module_exports exports = { |
170 | 170 |
params, /* Exported parameters */ |
171 | 171 |
0, /* exported statistics */ |
172 | 172 |
mi_cmds, /* exported MI functions */ |
173 |
+ 0, /* exported pseudo-variables */ |
|
173 | 174 |
cpl_init, /* Module initialization function */ |
174 | 175 |
(response_function) 0, |
175 | 176 |
(destroy_function) cpl_exit, |
... | ... |
@@ -73,6 +73,7 @@ struct module_exports exports = { |
73 | 73 |
params, /* Exported parameters */ |
74 | 74 |
0, /* exported statistics */ |
75 | 75 |
0, /* exported MI functions */ |
76 |
+ 0, /* exported pseudo-variables */ |
|
76 | 77 |
mod_init, /* module initialization function */ |
77 | 78 |
0, /* response function*/ |
78 | 79 |
destroy, /* destroy function */ |
... | ... |
@@ -112,6 +112,7 @@ struct module_exports exports= { |
112 | 112 |
mod_params, /* param exports */ |
113 | 113 |
mod_stats, /* exported statistics */ |
114 | 114 |
mi_cmds, /* exported MI functions */ |
115 |
+ 0, /* exported pseudo-variables */ |
|
115 | 116 |
mod_init, /* module initialization function */ |
116 | 117 |
0, /* reply processing function */ |
117 | 118 |
mod_destroy, |
... | ... |
@@ -113,6 +113,7 @@ struct module_exports exports= { |
113 | 113 |
params, |
114 | 114 |
0, /* exported statistics */ |
115 | 115 |
mi_cmds, /* exported MI functions */ |
116 |
+ 0, /* exported pseudo-variables */ |
|
116 | 117 |
mod_init, /* module initialization function */ |
117 | 118 |
(response_function) 0, |
118 | 119 |
(destroy_function) destroy, |
... | ... |
@@ -84,6 +84,7 @@ struct module_exports exports = { |
84 | 84 |
params, /* Exported parameters */ |
85 | 85 |
0, /* exported statistics */ |
86 | 86 |
0, /* exported MI functions */ |
87 |
+ 0, /* exported pseudo-variables */ |
|
87 | 88 |
mod_init, /* module initialization function */ |
88 | 89 |
0, /* response function */ |
89 | 90 |
0, /* destroy function */ |
... | ... |
@@ -131,6 +131,7 @@ struct module_exports exports = { |
131 | 131 |
params, /* Exported parameters */ |
132 | 132 |
0, /* exported statistics */ |
133 | 133 |
mi_cmds, /* exported MI functions */ |
134 |
+ 0, /* exported pseudo-variables */ |
|
134 | 135 |
mod_init, /* module initialization function */ |
135 | 136 |
0, /* response function*/ |
136 | 137 |
destroy, /* destroy function */ |
... | ... |
@@ -139,6 +139,7 @@ struct module_exports exports = { |
139 | 139 |
params, /* exported parameters */ |
140 | 140 |
0, /* exported statistics */ |
141 | 141 |
0, /* exported MI functions */ |
142 |
+ 0, /* exported pseudo-variables */ |
|
142 | 143 |
mod_init, /* module initialization function */ |
143 | 144 |
0, /* response function*/ |
144 | 145 |
destroy, /* destroy function */ |
... | ... |
@@ -116,6 +116,7 @@ struct module_exports exports = { |
116 | 116 |
params, /* Exported parameters */ |
117 | 117 |
0, /* exported statistics */ |
118 | 118 |
0, /* exported MI functions */ |
119 |
+ 0, /* exported pseudo-variables */ |
|
119 | 120 |
mod_init, /* module initialization function */ |
120 | 121 |
0, /* response function*/ |
121 | 122 |
0, /* destroy function */ |
... | ... |
@@ -84,6 +84,7 @@ struct module_exports exports= { |
84 | 84 |
params, /* Exported parameters */ |
85 | 85 |
0, /* exported statistics */ |
86 | 86 |
0, /* exported MI functions */ |
87 |
+ 0, /* exported pseudo-variables */ |
|
87 | 88 |
mod_init, /* initialization module */ |
88 | 89 |
0, /* response function */ |
89 | 90 |
exec_shutdown, /* destroy function */ |
... | ... |
@@ -103,6 +103,7 @@ struct module_exports exports = { |
103 | 103 |
params, /* module parameters */ |
104 | 104 |
0, /* exported statistics */ |
105 | 105 |
mi_cmds, /* exported MI functions */ |
106 |
+ 0, /* exported pseudo-variables */ |
|
106 | 107 |
mod_init, /* module initialization function */ |
107 | 108 |
0, /* response function*/ |
108 | 109 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -110,6 +110,7 @@ struct module_exports exports = { |
110 | 110 |
params, /* exported parameters */ |
111 | 111 |
0, /* exported statistics */ |
112 | 112 |
mi_cmds, /* exported MI functions */ |
113 |
+ 0, /* exported pseudo-variables */ |
|
113 | 114 |
mod_init, /* module initialization function */ |
114 | 115 |
0, /* response function*/ |
115 | 116 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -158,6 +158,7 @@ struct module_exports exports = { |
158 | 158 |
params, /* Exported parameters */ |
159 | 159 |
0, /* exported statistics */ |
160 | 160 |
0, /* exported MI functions */ |
161 |
+ 0, /* exported pseudo-variables */ |
|
161 | 162 |
mod_init, /* module initialization function */ |
162 | 163 |
0, /* response function */ |
163 | 164 |
destroy, /* destroy function */ |
... | ... |
@@ -85,6 +85,7 @@ struct module_exports exports = { |
85 | 85 |
params, /* Exported parameters */ |
86 | 86 |
0, /* exported statistics */ |
87 | 87 |
0, /* exported MI functions */ |
88 |
+ 0, /* exported pseudo-variables */ |
|
88 | 89 |
mod_init, /* module initialization function */ |
89 | 90 |
0, /* response function */ |
90 | 91 |
0, /* destroy function */ |
... | ... |
@@ -148,6 +148,7 @@ struct module_exports exports= { |
148 | 148 |
0, /* exported statistics */ |
149 | 149 |
#endif |
150 | 150 |
mi_cmds, /* exported MI functions */ |
151 |
+ 0, /* exported pseudo-variables */ |
|
151 | 152 |
mod_init, /* mod init */ |
152 | 153 |
(response_function) 0, /* response handler */ |
153 | 154 |
(destroy_function) destroy, /* destroy function */ |
... | ... |
@@ -172,6 +172,7 @@ struct module_exports exports= { |
172 | 172 |
params, /* Exported parameters */ |
173 | 173 |
0, /* exported statistics */ |
174 | 174 |
0, /* exported MI functions */ |
175 |
+ 0, /* exported pseudo-variables */ |
|
175 | 176 |
mod_init, /* module initialization function */ |
176 | 177 |
(response_function) 0, |
177 | 178 |
(destroy_function) destroy, |
... | ... |
@@ -309,6 +309,7 @@ struct module_exports exports = { |
309 | 309 |
params, /* Exported parameters */ |
310 | 310 |
0, /* exported statistics */ |
311 | 311 |
mi_cmds, /* exported MI functions */ |
312 |
+ 0, /* exported pseudo-variables */ |
|
312 | 313 |
mod_init, /* module initialization function */ |
313 | 314 |
0, /* response function */ |
314 | 315 |
destroy, /* destroy function */ |
... | ... |
@@ -112,6 +112,7 @@ struct module_exports exports = { |
112 | 112 |
params, /* Exported parameters */ |
113 | 113 |
0, /* exported statistics */ |
114 | 114 |
0, /* exported MI functions */ |
115 |
+ 0, /* exported pseudo-variables */ |
|
115 | 116 |
mod_init, /* module initialization function */ |
116 | 117 |
0, /* response function */ |
117 | 118 |
destroy, /* destroy function */ |
... | ... |
@@ -220,6 +220,7 @@ struct module_exports exports = { |
220 | 220 |
parameters, // module exported parameters |
221 | 221 |
NULL, // exported statistics |
222 | 222 |
NULL, /* exported MI functions */ |
223 |
+ NULL, /* exported pseudo-variables */ |
|
223 | 224 |
mod_init, // module init (before any kid is created. kids will inherit) |
224 | 225 |
NULL, // reply processing |
225 | 226 |
NULL, // destroy function |
... | ... |
@@ -86,6 +86,7 @@ struct module_exports exports = { |
86 | 86 |
mi_params, /* exported parameters */ |
87 | 87 |
0, /* exported statistics */ |
88 | 88 |
0, /* exported MI functions */ |
89 |
+ 0, /* exported pseudo-variables */ |
|
89 | 90 |
mi_mod_init, /* module initialization function */ |
90 | 91 |
(response_function) 0, /* response handling function */ |
91 | 92 |
(destroy_function) mi_destroy, /* destroy function */ |
... | ... |
@@ -229,6 +229,7 @@ struct module_exports exports= { |
229 | 229 |
0, /* exported statistics */ |
230 | 230 |
#endif |
231 | 231 |
0, /* exported MI functions */ |
232 |
+ 0, /* exported pseudo-variables */ |
|
232 | 233 |
mod_init, /* module initialization function */ |
233 | 234 |
(response_function) 0, /* response handler */ |
234 | 235 |
(destroy_function) destroy, /* module destroy function */ |
... | ... |
@@ -76,6 +76,7 @@ struct module_exports exports = { |
76 | 76 |
params, /* Exported parameters */ |
77 | 77 |
0, /* exported statistics */ |
78 | 78 |
0, /* exported MI functions */ |
79 |
+ 0, /* exported pseudo-variables */ |
|
79 | 80 |
mod_init, /* Initialization function */ |
80 | 81 |
0, /* Response function */ |
81 | 82 |
0, /* Destroy function */ |
... | ... |
@@ -116,6 +116,7 @@ struct module_exports exports = { |
116 | 116 |
params, |
117 | 117 |
0, /* exported statistics */ |
118 | 118 |
0, /* exported MI functions */ |
119 |
+ 0, /* exported pseudo-variables */ |
|
119 | 120 |
ospInitMod, /* module initialization function */ |
120 | 121 |
0, /* response function*/ |
121 | 122 |
ospDestMod, /* destroy function */ |
... | ... |
@@ -131,6 +131,7 @@ struct module_exports exports = { |
131 | 131 |
params, /* Exported parameters */ |
132 | 132 |
0, /* exported statistics */ |
133 | 133 |
0, /* exported MI functions */ |
134 |
+ 0, /* exported pseudo-variables */ |
|
134 | 135 |
pa_mod_init, /* module initialization function */ |
135 | 136 |
0, /* response function*/ |
136 | 137 |
pa_destroy, /* destroy function */ |
... | ... |
@@ -98,6 +98,7 @@ struct module_exports exports = { |
98 | 98 |
params, /* Exported parameters */ |
99 | 99 |
0, /* exported statistics */ |
100 | 100 |
0, /* exported MI functions */ |
101 |
+ 0, /* exported pseudo-variables */ |
|
101 | 102 |
mod_init, /* module initialization function */ |
102 | 103 |
0, /* response function */ |
103 | 104 |
destroy, /* destroy function */ |
... | ... |
@@ -141,6 +141,7 @@ struct module_exports exports = { |
141 | 141 |
params, |
142 | 142 |
0, |
143 | 143 |
mi_cmds, /* exported MI functions */ |
144 |
+ 0, /* exported pseudo-variables */ |
|
144 | 145 |
mod_init, /* module initialization function */ |
145 | 146 |
0, /* response function */ |
146 | 147 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -189,6 +189,7 @@ struct module_exports exports = { |
189 | 189 |
params, /* Exported parameters */ |
190 | 190 |
0, /* exported statistics */ |
191 | 191 |
mi_cmds, /* exported MI functions */ |
192 |
+ 0, /* exported pseudo-variables */ |
|
192 | 193 |
mod_init, /* module initialization function */ |
193 | 194 |
0, /* response function */ |
194 | 195 |
mod_exit, /* destroy function */ |
... | ... |
@@ -87,6 +87,7 @@ struct module_exports exports= { |
87 | 87 |
params, |
88 | 88 |
0, /* exported statistics */ |
89 | 89 |
0, /* exported MI functions */ |
90 |
+ 0, /* exported pseudo-variables */ |
|
90 | 91 |
pike_init, /* module initialization function */ |
91 | 92 |
(response_function) 0, |
92 | 93 |
(destroy_function) pike_exit, /* module exit function */ |
... | ... |
@@ -62,6 +62,7 @@ struct module_exports exports = { |
62 | 62 |
0, /* module parameters */ |
63 | 63 |
0, /* exported statistics */ |
64 | 64 |
0, /* exported MI functions */ |
65 |
+ 0, /* exported pseudo-variables */ |
|
65 | 66 |
mod_init, /* module initialization function */ |
66 | 67 |
0, /* response function*/ |
67 | 68 |
0, /* destroy function */ |
... | ... |
@@ -126,6 +126,7 @@ struct module_exports exports= { |
126 | 126 |
params, /* exported parameters */ |
127 | 127 |
0, /* exported statistics */ |
128 | 128 |
0 , /* exported MI functions */ |
129 |
+ 0, /* exported pseudo-variables */ |
|
129 | 130 |
mod_init, /* module initialization function */ |
130 | 131 |
(response_function) 0, /* response handling function */ |
131 | 132 |
(destroy_function) destroy, /* destroy function */ |
... | ... |
@@ -186,6 +186,7 @@ struct module_exports exports = { |
186 | 186 |
params, /* Exported parameters */ |
187 | 187 |
0, /* exported statistics */ |
188 | 188 |
0, /* exported MI functions */ |
189 |
+ 0, /* exported pseudo-variables */ |
|
189 | 190 |
mod_init, /* module initialization function */ |
190 | 191 |
0, |
191 | 192 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -125,6 +125,7 @@ struct module_exports exports = { |
125 | 125 |
params, /* Exported parameters */ |
126 | 126 |
0, /* exported statistics */ |
127 | 127 |
0, /* exported MI functions */ |
128 |
+ 0, /* exported pseudo-variables */ |
|
128 | 129 |
mod_init, /* initialize module */ |
129 | 130 |
0, /* response function*/ |
130 | 131 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -161,6 +161,7 @@ struct module_exports exports = { |
161 | 161 |
0, /* exported statistics */ |
162 | 162 |
#endif |
163 | 163 |
mi_cmds, /* exported MI functions */ |
164 |
+ 0, /* exported pseudo-variables */ |
|
164 | 165 |
mod_init, /* module initialization function */ |
165 | 166 |
0, /* response function */ |
166 | 167 |
destroy, /* destroy function */ |
... | ... |
@@ -112,6 +112,7 @@ struct module_exports exports= { |
112 | 112 |
mod_params, /* param exports */ |
113 | 113 |
mod_stats, /* exported statistics */ |
114 | 114 |
0, /* exported MI functions */ |
115 |
+ 0, /* exported pseudo-variables */ |
|
115 | 116 |
mod_init, /* module initialization function */ |
116 | 117 |
0, /* reply processing function */ |
117 | 118 |
mod_destroy, |
... | ... |
@@ -107,6 +107,7 @@ struct module_exports exports= { |
107 | 107 |
params, |
108 | 108 |
0, /* exported statistics */ |
109 | 109 |
0, /* exported MI functions */ |
110 |
+ 0, /* exported pseudo-variables */ |
|
110 | 111 |
sms_init, /* module initialization function */ |
111 | 112 |
(response_function) 0, |
112 | 113 |
(destroy_function) sms_exit, /* module exit function */ |
... | ... |
@@ -100,6 +100,7 @@ struct module_exports exports = { |
100 | 100 |
params, /* Exported parameters */ |
101 | 101 |
0, /* exported statistics */ |
102 | 102 |
0, /* exported MI functions */ |
103 |
+ 0, /* exported pseudo-variables */ |
|
103 | 104 |
mod_init, /* module initialization function */ |
104 | 105 |
0, /* response function */ |
105 | 106 |
destroy, /* destroy function */ |
... | ... |
@@ -120,6 +120,7 @@ struct module_exports exports= { |
120 | 120 |
mod_params, /* param exports */ |
121 | 121 |
mod_stats, /* exported statistics */ |
122 | 122 |
0, /* exported MI functions */ |
123 |
+ 0, /* exported pseudo-variables */ |
|
123 | 124 |
mod_init, /* module initialization function */ |
124 | 125 |
0, /* reply processing function */ |
125 | 126 |
0, /* Destroy function */ |
... | ... |
@@ -67,6 +67,7 @@ struct module_exports exports= { |
67 | 67 |
mod_params, /* param exports */ |
68 | 68 |
0, /* exported statistics */ |
69 | 69 |
0, /* exported MI functions */ |
70 |
+ 0, /* exported pseudo-variables */ |
|
70 | 71 |
mod_init, /* module initialization function */ |
71 | 72 |
0, /* reply processing function */ |
72 | 73 |
0, /* module destroy function */ |
... | ... |
@@ -177,6 +177,7 @@ struct module_exports exports= { |
177 | 177 |
0, /* module parameters */ |
178 | 178 |
0, /* exported statistics */ |
179 | 179 |
0, /* exported MI functions */ |
180 |
+ 0, /* exported pseudo-variables */ |
|
180 | 181 |
mod_init, /* module initialization function */ |
181 | 182 |
0, /* response function */ |
182 | 183 |
0, /* destroy function */ |
... | ... |
@@ -3,9 +3,10 @@ |
3 | 3 |
* |
4 | 4 |
* TLS module - select interface |
5 | 5 |
* |
6 |
- * Copyright (C) 2001-2003 FhG FOKUS |
|
7 |
- * Copyright (C) 2004,2005 Free Software Foundation, Inc. |
|
8 |
- * Copyright (C) 2006 enum.at |
|
6 |
+ * Copyright (C) 2001-2003 FhG FOKUS |
|
7 |
+ * Copyright (C) 2004,2005 Free Software Foundation, Inc. |
|
8 |
+ * Copyright (C) 2005 iptelorg GmbH |
|
9 |
+ * Copyright (C) 2006 enum.at |
|
9 | 10 |
* |
10 | 11 |
* This file is part of openser, a free SIP server. |
11 | 12 |
* |
... | ... |
@@ -41,6 +41,7 @@ |
41 | 41 |
#include "../../tcp_conn.h" /* struct tcp_connection */ |
42 | 42 |
#include "../../tcp_server.h" /* tcpconn_get() */ |
43 | 43 |
#include "../../sr_module.h" |
44 |
+#include "../../items.h" |
|
44 | 45 |
|
45 | 46 |
MODULE_VERSION |
46 | 47 |
|
... | ... |
@@ -76,75 +77,126 @@ static param_export_t params[] = { |
76 | 77 |
/* |
77 | 78 |
* pseudo variables |
78 | 79 |
*/ |
79 |
-static pseudo_export_t pseudos[] = { |
|
80 |
+static item_export_t mod_items[] = { |
|
80 | 81 |
/* TLS session parameters */ |
81 |
- {"tls_version", tlsops_version , 0}, |
|
82 |
- {"tls_description", tlsops_desc , 0}, |
|
83 |
- {"tls_cipher_info", tlsops_cipher , 0}, |
|
84 |
- {"tls_cipher_bits", tlsops_bits , 0}, |
|
82 |
+ {"tls_version", tlsops_version, 0, |
|
83 |
+ {{0, 0}, 0} }, |
|
84 |
+ {"tls_description", tlsops_desc, 0, |
|
85 |
+ {{0, 0}, 0} }, |
|
86 |
+ {"tls_cipher_info", tlsops_cipher, 0, |
|
87 |
+ {{0, 0}, 0} }, |
|
88 |
+ {"tls_cipher_bits", tlsops_bits, 0, |
|
89 |
+ {{0, 0}, 0} }, |
|
85 | 90 |
/* general certificate parameters for peer and local */ |
86 |
- {"tls_peer_version", tlsops_cert_version, CERT_PEER }, |
|
87 |
- {"tls_my_version", tlsops_cert_version, CERT_LOCAL }, |
|
88 |
- {"tls_peer_serial", tlsops_sn, CERT_PEER }, |
|
89 |
- {"tls_my_serial", tlsops_sn, CERT_LOCAL }, |
|
91 |
+ {"tls_peer_version", tlsops_cert_version, 0, |
|
92 |
+ {{0, 0}, CERT_PEER} }, |
|
93 |
+ {"tls_my_version", tlsops_cert_version, 0, |
|
94 |
+ {{0, 0}, CERT_LOCAL} }, |
|
95 |
+ {"tls_peer_serial", tlsops_sn, 0, |
|
96 |
+ {{0, 0}, CERT_PEER} }, |
|
97 |
+ {"tls_my_serial", tlsops_sn, 0, |
|
98 |
+ {{0, 0}, CERT_LOCAL} }, |
|
90 | 99 |
/* certificate parameters for peer and local, for subject and issuer*/ |
91 |
- {"tls_peer_subject", tlsops_comp , CERT_PEER | CERT_SUBJECT }, |
|
92 |
- {"tls_peer_issuer", tlsops_comp , CERT_PEER | CERT_ISSUER }, |
|
93 |
- {"tls_my_subject", tlsops_comp , CERT_LOCAL | CERT_SUBJECT }, |
|
94 |
- {"tls_my_issuer", tlsops_comp , CERT_LOCAL | CERT_ISSUER }, |
|
95 |
- {"tls_peer_subject_cn", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_CN }, |
|
96 |
- {"tls_peer_issuer_cn", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_CN }, |
|
97 |
- {"tls_my_subject_cn", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_CN }, |
|
98 |
- {"tls_my_issuer_cn", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_CN }, |
|
99 |
- {"tls_peer_subject_locality", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_L }, |
|
100 |
- {"tls_peer_issuer_locality", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_L }, |
|
101 |
- {"tls_my_subject_locality", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_L }, |
|
102 |
- {"tls_my_issuer_locality", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_L }, |
|
103 |
- {"tls_peer_subject_country", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_C }, |
|
104 |
- {"tls_peer_issuer_country", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_C }, |
|
105 |
- {"tls_my_subject_country", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_C }, |
|
106 |
- {"tls_my_issuer_country", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_C }, |
|
107 |
- {"tls_peer_subject_state", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_ST }, |
|
108 |
- {"tls_peer_issuer_state", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_ST }, |
|
109 |
- {"tls_my_subject_state", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_ST }, |
|
110 |
- {"tls_my_issuer_state", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_ST }, |
|
111 |
- {"tls_peer_subject_organization", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_O }, |
|
112 |
- {"tls_peer_issuer_organization", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_O }, |
|
113 |
- {"tls_my_subject_organization", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_O }, |
|
114 |
- {"tls_my_issuer_organization", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_O }, |
|
115 |
- {"tls_peer_subject_unit", tlsops_comp , CERT_PEER | CERT_SUBJECT | COMP_OU }, |
|
116 |
- {"tls_peer_issuer_unit", tlsops_comp , CERT_PEER | CERT_ISSUER | COMP_OU }, |
|
117 |
- {"tls_my_subject_unit", tlsops_comp , CERT_LOCAL | CERT_SUBJECT | COMP_OU }, |
|
118 |
- {"tls_my_issuer_unit", tlsops_comp , CERT_LOCAL | CERT_ISSUER | COMP_OU }, |
|
100 |
+ {"tls_peer_subject", tlsops_comp, 0, |
|
101 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT} }, |
|
102 |
+ {"tls_peer_issuer", tlsops_comp, 0, |
|
103 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER} }, |
|
104 |
+ {"tls_my_subject", tlsops_comp, 0, |
|
105 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT} }, |
|
106 |
+ {"tls_my_issuer", tlsops_comp, 0, |
|
107 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER} }, |
|
108 |
+ {"tls_peer_subject_cn", tlsops_comp, 0, |
|
109 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_CN} }, |
|
110 |
+ {"tls_peer_issuer_cn", tlsops_comp, 0, |
|
111 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_CN} }, |
|
112 |
+ {"tls_my_subject_cn", tlsops_comp, 0, |
|
113 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_CN} }, |
|
114 |
+ {"tls_my_issuer_cn", tlsops_comp, 0, |
|
115 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_CN} }, |
|
116 |
+ {"tls_peer_subject_locality", tlsops_comp, 0, |
|
117 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_L} }, |
|
118 |
+ {"tls_peer_issuer_locality", tlsops_comp, 0, |
|
119 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_L} }, |
|
120 |
+ {"tls_my_subject_locality", tlsops_comp, 0, |
|
121 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_L} }, |
|
122 |
+ {"tls_my_issuer_locality", tlsops_comp, 0, |
|
123 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_L} }, |
|
124 |
+ {"tls_peer_subject_country", tlsops_comp, 0, |
|
125 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_C} }, |
|
126 |
+ {"tls_peer_issuer_country", tlsops_comp, 0, |
|
127 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_C} }, |
|
128 |
+ {"tls_my_subject_country", tlsops_comp, 0, |
|
129 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_C} }, |
|
130 |
+ {"tls_my_issuer_country", tlsops_comp, 0, |
|
131 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_C} }, |
|
132 |
+ {"tls_peer_subject_state", tlsops_comp, 0, |
|
133 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_ST} }, |
|
134 |
+ {"tls_peer_issuer_state", tlsops_comp, 0, |
|
135 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_ST} }, |
|
136 |
+ {"tls_my_subject_state", tlsops_comp, 0, |
|
137 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_ST} }, |
|
138 |
+ {"tls_my_issuer_state", tlsops_comp, 0, |
|
139 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_ST} }, |
|
140 |
+ {"tls_peer_subject_organization", tlsops_comp, 0, |
|
141 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_O} }, |
|
142 |
+ {"tls_peer_issuer_organization", tlsops_comp, 0, |
|
143 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_O} }, |
|
144 |
+ {"tls_my_subject_organization", tlsops_comp, 0, |
|
145 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_O} }, |
|
146 |
+ {"tls_my_issuer_organization", tlsops_comp, 0, |
|
147 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_O} }, |
|
148 |
+ {"tls_peer_subject_unit", tlsops_comp, 0, |
|
149 |
+ {{0, 0}, CERT_PEER | CERT_SUBJECT | COMP_OU} }, |
|
150 |
+ {"tls_peer_issuer_unit", tlsops_comp, 0, |
|
151 |
+ {{0, 0}, CERT_PEER | CERT_ISSUER | COMP_OU} }, |
|
152 |
+ {"tls_my_subject_unit", tlsops_comp, 0, |
|
153 |
+ {{0, 0}, CERT_LOCAL | CERT_SUBJECT | COMP_OU} }, |
|
154 |
+ {"tls_my_issuer_unit", tlsops_comp, 0, |
|
155 |
+ {{0, 0}, CERT_LOCAL | CERT_ISSUER | COMP_OU} }, |
|
119 | 156 |
/* subject alternative name parameters for peer and local */ |
120 |
- {"tls_peer_san_email", tlsops_alt, CERT_PEER | COMP_E }, |
|
121 |
- {"tls_my_san_email", tlsops_alt, CERT_LOCAL | COMP_E }, |
|
122 |
- {"tls_peer_san_hostname", tlsops_alt, CERT_PEER | COMP_HOST }, |
|
123 |
- {"tls_my_san_hostname", tlsops_alt, CERT_LOCAL | COMP_HOST }, |
|
124 |
- {"tls_peer_san_uri", tlsops_alt, CERT_PEER | COMP_URI }, |
|
125 |
- {"tls_my_san_uri", tlsops_alt, CERT_LOCAL | COMP_URI }, |
|
126 |
- {"tls_peer_san_ip", tlsops_alt, CERT_PEER | COMP_IP }, |
|
127 |
- {"tls_my_san_ip", tlsops_alt, CERT_LOCAL | COMP_IP }, |
|
157 |
+ {"tls_peer_san_email", tlsops_alt, 0, |
|
158 |
+ {{0, 0}, CERT_PEER | COMP_E} }, |
|
159 |
+ {"tls_my_san_email", tlsops_alt, 0, |
|
160 |
+ {{0, 0}, CERT_LOCAL | COMP_E} }, |
|
161 |
+ {"tls_peer_san_hostname", tlsops_alt, 0, |
|
162 |
+ {{0, 0}, CERT_PEER | COMP_HOST} }, |
|
163 |
+ {"tls_my_san_hostname", tlsops_alt, 0, |
|
164 |
+ {{0, 0}, CERT_LOCAL | COMP_HOST} }, |
|
165 |
+ {"tls_peer_san_uri", tlsops_alt, 0, |
|
166 |
+ {{0, 0}, CERT_PEER | COMP_URI} }, |
|
167 |
+ {"tls_my_san_uri", tlsops_alt, 0, |
|
168 |
+ {{0, 0}, CERT_LOCAL | COMP_URI} }, |
|
169 |
+ {"tls_peer_san_ip", tlsops_alt, 0, |
|
170 |
+ {{0, 0}, CERT_PEER | COMP_IP} }, |
|
171 |
+ {"tls_my_san_ip", tlsops_alt, 0, |
|
172 |
+ {{0, 0}, CERT_LOCAL | COMP_IP} }, |
|
128 | 173 |
/* peer certificate validation parameters */ |
129 |
- {"tls_peer_verified", tlsops_check_cert, CERT_VERIFIED }, |
|
130 |
- {"tls_peer_revoked", tlsops_check_cert, CERT_REVOKED }, |
|
131 |
- {"tls_peer_expired", tlsops_check_cert, CERT_EXPIRED }, |
|
132 |
- {"tls_peer_selfsigned", tlsops_check_cert, CERT_SELFSIGNED }, |
|
133 |
- {"tls_peer_notBefore", tlsops_validity, CERT_NOTBEFORE }, |
|
134 |
- {"tls_peer_notAfter", tlsops_validity, CERT_NOTAFTER }, |
|
174 |
+ {"tls_peer_verified", tlsops_check_cert, 0, |
|
175 |
+ {{0, 0}, CERT_VERIFIED} }, |
|
176 |
+ {"tls_peer_revoked", tlsops_check_cert, 0, |
|
177 |
+ {{0, 0}, CERT_REVOKED} }, |
|
178 |
+ {"tls_peer_expired", tlsops_check_cert, 0, |
|
179 |
+ {{0, 0}, CERT_EXPIRED} }, |
|
180 |
+ {"tls_peer_selfsigned", tlsops_check_cert, 0, |
|
181 |
+ {{0, 0}, CERT_SELFSIGNED} }, |
|
182 |
+ {"tls_peer_notBefore", tlsops_validity, 0, |
|
183 |
+ {{0, 0}, CERT_NOTBEFORE} }, |
|
184 |
+ {"tls_peer_notAfter", tlsops_validity, 0, |
|
185 |
+ {{0, 0}, CERT_NOTAFTER} }, |
|
135 | 186 |
|
136 |
- {0,0,0} |
|
187 |
+ {0,0,0,{{0, 0},0}} |
|
137 | 188 |
}; |
138 | 189 |
|
139 | 190 |
/* |
140 | 191 |
* Module interface |
141 | 192 |
*/ |
142 | 193 |
struct module_exports exports = { |
143 |
- "tls", |
|
194 |
+ "tlsops", |
|
144 | 195 |
cmds, /* Exported functions */ |
145 | 196 |
params, /* Exported parameters */ |
146 | 197 |
0, /* exported statistics */ |
147 | 198 |
0, /* exported MI functions */ |
199 |
+ mod_items, /* exported pseudo-variables */ |
|
148 | 200 |
mod_init, /* module initialization function */ |
149 | 201 |
0, /* response function */ |
150 | 202 |
mod_destroy, /* destroy function */ |
... | ... |
@@ -153,22 +205,8 @@ struct module_exports exports = { |
153 | 205 |
|
154 | 206 |
static int mod_init(void) |
155 | 207 |
{ |
156 |
- pseudo_export_t *pseudo; |
|
157 | 208 |
DBG("%s module - initializing...\n", exports.name); |
158 | 209 |
|
159 |
- pseudo = &pseudos[0]; |
|
160 |
- while (pseudo->name) { |
|
161 |
- xl_param_t param; |
|
162 |
- param.ind = pseudo->flags; |
|
163 |
- if(xl_add_extra(pseudo->name, pseudo->function, 0, ¶m)!=0) { |
|
164 |
- LOG(L_ERR,"ERROR:tlsops:mod_init: failed to register pvar '%s'\n", |
|
165 |
- pseudo->name); |
|
166 |
- return -1; |
|
167 |
- } |
|
168 |
- pseudo++; |
|
169 |
- } |
|
170 |
- |
|
171 |
- DBG("%s module - initializing...done\n", exports.name); |
|
172 | 210 |
return 0; |
173 | 211 |
} |
174 | 212 |
|
... | ... |
@@ -176,7 +214,6 @@ static int mod_init(void) |
176 | 214 |
static void mod_destroy(void) |
177 | 215 |
{ |
178 | 216 |
DBG("%s module - shutting down...\n", exports.name); |
179 |
- DBG("%s module - shutting down...done\n", exports.name); |
|
180 | 217 |
} |
181 | 218 |
|
182 | 219 |
|
... | ... |
@@ -26,15 +26,4 @@ |
26 | 26 |
#include "../../parser/msg_parser.h" |
27 | 27 |
#include "tls_select.h" |
28 | 28 |
|
29 |
-typedef int (*pseudo_function)(struct sip_msg *msg, xl_value_t *res, xl_param_t *param, int flags); |
|
30 |
- |
|
31 |
- |
|
32 |
-struct pseudo_export_ { |
|
33 |
- char *name; |
|
34 |
- pseudo_function function; |
|
35 |
- int flags; |
|
36 |
-}; |
|
37 |
- |
|
38 |
-typedef struct pseudo_export_ pseudo_export_t; |
|
39 |
- |
|
40 | 29 |
#endif |
... | ... |
@@ -243,6 +243,17 @@ stat_export_t mod_stats[] = { |
243 | 243 |
}; |
244 | 244 |
|
245 | 245 |
|
246 |
+/** |
|
247 |
+ * pseudo-variables exported by TM module |
|
248 |
+ * { name, function, type, xl_param_t} |
|
249 |
+ * type: can be 0 if you do not want to use it in identifying the PV |
|
250 |
+ * xl_param_t: is given as parameter to 'function' |
|
251 |
+ */ |
|
252 |
+item_export_t mod_items[] = { |
|
253 |
+ { "T_branch_idx", it_get_tm_branch_idx, 100, {{0, 0}, 0} }, |
|
254 |
+ { 0, 0, 0, {{0, 0}, 0} } |
|
255 |
+}; |
|
256 |
+ |
|
246 | 257 |
#ifdef STATIC_TM |
247 | 258 |
struct module_exports tm_exports = { |
248 | 259 |
#else |
... | ... |
@@ -253,6 +264,7 @@ struct module_exports exports= { |
253 | 264 |
params, /* exported variables */ |
254 | 265 |
mod_stats, /* exported statistics */ |
255 | 266 |
0, /* exported MI functions */ |
267 |
+ mod_items, /* exported pseudo-variables */ |
|
256 | 268 |
mod_init, /* module initialization function */ |
257 | 269 |
(response_function) reply_received, |
258 | 270 |
(destroy_function) tm_shutdown, |
... | ... |
@@ -630,12 +642,6 @@ static int mod_init(void) |
630 | 642 |
return -1; |
631 | 643 |
} |
632 | 644 |
|
633 |
- if(xl_add_extra("T_branch_idx", it_get_tm_branch_idx, 100, NULL)!=0) |
|
634 |
- { |
|
635 |
- LOG(L_ERR,"ERROR:tm:mod_init: failed to register pvar " |
|
636 |
- "[T_branch_idx]\n"); |
|
637 |
- return -1; |
|
638 |
- } |
|
639 | 645 |
return 0; |
640 | 646 |
} |
641 | 647 |
|
... | ... |
@@ -113,6 +113,7 @@ struct module_exports exports= { |
113 | 113 |
params, /* param exports */ |
114 | 114 |
0, /* exported statistics */ |
115 | 115 |
0, /* exported MI functions */ |
116 |
+ 0, /* exported pseudo-variables */ |
|
116 | 117 |
mod_init, /* module initialization function */ |
117 | 118 |
(response_function) 0, |
118 | 119 |
mod_destroy, |
... | ... |
@@ -95,6 +95,7 @@ struct module_exports exports = { |
95 | 95 |
params, /* Exported parameters */ |
96 | 96 |
0, /* exported statistics */ |
97 | 97 |
0, /* exported MI functions */ |
98 |
+ 0, /* exported pseudo-variables */ |
|
98 | 99 |
redirect_init, /* Module initialization function */ |
99 | 100 |
(response_function) 0, |
100 | 101 |
(destroy_function) 0, |
... | ... |
@@ -71,6 +71,7 @@ struct module_exports exports = { |
71 | 71 |
params, /* module parameters */ |
72 | 72 |
0, /* exported statistics */ |
73 | 73 |
0, /* exported MI functions */ |
74 |
+ 0, /* exported pseudo-variables */ |
|
74 | 75 |
0, /* module initialization function */ |
75 | 76 |
0, /* response function*/ |
76 | 77 |
0, /* destroy function */ |
... | ... |
@@ -86,6 +86,7 @@ struct module_exports exports = { |
86 | 86 |
params, /* Exported parameters */ |
87 | 87 |
0, /* exported statistics */ |
88 | 88 |
0, /* exported MI functions */ |
89 |
+ 0, /* exported pseudo-variables */ |
|
89 | 90 |
0, /* module initialization function */ |
90 | 91 |
0, /* response function */ |
91 | 92 |
0, /* destroy function */ |
... | ... |
@@ -135,6 +135,7 @@ struct module_exports exports = { |
135 | 135 |
params, /* Exported parameters */ |
136 | 136 |
0, /* exported statistics */ |
137 | 137 |
0 , /* exported MI functions */ |
138 |
+ 0, /* exported pseudo-variables */ |
|
138 | 139 |
mod_init, /* module initialization function */ |
139 | 140 |
0, /* response function */ |
140 | 141 |
destroy, /* destroy function */ |
... | ... |
@@ -79,6 +79,7 @@ struct module_exports exports = { |
79 | 79 |
params, /* Exported parameters */ |
80 | 80 |
0, /* exported statistics */ |
81 | 81 |
0, /* exported MI functions */ |
82 |
+ 0, /* exported pseudo-variables */ |
|
82 | 83 |
mod_init, /* module initialization function */ |
83 | 84 |
0, /* response function */ |
84 | 85 |
0, /* destroy function */ |
... | ... |
@@ -190,6 +190,7 @@ struct module_exports exports = { |
190 | 190 |
params, /* Export parameters */ |
191 | 191 |
0, /* exported statistics */ |
192 | 192 |
0, /* exported MI functions */ |
193 |
+ 0, /* exported pseudo-variables */ |
|
193 | 194 |
mod_init, /* Module initialization function */ |
194 | 195 |
0, /* Response function */ |
195 | 196 |
destroy, /* Destroy function */ |
... | ... |
@@ -83,6 +83,7 @@ struct module_exports exports= { |
83 | 83 |
params, |
84 | 84 |
0, /* exported statistics */ |
85 | 85 |
0 , /* exported MI functions */ |
86 |
+ 0, /* exported pseudo-variables */ |
|
86 | 87 |
mod_init, /* module initialization function */ |
87 | 88 |
(response_function) 0, |
88 | 89 |
(destroy_function) destroy, |
... | ... |
@@ -160,6 +160,7 @@ struct module_exports exports = { |
160 | 160 |
params, /* Exported parameters */ |
161 | 161 |
0, /* exported statistics */ |
162 | 162 |
0, /* exported MI functions */ |
163 |
+ 0, /* exported pseudo-variables */ |
|
163 | 164 |
mod_init, /* Initialization function */ |
164 | 165 |
0, /* Response function */ |
165 | 166 |
destroy, /* Destroy function */ |