@gjsify/tls-native 0.4.30 → 0.4.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/esm/index.gjs.spec.js +1 -1
- package/lib/esm/index.js +1 -1
- package/lib/types/index.d.ts +95 -0
- package/meson.build +13 -1
- package/package.json +3 -3
- package/prebuilds/linux-aarch64/GjsifyTls-1.0.gir +122 -0
- package/prebuilds/linux-aarch64/GjsifyTls-1.0.typelib +0 -0
- package/prebuilds/linux-aarch64/libgjsifytls.so +0 -0
- package/prebuilds/linux-ppc64/GjsifyTls-1.0.gir +122 -0
- package/prebuilds/linux-ppc64/GjsifyTls-1.0.typelib +0 -0
- package/prebuilds/linux-ppc64/libgjsifytls.so +0 -0
- package/prebuilds/linux-riscv64/GjsifyTls-1.0.gir +122 -0
- package/prebuilds/linux-riscv64/GjsifyTls-1.0.typelib +0 -0
- package/prebuilds/linux-riscv64/libgjsifytls.so +0 -0
- package/prebuilds/linux-s390x/GjsifyTls-1.0.gir +122 -0
- package/prebuilds/linux-s390x/GjsifyTls-1.0.typelib +0 -0
- package/prebuilds/linux-s390x/libgjsifytls.so +0 -0
- package/prebuilds/linux-x86_64/GjsifyTls-1.0.gir +122 -0
- package/prebuilds/linux-x86_64/GjsifyTls-1.0.typelib +0 -0
- package/prebuilds/linux-x86_64/libgjsifytls.so +0 -0
- package/src/vala/gnutls-session.vapi +54 -0
- package/src/vala/session-access.vala +344 -0
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
<!-- GjsifyTls-1.0.gir generated by valac 0.56.19, do not modify. -->
|
|
3
3
|
<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:doc="http://www.gtk.org/introspection/doc/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
|
|
4
4
|
<include name="GObject" version="2.0"/>
|
|
5
|
+
<include name="Gio" version="2.0"/>
|
|
6
|
+
<include name="GLib" version="2.0"/>
|
|
5
7
|
<package name="gjsifytls"/>
|
|
6
8
|
<c:include name="gjsifytls.h"/>
|
|
7
9
|
<doc:format name="unknown"/>
|
|
8
10
|
<namespace name="GjsifyTls" version="1.0" shared-library="libgjsifytls.so" c:prefix="GjsifyTls" c:identifier-prefixes="GjsifyTls" c:symbol-prefixes="gjsify_tls">
|
|
11
|
+
<enumeration name="ChannelBindingType" c:type="GjsifyTlsChannelBindingType" glib:type-name="GjsifyTlsChannelBindingType" glib:get-type="gjsify_tls_channel_binding_type_get_type">
|
|
12
|
+
<member name="tls_unique" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_UNIQUE" value="0"/>
|
|
13
|
+
<member name="tls_server_end_point" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_SERVER_END_POINT" value="1"/>
|
|
14
|
+
<member name="tls_exporter" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_EXPORTER" value="2"/>
|
|
15
|
+
</enumeration>
|
|
16
|
+
<enumeration name="SessionAccessError" c:type="GjsifyTlsSessionAccessError" glib:type-name="GjsifyTlsSessionAccessError" glib:get-type="gjsify_tls_session_access_error_get_type" glib:error-domain="gjsify-tls-session-access-error-quark">
|
|
17
|
+
<member name="not_supported" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_NOT_SUPPORTED" value="0"/>
|
|
18
|
+
<member name="not_ready" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_NOT_READY" value="1"/>
|
|
19
|
+
<member name="gnutls_error" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_GNUTLS_ERROR" value="2"/>
|
|
20
|
+
</enumeration>
|
|
9
21
|
<class name="OcspResponseInfo" c:type="GjsifyTlsOcspResponseInfo" c:symbol-prefix="ocsp_response_info" glib:type-name="GjsifyTlsOcspResponseInfo" glib:get-type="gjsify_tls_ocsp_response_info_get_type" glib:type-struct="OcspResponseInfoClass" parent="GObject.Object">
|
|
10
22
|
<field name="parent_instance" readable="0" private="1">
|
|
11
23
|
<type name="GObject.Object" c:type="GObject"/>
|
|
@@ -150,5 +162,115 @@
|
|
|
150
162
|
</field>
|
|
151
163
|
</record>
|
|
152
164
|
<record name="TlsPrivate" c:type="GjsifyTlsTlsPrivate" disguised="1"/>
|
|
165
|
+
<class name="SessionAccess" c:type="GjsifyTlsSessionAccess" c:symbol-prefix="session_access" glib:type-name="GjsifyTlsSessionAccess" glib:get-type="gjsify_tls_session_access_get_type" glib:type-struct="SessionAccessClass" parent="GObject.Object">
|
|
166
|
+
<field name="parent_instance" readable="0" private="1">
|
|
167
|
+
<type name="GObject.Object" c:type="GObject"/>
|
|
168
|
+
</field>
|
|
169
|
+
<field name="priv" readable="0" private="1">
|
|
170
|
+
<type name="SessionAccessPrivate" c:type="GjsifyTlsSessionAccessPrivate*"/>
|
|
171
|
+
</field>
|
|
172
|
+
<function name="is_supported" c:identifier="gjsify_tls_session_access_is_supported">
|
|
173
|
+
<return-value transfer-ownership="full">
|
|
174
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
175
|
+
</return-value>
|
|
176
|
+
</function>
|
|
177
|
+
<function name="for_connection" c:identifier="gjsify_tls_session_access_for_connection">
|
|
178
|
+
<return-value transfer-ownership="full" nullable="1">
|
|
179
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
180
|
+
</return-value>
|
|
181
|
+
<parameters>
|
|
182
|
+
<parameter name="connection" transfer-ownership="none" nullable="1">
|
|
183
|
+
<type name="Gio.TlsConnection" c:type="GTlsConnection*"/>
|
|
184
|
+
</parameter>
|
|
185
|
+
</parameters>
|
|
186
|
+
</function>
|
|
187
|
+
<method name="is_session_reused" c:identifier="gjsify_tls_session_access_is_session_reused" throws="1">
|
|
188
|
+
<return-value transfer-ownership="full">
|
|
189
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
190
|
+
</return-value>
|
|
191
|
+
<parameters>
|
|
192
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
193
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
194
|
+
</instance-parameter>
|
|
195
|
+
</parameters>
|
|
196
|
+
</method>
|
|
197
|
+
<method name="get_session_data" c:identifier="gjsify_tls_session_access_get_session_data" throws="1">
|
|
198
|
+
<return-value transfer-ownership="full">
|
|
199
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
200
|
+
</return-value>
|
|
201
|
+
<parameters>
|
|
202
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
203
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
204
|
+
</instance-parameter>
|
|
205
|
+
</parameters>
|
|
206
|
+
</method>
|
|
207
|
+
<method name="set_session_data" c:identifier="gjsify_tls_session_access_set_session_data" throws="1">
|
|
208
|
+
<return-value transfer-ownership="full">
|
|
209
|
+
<type name="none" c:type="void"/>
|
|
210
|
+
</return-value>
|
|
211
|
+
<parameters>
|
|
212
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
213
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
214
|
+
</instance-parameter>
|
|
215
|
+
<parameter name="data" transfer-ownership="none">
|
|
216
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
217
|
+
</parameter>
|
|
218
|
+
</parameters>
|
|
219
|
+
</method>
|
|
220
|
+
<method name="get_channel_binding" c:identifier="gjsify_tls_session_access_get_channel_binding" throws="1">
|
|
221
|
+
<return-value transfer-ownership="full">
|
|
222
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
223
|
+
</return-value>
|
|
224
|
+
<parameters>
|
|
225
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
226
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
227
|
+
</instance-parameter>
|
|
228
|
+
<parameter name="binding" transfer-ownership="none">
|
|
229
|
+
<type name="GjsifyTls.ChannelBindingType" c:type="GjsifyTlsChannelBindingType"/>
|
|
230
|
+
</parameter>
|
|
231
|
+
</parameters>
|
|
232
|
+
</method>
|
|
233
|
+
<method name="get_finished" c:identifier="gjsify_tls_session_access_get_finished" throws="1">
|
|
234
|
+
<return-value transfer-ownership="full">
|
|
235
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
236
|
+
</return-value>
|
|
237
|
+
<parameters>
|
|
238
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
239
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
240
|
+
</instance-parameter>
|
|
241
|
+
</parameters>
|
|
242
|
+
</method>
|
|
243
|
+
<method name="get_peer_finished" c:identifier="gjsify_tls_session_access_get_peer_finished" throws="1">
|
|
244
|
+
<return-value transfer-ownership="full">
|
|
245
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
246
|
+
</return-value>
|
|
247
|
+
<parameters>
|
|
248
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
249
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
250
|
+
</instance-parameter>
|
|
251
|
+
</parameters>
|
|
252
|
+
</method>
|
|
253
|
+
<method name="get_negotiated_protocol_version" c:identifier="gjsify_tls_session_access_get_negotiated_protocol_version">
|
|
254
|
+
<return-value transfer-ownership="full">
|
|
255
|
+
<type name="utf8" c:type="gchar*"/>
|
|
256
|
+
</return-value>
|
|
257
|
+
<parameters>
|
|
258
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
259
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
260
|
+
</instance-parameter>
|
|
261
|
+
</parameters>
|
|
262
|
+
</method>
|
|
263
|
+
<constructor name="new" c:identifier="gjsify_tls_session_access_new">
|
|
264
|
+
<return-value transfer-ownership="full">
|
|
265
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
266
|
+
</return-value>
|
|
267
|
+
</constructor>
|
|
268
|
+
</class>
|
|
269
|
+
<record name="SessionAccessClass" c:type="GjsifyTlsSessionAccessClass" glib:is-gtype-struct-for="SessionAccess">
|
|
270
|
+
<field name="parent_class" readable="0" private="1">
|
|
271
|
+
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
272
|
+
</field>
|
|
273
|
+
</record>
|
|
274
|
+
<record name="SessionAccessPrivate" c:type="GjsifyTlsSessionAccessPrivate" disguised="1"/>
|
|
153
275
|
</namespace>
|
|
154
276
|
</repository>
|
|
Binary file
|
|
Binary file
|
|
@@ -2,10 +2,22 @@
|
|
|
2
2
|
<!-- GjsifyTls-1.0.gir generated by valac 0.56.19, do not modify. -->
|
|
3
3
|
<repository version="1.2" xmlns="http://www.gtk.org/introspection/core/1.0" xmlns:c="http://www.gtk.org/introspection/c/1.0" xmlns:doc="http://www.gtk.org/introspection/doc/1.0" xmlns:glib="http://www.gtk.org/introspection/glib/1.0">
|
|
4
4
|
<include name="GObject" version="2.0"/>
|
|
5
|
+
<include name="Gio" version="2.0"/>
|
|
6
|
+
<include name="GLib" version="2.0"/>
|
|
5
7
|
<package name="gjsifytls"/>
|
|
6
8
|
<c:include name="gjsifytls.h"/>
|
|
7
9
|
<doc:format name="unknown"/>
|
|
8
10
|
<namespace name="GjsifyTls" version="1.0" shared-library="libgjsifytls.so" c:prefix="GjsifyTls" c:identifier-prefixes="GjsifyTls" c:symbol-prefixes="gjsify_tls">
|
|
11
|
+
<enumeration name="ChannelBindingType" c:type="GjsifyTlsChannelBindingType" glib:type-name="GjsifyTlsChannelBindingType" glib:get-type="gjsify_tls_channel_binding_type_get_type">
|
|
12
|
+
<member name="tls_unique" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_UNIQUE" value="0"/>
|
|
13
|
+
<member name="tls_server_end_point" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_SERVER_END_POINT" value="1"/>
|
|
14
|
+
<member name="tls_exporter" c:identifier="GJSIFY_TLS_CHANNEL_BINDING_TYPE_TLS_EXPORTER" value="2"/>
|
|
15
|
+
</enumeration>
|
|
16
|
+
<enumeration name="SessionAccessError" c:type="GjsifyTlsSessionAccessError" glib:type-name="GjsifyTlsSessionAccessError" glib:get-type="gjsify_tls_session_access_error_get_type" glib:error-domain="gjsify-tls-session-access-error-quark">
|
|
17
|
+
<member name="not_supported" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_NOT_SUPPORTED" value="0"/>
|
|
18
|
+
<member name="not_ready" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_NOT_READY" value="1"/>
|
|
19
|
+
<member name="gnutls_error" c:identifier="GJSIFY_TLS_SESSION_ACCESS_ERROR_GNUTLS_ERROR" value="2"/>
|
|
20
|
+
</enumeration>
|
|
9
21
|
<class name="OcspResponseInfo" c:type="GjsifyTlsOcspResponseInfo" c:symbol-prefix="ocsp_response_info" glib:type-name="GjsifyTlsOcspResponseInfo" glib:get-type="gjsify_tls_ocsp_response_info_get_type" glib:type-struct="OcspResponseInfoClass" parent="GObject.Object">
|
|
10
22
|
<field name="parent_instance" readable="0" private="1">
|
|
11
23
|
<type name="GObject.Object" c:type="GObject"/>
|
|
@@ -150,5 +162,115 @@
|
|
|
150
162
|
</field>
|
|
151
163
|
</record>
|
|
152
164
|
<record name="TlsPrivate" c:type="GjsifyTlsTlsPrivate" disguised="1"/>
|
|
165
|
+
<class name="SessionAccess" c:type="GjsifyTlsSessionAccess" c:symbol-prefix="session_access" glib:type-name="GjsifyTlsSessionAccess" glib:get-type="gjsify_tls_session_access_get_type" glib:type-struct="SessionAccessClass" parent="GObject.Object">
|
|
166
|
+
<field name="parent_instance" readable="0" private="1">
|
|
167
|
+
<type name="GObject.Object" c:type="GObject"/>
|
|
168
|
+
</field>
|
|
169
|
+
<field name="priv" readable="0" private="1">
|
|
170
|
+
<type name="SessionAccessPrivate" c:type="GjsifyTlsSessionAccessPrivate*"/>
|
|
171
|
+
</field>
|
|
172
|
+
<function name="is_supported" c:identifier="gjsify_tls_session_access_is_supported">
|
|
173
|
+
<return-value transfer-ownership="full">
|
|
174
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
175
|
+
</return-value>
|
|
176
|
+
</function>
|
|
177
|
+
<function name="for_connection" c:identifier="gjsify_tls_session_access_for_connection">
|
|
178
|
+
<return-value transfer-ownership="full" nullable="1">
|
|
179
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
180
|
+
</return-value>
|
|
181
|
+
<parameters>
|
|
182
|
+
<parameter name="connection" transfer-ownership="none" nullable="1">
|
|
183
|
+
<type name="Gio.TlsConnection" c:type="GTlsConnection*"/>
|
|
184
|
+
</parameter>
|
|
185
|
+
</parameters>
|
|
186
|
+
</function>
|
|
187
|
+
<method name="is_session_reused" c:identifier="gjsify_tls_session_access_is_session_reused" throws="1">
|
|
188
|
+
<return-value transfer-ownership="full">
|
|
189
|
+
<type name="gboolean" c:type="gboolean"/>
|
|
190
|
+
</return-value>
|
|
191
|
+
<parameters>
|
|
192
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
193
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
194
|
+
</instance-parameter>
|
|
195
|
+
</parameters>
|
|
196
|
+
</method>
|
|
197
|
+
<method name="get_session_data" c:identifier="gjsify_tls_session_access_get_session_data" throws="1">
|
|
198
|
+
<return-value transfer-ownership="full">
|
|
199
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
200
|
+
</return-value>
|
|
201
|
+
<parameters>
|
|
202
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
203
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
204
|
+
</instance-parameter>
|
|
205
|
+
</parameters>
|
|
206
|
+
</method>
|
|
207
|
+
<method name="set_session_data" c:identifier="gjsify_tls_session_access_set_session_data" throws="1">
|
|
208
|
+
<return-value transfer-ownership="full">
|
|
209
|
+
<type name="none" c:type="void"/>
|
|
210
|
+
</return-value>
|
|
211
|
+
<parameters>
|
|
212
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
213
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
214
|
+
</instance-parameter>
|
|
215
|
+
<parameter name="data" transfer-ownership="none">
|
|
216
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
217
|
+
</parameter>
|
|
218
|
+
</parameters>
|
|
219
|
+
</method>
|
|
220
|
+
<method name="get_channel_binding" c:identifier="gjsify_tls_session_access_get_channel_binding" throws="1">
|
|
221
|
+
<return-value transfer-ownership="full">
|
|
222
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
223
|
+
</return-value>
|
|
224
|
+
<parameters>
|
|
225
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
226
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
227
|
+
</instance-parameter>
|
|
228
|
+
<parameter name="binding" transfer-ownership="none">
|
|
229
|
+
<type name="GjsifyTls.ChannelBindingType" c:type="GjsifyTlsChannelBindingType"/>
|
|
230
|
+
</parameter>
|
|
231
|
+
</parameters>
|
|
232
|
+
</method>
|
|
233
|
+
<method name="get_finished" c:identifier="gjsify_tls_session_access_get_finished" throws="1">
|
|
234
|
+
<return-value transfer-ownership="full">
|
|
235
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
236
|
+
</return-value>
|
|
237
|
+
<parameters>
|
|
238
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
239
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
240
|
+
</instance-parameter>
|
|
241
|
+
</parameters>
|
|
242
|
+
</method>
|
|
243
|
+
<method name="get_peer_finished" c:identifier="gjsify_tls_session_access_get_peer_finished" throws="1">
|
|
244
|
+
<return-value transfer-ownership="full">
|
|
245
|
+
<type name="GLib.Bytes" c:type="GBytes*"/>
|
|
246
|
+
</return-value>
|
|
247
|
+
<parameters>
|
|
248
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
249
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
250
|
+
</instance-parameter>
|
|
251
|
+
</parameters>
|
|
252
|
+
</method>
|
|
253
|
+
<method name="get_negotiated_protocol_version" c:identifier="gjsify_tls_session_access_get_negotiated_protocol_version">
|
|
254
|
+
<return-value transfer-ownership="full">
|
|
255
|
+
<type name="utf8" c:type="gchar*"/>
|
|
256
|
+
</return-value>
|
|
257
|
+
<parameters>
|
|
258
|
+
<instance-parameter name="self" transfer-ownership="none">
|
|
259
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
260
|
+
</instance-parameter>
|
|
261
|
+
</parameters>
|
|
262
|
+
</method>
|
|
263
|
+
<constructor name="new" c:identifier="gjsify_tls_session_access_new">
|
|
264
|
+
<return-value transfer-ownership="full">
|
|
265
|
+
<type name="GjsifyTls.SessionAccess" c:type="GjsifyTlsSessionAccess*"/>
|
|
266
|
+
</return-value>
|
|
267
|
+
</constructor>
|
|
268
|
+
</class>
|
|
269
|
+
<record name="SessionAccessClass" c:type="GjsifyTlsSessionAccessClass" glib:is-gtype-struct-for="SessionAccess">
|
|
270
|
+
<field name="parent_class" readable="0" private="1">
|
|
271
|
+
<type name="GObject.ObjectClass" c:type="GObjectClass"/>
|
|
272
|
+
</field>
|
|
273
|
+
</record>
|
|
274
|
+
<record name="SessionAccessPrivate" c:type="GjsifyTlsSessionAccessPrivate" disguised="1"/>
|
|
153
275
|
</namespace>
|
|
154
276
|
</repository>
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/* gnutls-session.vapi — Vala 0.56's bundled gnutls.vapi covers most
|
|
2
|
+
* of the session API (set_data / get_data / get_data2 / is_resumed),
|
|
3
|
+
* but `gnutls_session_channel_binding` is missing. This sibling vapi
|
|
4
|
+
* fills that gap.
|
|
5
|
+
*
|
|
6
|
+
* Same `.vapi` (vs `.vala`) reasoning as `gnutls-ocsp.vapi`: putting
|
|
7
|
+
* `[CCode (cname = "struct …")]` bindings in a `.vala` file makes valac
|
|
8
|
+
* try to *emit* the typedef, which collides with the typedef already
|
|
9
|
+
* present in `gnutls/gnutls.h`. `.vapi` declarations are pure
|
|
10
|
+
* mappings — no code emission.
|
|
11
|
+
*
|
|
12
|
+
* Loaded via meson's `vala_args: ['--vapidir=<srcdir>/src/vala']`.
|
|
13
|
+
*
|
|
14
|
+
* Used by: `session-access.vala` for the `tls-unique` / `tls-exporter`
|
|
15
|
+
* channel-binding extraction required by SCRAM-SHA-* SASL (RFC 5929,
|
|
16
|
+
* RFC 9266).
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
[CCode (cheader_filename = "gnutls/gnutls.h", cprefix = "GNUTLS_CB_")]
|
|
20
|
+
namespace GjsifyTlsSession {
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Channel-binding type per RFC 5929 §4 + RFC 9266.
|
|
24
|
+
*
|
|
25
|
+
* GnuTLS exposes this enum as `gnutls_channel_binding_t`.
|
|
26
|
+
*/
|
|
27
|
+
[CCode (cname = "gnutls_channel_binding_t", has_type_id = false)]
|
|
28
|
+
public enum ChannelBinding {
|
|
29
|
+
/** `tls-unique` (RFC 5929 §3) — TLS 1.0–1.2 only. The first
|
|
30
|
+
* Finished message bytes from the handshake. */
|
|
31
|
+
[CCode (cname = "GNUTLS_CB_TLS_UNIQUE")]
|
|
32
|
+
TLS_UNIQUE,
|
|
33
|
+
/** `tls-server-end-point` (RFC 5929 §4) — hash of the server cert. */
|
|
34
|
+
[CCode (cname = "GNUTLS_CB_TLS_SERVER_END_POINT")]
|
|
35
|
+
TLS_SERVER_END_POINT,
|
|
36
|
+
/** `tls-exporter` (RFC 9266) — TLS 1.3 replacement for `tls-unique`. */
|
|
37
|
+
[CCode (cname = "GNUTLS_CB_TLS_EXPORTER")]
|
|
38
|
+
TLS_EXPORTER,
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* `gnutls_session_channel_binding(session, cbtype, &cb)` — extract
|
|
43
|
+
* the negotiated channel-binding bytes from a live session.
|
|
44
|
+
*
|
|
45
|
+
* @session raw `gnutls_session_t` pointer (opaque to Vala)
|
|
46
|
+
* @cbtype one of the {@link ChannelBinding} values
|
|
47
|
+
* @cb out: filled with the channel-binding bytes
|
|
48
|
+
* @returns 0 on success, a GnuTLS error code on failure (e.g.
|
|
49
|
+
* `GNUTLS_E_INVALID_REQUEST` for a binding type that
|
|
50
|
+
* the negotiated TLS version doesn't support).
|
|
51
|
+
*/
|
|
52
|
+
[CCode (cname = "gnutls_session_channel_binding")]
|
|
53
|
+
public int session_channel_binding (void* session, ChannelBinding cbtype, out GnuTLS.Datum cb);
|
|
54
|
+
}
|