Coverage report: /home/ellis/comp/core/ffi/rustls/types.lisp
Kind | Covered | All | % |
expression | 0 | 53 | 0.0 |
branch | 0 | 0 | nil |
Key
Not instrumented
Conditionalized out
Executed
Not executed
Both branches taken
One branch taken
Neither branch taken
1
;;; rustls/types.lisp --- Rustls FFI Types
8
(define-alien-enum (rustls-handshake-kind int)
11
:full-with-hello-retry-request 2
14
(define-alien-enum (rustls-result unsigned-int)
18
:invalid-dns-name-error 7003
20
:certificate-parse-error 7005
21
:private-key-parse-error 7006
22
:insufficient-size 7007
24
:invalid-parameter 7009
27
:acceptor-not-ready 7012
29
:certificate-revocation-list-parse-error 7014
30
:no-server-cert-verifier 7015
31
:no-default-crypto-provider 7016
32
:get-random-failed 7017
33
:no-cert-resolver 7018
35
:builder-incompatible-tls-versions 7020
36
:no-certificates-presented 7101
38
:failed-to-get-current-time 7103
39
:failed-to-get-random-bytes 7113
40
:handshake-not-complete 7104
41
:peer-sent-oversized-record 7105
42
:no-application-protocol 7106
43
:bad-max-fragment-size 7114
44
:unsupported-name-type 7115
46
:cert-encoding-bad 7121
48
:cert-not-yet-valid 7123
50
:cert-unhandled-critical-extension 7125
51
:cert-unknown-issuer 7126
52
:cert-bad-signature 7127
53
:cert-not-valid-for-name 7128
54
:cert-invalid-purpose 7129
55
:cert-application-verification-failure 7130
56
:cert-other-error 7131
57
:message-handshake-payload-too-large 7133
58
:message-invalid-ccs 7134
59
:message-invalid-content-type 7135
60
:message-invalid-cert-status-type 7136
61
:message-invalid-cert-request 7137
62
:message-invalid-dh-params 7138
63
:message-invalid-empty-payload 7139
64
:message-invalid-key-update 7140
65
:message-invalid-server-name 7141
66
:message-too-large 7142
67
:message-too-short 7143
68
:message-missing-data 7144
69
:message-missing-key-exchange 7145
70
:message-no-signature-schemes 7146
71
:message-trailing-data 7147
72
:message-unexpected-message 7148
73
:message-unknown-protocol-version 7149
74
:message-unsupported-compression 7150
75
:message-unsupported-curve-type 7151
76
:message-unsupported-key-exchange-algorithm 7152
77
:message-invalid-other 7153
78
:peer-incompatible-error 7107
79
:peer-misbehaved-error 7108
80
:inappropriate-message 7109
81
:inappropriate-handshake-message 7110
83
:alert-close-notify 7200
84
:alert-unexpected-message 7201
85
:alert-bad-record-mac 7202
86
:alert-decryption-failed 7203
87
:alert-record-overflow 7204
88
:alert-decompression-failure 7205
89
:alert-handshake-failure 7206
90
:alert-no-certificate 7207
91
:alert-bad-certificate 7208
92
:alert-unsupported-certificate 7209
93
:alert-certificate-revoked 7210
94
:alert-certificate-expired 7211
95
:alert-certificate-unknown 7212
96
:alert-illegal-parameter 7213
97
:alert-unknown-ca 7214
98
:alert-access-denied 7215
99
:alert-decode-error 7216
100
:alert-decrypt-error 7217
101
:alert-export-restriction 7218
102
:alert-protocol-version 7219
103
:alert-insufficient-security 7220
104
:alert-internal-error 7221
105
:alert-inappropriate-fallback 7222
106
:alert-user-canceled 7223
107
:alert-no-renegotiation 7224
108
:alert-missing-extension 7225
109
:alert-unsupported-extension 7226
110
:alert-certificate-unobtainable 7227
111
:alert-unrecognised-name 7228
112
:alert-bad-certificate-status-response 7229
113
:alert-bad-certificate-hash-value 7230
114
:alert-unknown-psk-identity 7231
115
:alert-certificate-required 7232
116
:alert-no-application-protocol 7233
118
:cert-revocation-list-bad-signature 7400
119
:cert-revocation-list-invalid-crl-number 7401
120
:cert-revocation-list-invalid-revoked-cert-serial-number 7402
121
:cert-revocation-list-issuer-invalid-for-crl 7403
122
:cert-revocation-list-other-error 7404
123
:cert-revocation-list-parse-error 7405
124
:cert-revocation-list-unsupported-crl-version 7406
125
:cert-revocation-list-unsupported-critical-extension 7407
126
:cert-revocation-list-unsupported-delta-crl 7408
127
:cert-revocation-list-unsupported-indirect-crl 7409
128
:cert-revocation-list-unsupported-revocation-reason 7410
129
:client-cert-verifier-builder-no-root-anchors 7500)
131
(define-alien-enum (rustls-tls-version int)
140
(define-alien-type rustls-crypto-provider (struct rustls-crypto-provider))
141
(define-alien-type rustls-crypto-provider-builder (struct rustls-crypto-provider-builder))
142
(define-alien-type rustls-signing-key (struct rustls-signing-key))
144
(define-alien-type rustls-accepted (struct rustls-accepted))
146
(define-alien-type rustls-accepted-alert (struct rustls-accepted-alert))
148
(define-alien-type rustls-acceptor (struct rustls-acceptor))
150
(define-alien-type rustls-certificate (struct rustls-certificate))
152
(define-alien-type rustls-hpke (struct rustls-hpke))
154
(define-alien-type rustls-certified-key (struct rustls-certified-key))
156
(define-alien-type rustls-client-cert-verifier (struct rustls-client-cert-verifier))
158
(define-alien-type rustls-client-config (struct rustls-client-config))
160
(define-alien-type rustls-client-config-builder (struct rustls-client-config-builder))
162
(define-alien-type rustls-connection (struct rustls-connection))
164
(define-alien-type rustls-iovec (struct rustls-iovec))
166
(define-alien-type rustls-root-cert-store (struct rustls-root-cert-store))
168
(define-alien-type rustls-root-cert-store-builder (struct rustls-root-cert-store-builder))
170
(define-alien-type rustls-server-cert-verifier (struct rustls-server-cert-verifier))
172
(define-alien-type rustls-server-config (struct rustls-server-config))
174
(define-alien-type rustls-server-config-builder (struct rustls-server-config-builder))
176
(define-alien-type rustls-slice-slice-bytes
177
(struct rustls-slice-slice-bytes
178
(data (* unsigned-char))
181
(define-alien-type rustls-slice-str (struct rustls-slice-str))
183
(define-alien-type rustls-supported-ciphersuite (struct rustls-supported-ciphersuite))
185
(define-alien-type rustls-web-pki-client-cert-verifier (struct rustls-web-pki-client-cert-verifier))
187
(define-alien-type rustls-web-pki-server-cert-verifier (struct rustls-web-pki-server-cert-verifier))
189
(define-alien-type rustls-str
194
(define-alien-type rustls-io-result int)
196
(define-alien-type rustls-slice-bytes
197
(struct rustls-slice-bytes
198
(data (* unsigned-char))
201
(define-alien-type rustls-verify-server-cert-user-data (* t))
203
(define-alien-type rustls-verify-server-cert-params
204
(struct rustls-verify-server-cert-params
205
(end-entity-cert-der rustls-slice-bytes)
206
(intermediate-certs-der (* rustls-slice-slice-bytes))
207
(server-name rustls-str)
208
(ocsp-response rustls-slice-bytes)))
210
(define-alien-type rustls-verify-server-cert-callback
211
(function unsigned-int
212
rustls-verify-server-cert-user-data ; userdata
213
(* rustls-verify-server-cert-params))) ; params
215
(define-alien-type rustls-log-level size-t)
217
(define-alien-type rustls-log-params
218
(struct rustls-log-params
219
(level rustls-log-level)
220
(message rustls-str)))
222
(define-alien-type rustls-log-callback
225
(* rustls-log-params))) ; params
227
(define-alien-type rustls-keylog-log-callback
230
(* unsigned-char) ; client-random
231
size-t ; client-random-len
232
(* unsigned-char) ; secret
233
size-t)) ; secret-len
235
(define-alien-type rustls-keylog-will-log-callback
239
(define-alien-type rustls-client-hello-userdata (* t))
241
(define-alien-type rustls-slice-u16
242
(struct rustls-slice-u16
243
(data (* unsigned-short))
246
(define-alien-type rustls-client-hello
247
(struct rustls-client-hello
248
(server-name rustls-str)
249
(signature-schemes rustls-slice-u16)
250
(alpn (* rustls-slice-slice-bytes))))
252
(define-alien-type rustls-certified-key (struct rustls-certified-key))
256
* - the passed in `hello` and all its values are only available during the
257
* callback invocations.
258
* - the passed callback function must be safe to call multiple times concurrently
259
* with the same userdata, unless there is only a single config and connection
260
* where it is installed.
262
(define-alien-type rustls-client-hello-callback
263
(function (* rustls-certified-key)
264
rustls-client-hello-userdata ; userdata
265
(* rustls-client-hello))) ; hello
267
(define-alien-type rustls-session-store-userdata (* t))
269
(define-alien-type rustls-session-store-get-callback
270
(function unsigned-int
271
rustls-session-store-userdata ; userdata
272
(* rustls-slice-bytes) ; key
274
(* unsigned-char) ; buf
278
(define-alien-type rustls-session-store-put-callback
279
(function unsigned-int
280
rustls-session-store-userdata ; userdata
281
(* rustls-slice-bytes) ; key
282
(* rustls-slice-bytes))) ; val
284
(define-alien-type rustls-supported-ciphersuite (struct rustls-supported-ciphersuite))
286
(define-alien-type rustls-web-pki-client-cert-verifier-builder (struct rustls-web-pki-client-vert-verifier-builder))
288
(define-alien-type rustls-web-pki-server-cert-verifier-builder (struct rustls-web-pki-server-cert-verifier-builder))
290
(define-alien-type rustls-read-callback
291
(function rustls-io-result
293
(* unsigned-char) ; buf
297
(define-alien-type rustls-write-callback
298
(function rustls-io-result
300
(* unsigned-char) ; buf
304
(define-alien-type rustls-write-vectored-callback
305
(function rustls-io-result
307
(* rustls-iovec) ; iov