Debian Codegraph @

guile/modules/gnutls.in

raw
1 ;;; GnuTLS --- Guile bindings for GnuTLS.
2 ;;; Copyright (C) 2007-2025 Free Software Foundation, Inc.
3 ;;;
4 ;;; This file is part of Guile-GnuTLS.
5 ;;;
6 ;;; This library is free software; you can redistribute it and/or
7 ;;; modify it under the terms of the GNU Lesser General Public
8 ;;; License as published by the Free Software Foundation; either
9 ;;; version 2.1 of the License, or (at your option) any later version.
10 ;;;
11 ;;; This library 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 GNU
14 ;;; Lesser General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU Lesser General Public
17 ;;; License along with this library; if not, see <https://www.gnu.org/licenses/>.
18
19 ;;; Written by Ludovic Courtès <[email protected]>
20
21 (define-module (gnutls)
22 ;; Note: The export list must be manually kept in sync with the build
23 ;; system.
24 :export (;; versioning
25 gnutls-version
26
27 ;; sessions
28 session?
29 make-session bye handshake rehandshake reauthenticate
30 alert-get alert-send
31 session-cipher session-kx session-mac session-protocol
32 session-compression-method session-certificate-type
33 session-authentication-type session-server-authentication-type
34 session-client-authentication-type
35 session-peer-certificate-chain session-our-certificate-chain
36 set-session-transport-fd! set-session-transport-port!
37 set-session-credentials! set-server-session-certificate-request!
38 set-session-server-name!
39
40 ;; anonymous credentials
41 anonymous-client-credentials? anonymous-server-credentials?
42 make-anonymous-client-credentials make-anonymous-server-credentials
43 set-anonymous-server-dh-parameters!
44
45 ;; certificate credentials
46 certificate-credentials? make-certificate-credentials
47 set-certificate-credentials-dh-parameters!
48 set-certificate-credentials-x509-key-files!
49 set-certificate-credentials-x509-trust-file!
50 set-certificate-credentials-x509-crl-file!
51 set-certificate-credentials-x509-key-data!
52 set-certificate-credentials-x509-trust-data!
53 set-certificate-credentials-x509-crl-data!
54 set-certificate-credentials-x509-keys!
55 set-certificate-credentials-verify-limits!
56 set-certificate-credentials-verify-flags!
57 peer-certificate-status
58
59 ;; SRP credentials
60 srp-client-credentials? srp-server-credentials?
61 make-srp-client-credentials make-srp-server-credentials
62 set-srp-client-credentials!
63 set-srp-server-credentials-files!
64 server-session-srp-username
65 srp-base64-encode srp-base64-decode
66
67 ;; PSK credentials
68 psk-client-credentials? psk-server-credentials?
69 make-psk-client-credentials make-psk-server-credentials
70 set-psk-client-credentials!
71 set-psk-server-credentials-file!
72 server-session-psk-username
73
74 ;; priorities
75 set-session-priorities!
76 set-session-default-priority!
77
78 ;; DH
79 set-session-dh-prime-bits!
80 make-dh-parameters dh-parameters?
81 pkcs3-import-dh-parameters pkcs3-export-dh-parameters
82
83 ;; X.509
84 x509-certificate? x509-private-key?
85 generate-x509-private-key
86 make-x509-certificate
87 import-x509-certificate export-x509-certificate
88 x509-certificate-matches-hostname?
89 x509-certificate-dn x509-certificate-dn-oid
90 x509-certificate-dn-by-oid
91 x509-certificate-issuer-dn x509-certificate-issuer-dn-oid
92 x509-certificate-issuer-dn-by-oid
93 x509-certificate-signature-algorithm x509-certificate-version
94 x509-certificate-key-id x509-certificate-authority-key-id
95 x509-certificate-subject-key-id
96 x509-certificate-subject-alternative-name
97 x509-certificate-public-key-algorithm x509-certificate-key-usage
98 x509-certificate-fingerprint
99 x509-certificate-activation-time
100 x509-certificate-expiration-time
101 x509-certificate-ca-status
102 x509-certificate-serial
103 x509-certificate-print
104 set-x509-certificate-dn-by-oid!
105 set-x509-certificate-key!
106 set-x509-certificate-activation-time!
107 set-x509-certificate-expiration-time!
108 set-x509-certificate-ca-status!
109 set-x509-certificate-version!
110 set-x509-certificate-key-usage!
111 set-x509-certificate-subject-key-id!
112 set-x509-certificate-serial!
113 sign-x509-certificate!
114 import-x509-private-key export-x509-private-key
115 pkcs8-import-x509-private-key
116
117 ;; Abstract public and private keys
118 import-raw-dsa-public-key
119 import-raw-ecc-public-key
120 import-raw-rsa-public-key
121 import-raw-dsa-private-key
122 import-raw-ecc-private-key
123 import-raw-rsa-private-key
124 import-public-key
125 import-private-key
126 public-key-export-raw-dsa
127 public-key-export-raw-ecc
128 public-key-export-raw-rsa
129 private-key-export-raw-dsa
130 private-key-export-raw-ecc
131 private-key-export-raw-rsa
132 private-key->public-key
133 public-key-export
134 public-key-pk-algorithm
135 private-key-pk-algorithm
136 public-key-preferred-hash-algorithm
137 generate-private-key
138 private-key-sign-data
139 private-key-sign-hash
140 private-key-decrypt-data
141 public-key-encrypt-data
142 public-key-verify-data
143 public-key-verify-hash
144 x509-certificate->public-key
145 x509-private-key->private-key
146
147 ;; HMAC and MAC
148 mac-nonce-size
149 hmac? make-hmac hmac! hmac-copy hmac-direct
150 hmac-length hmac-output set-hmac-nonce! hmac-algorithm
151
152 ;; Hash
153 hash? make-hash hash! hash-copy hash-direct
154 hash-length hash-output hash-algorithm
155
156 ;; AEAD and non-AEAD ciphers
157 cipher-tag-size cipher-key-size cipher-block-size cipher-iv-size
158 aead-cipher? make-aead-cipher aead-cipher-encrypt aead-cipher-decrypt
159 aead-cipher-algorithm
160 cipher? make-cipher cipher-encrypt cipher-decrypt cipher-set-iv!
161 cipher-add-auth! cipher-tag
162 cipher-algorithm
163
164 ;; PK algorithm
165 string->pk-algorithm pk-algorithm->oid pk-algorithm-list
166 pk-algorithm->sign-algorithm oid->pk-algorithm
167
168 ;; Sign algorithm
169 oid->sign-algorithm sign-algorithm->digest-algorithm
170 string->sign-algorithm sign-algorithm->oid
171 sign-algorithm-is-secure? sign-algorithm-list
172 sign-algorithm->pk-algorithm sign-algorithm-supports?
173
174 ;; ECC curves
175 string->ecc-curve ecc-curve->oid ecc-curve-list
176 oid->ecc-curve ecc-curve->pk-algorithm ecc-curve-size
177
178 ;; Random
179 gnutls-random
180
181 ;; record layer
182 record-send record-receive!
183 record-get-direction
184 session-record-port
185 set-session-record-port-close!
186
187 ;; debugging
188 set-log-procedure! set-log-level!
189
190 ;; enum->string functions
191 cipher->string kx->string params->string credentials->string
192 mac->string digest->string compression-method->string
193 connection-end->string connection-flag->string
194 alert-level->string
195 alert-description->string handshake-description->string
196 certificate-status->string certificate-request->string
197 close-request->string
198 protocol->string certificate-type->string
199 x509-certificate-format->string
200 x509-subject-alternative-name->string pk-algorithm->string
201 sign-algorithm->string psk-key-format->string key-usage->string
202 certificate-verify->string error->string
203 cipher-suite->string server-name-type->string
204 privkey->string oid->string ecc-curve->string
205 random-level->string
206
207 ;; enum values
208 cipher/null
209 cipher/arcfour
210 cipher/arcfour-128
211 cipher/3des-cbc
212 cipher/aes-128-cbc
213 cipher/aes-256-cbc
214 cipher/arcfour-40
215 cipher/camellia-128-cbc
216 cipher/camellia-256-cbc
217 cipher/aes-192-cbc
218 cipher/aes-128-gcm
219 cipher/aes-256-gcm
220 cipher/camellia-192-cbc
221 cipher/salsa20-256
222 cipher/estream-salsa20-256
223 cipher/camellia-128-gcm
224 cipher/camellia-256-gcm
225 cipher/rc2-40-cbc
226 cipher/des-cbc
227 cipher/aes-128-ccm
228 cipher/aes-256-ccm
229 cipher/aes-128-ccm-8
230 cipher/aes-256-ccm-8
231 cipher/chacha20-poly1305
232 cipher/gost28147-tc26z-cfb
233 cipher/gost28147-cpa-cfb
234 cipher/gost28147-cpb-cfb
235 cipher/gost28147-cpc-cfb
236 cipher/gost28147-cpd-cfb
237 cipher/aes-128-cfb8
238 cipher/aes-192-cfb8
239 cipher/aes-256-cfb8
240 cipher/aes-128-xts
241 cipher/aes-256-xts
242 cipher/gost28147-tc26z-cnt
243 cipher/chacha20-64
244 cipher/chacha20-32
245 cipher/aes-128-siv
246 cipher/aes-256-siv
247 cipher/aes-192-gcm
248 cipher/magma-ctr-acpkm
249 cipher/kuznyechik-ctr-acpkm
250 cipher/idea-pgp-cfb
251 cipher/3des-pgp-cfb
252 cipher/cast5-pgp-cfb
253 cipher/blowfish-pgp-cfb
254 cipher/safer-sk128-pgp-cfb
255 cipher/aes128-pgp-cfb
256 cipher/aes192-pgp-cfb
257 cipher/aes256-pgp-cfb
258 cipher/twofish-pgp-cfb
259 kx/rsa
260 kx/dhe-dss
261 kx/dhe-rsa
262 kx/anon-dh
263 kx/srp
264 kx/rsa-export
265 kx/srp-rsa
266 kx/srp-dss
267 kx/psk
268 kx/dhe-dss
269 params/rsa-export
270 params/dh
271 credentials/certificate
272 credentials/anon
273 credentials/anonymous
274 credentials/srp
275 credentials/psk
276 credentials/ia
277 mac/unknown
278 mac/null
279 mac/md5
280 mac/sha1
281 mac/rmd160
282 mac/md2
283 mac/sha256
284 mac/sha384
285 mac/sha512
286 mac/sha224
287 mac/sha3-224
288 mac/sha3-256
289 mac/sha3-384
290 mac/sha3-512
291 mac/md5-sha1
292 mac/gostr-94
293 mac/streebog-256
294 mac/streebog-512
295 mac/aead
296 mac/umac-96
297 mac/umac-128
298 mac/aes-cmac-128
299 mac/aes-cmac-256
300 mac/aes-gmac-128
301 mac/aes-gmac-192
302 mac/aes-gmac-256
303 mac/gost28147-tc26z-imit
304 mac/shake-128
305 mac/shake-256
306 mac/magma-omac
307 mac/kuznyechik-omac
308 digest/null
309 digest/md5
310 digest/sha1
311 digest/rmd160
312 digest/md2
313 digest/sha256
314 digest/sha384
315 digest/sha512
316 digest/sha224
317 digest/sha3-224
318 digest/sha3-256
319 digest/sha3-384
320 digest/sha3-512
321 digest/md5-sha1
322 digest/gostr-94
323 digest/streebog-256
324 digest/streebog-512
325 digest/shake-128
326 digest/shake-256
327 compression-method/null
328 compression-method/deflate
329 compression-method/lzo
330 connection-end/server
331 connection-end/client
332 connection-flag/datagram
333 connection-flag/nonblock
334 connection-flag/no-extensions
335 connection-flag/no-replay-protection
336 connection-flag/no-signal
337 connection-flag/allow-id-change
338 connection-flag/enable-false-start
339 connection-flag/force-client-cert
340 connection-flag/no-tickets
341 connection-flag/key-share-top
342 connection-flag/key-share-top2
343 connection-flag/key-share-top3
344 connection-flag/post-handshake-auth
345 connection-flag/no-auto-rekey
346 connection-flag/safe-padding-check
347 connection-flag/enable-early-start
348 connection-flag/enable-rawpk
349 connection-flag/auto-reauth
350 connection-flag/enable-early-data
351 alert-level/warning
352 alert-level/fatal
353 alert-description/close-notify
354 alert-description/unexpected-message
355 alert-description/bad-record-mac
356 alert-description/decryption-failed
357 alert-description/record-overflow
358 alert-description/decompression-failure
359 alert-description/handshake-failure
360 alert-description/ssl3-no-certificate
361 alert-description/bad-certificate
362 alert-description/unsupported-certificate
363 alert-description/certificate-revoked
364 alert-description/certificate-expired
365 alert-description/certificate-unknown
366 alert-description/illegal-parameter
367 alert-description/unknown-ca
368 alert-description/access-denied
369 alert-description/decode-error
370 alert-description/decrypt-error
371 alert-description/export-restriction
372 alert-description/protocol-version
373 alert-description/insufficient-security
374 alert-description/internal-error
375 alert-description/user-canceled
376 alert-description/no-renegotiation
377 alert-description/unsupported-extension
378 alert-description/certificate-unobtainable
379 alert-description/unrecognized-name
380 alert-description/unknown-psk-identity
381 alert-description/inner-application-failure
382 alert-description/inner-application-verification
383 handshake-description/hello-request
384 handshake-description/client-hello
385 handshake-description/server-hello
386 handshake-description/certificate-pkt
387 handshake-description/server-key-exchange
388 handshake-description/certificate-request
389 handshake-description/server-hello-done
390 handshake-description/certificate-verify
391 handshake-description/client-key-exchange
392 handshake-description/finished
393 certificate-status/invalid
394 certificate-status/revoked
395 certificate-status/signer-not-found
396 certificate-status/signer-not-ca
397 certificate-status/insecure-algorithm
398 certificate-status/not-activated
399 certificate-status/expired
400 certificate-status/signature-failure
401 certificate-status/revocation-data-superseded
402 certificate-status/unexpected-owner
403 certificate-status/revocation-data-issued-in-future
404 certificate-status/signer-constraints-failed
405 certificate-status/mismatch
406 certificate-status/purpose-mismatch
407 certificate-status/missing-ocsp-status
408 certificate-status/invalid-ocsp-status
409 certificate-status/unknown-crit-extensions
410 certificate-request/ignore
411 certificate-request/request
412 certificate-request/require
413 close-request/rdwr
414 close-request/wr
415 protocol/ssl-3
416 protocol/tls-1.0
417 protocol/tls-1.1
418 protocol/version-unknown
419 certificate-type/x509
420 certificate-type/openpgp
421 certificate-type/rawpk
422 x509-certificate-format/der
423 x509-certificate-format/pem
424 x509-subject-alternative-name/dnsname
425 x509-subject-alternative-name/rfc822name
426 x509-subject-alternative-name/uri
427 x509-subject-alternative-name/ipaddress
428 pk-algorithm/unknown
429 pk-algorithm/rsa
430 pk-algorithm/dsa
431 pk-algorithm/dh
432 pk-algorithm/ecdsa
433 pk-algorithm/ecc
434 pk-algorithm/ec
435 pk-algorithm/ecdh-x25519
436 pk-algorithm/ecdhx
437 pk-algorithm/rsa-pss
438 pk-algorithm/eddsa-ed25519
439 pk-algorithm/gost-01
440 pk-algorithm/gost-12-256
441 pk-algorithm/gost-12-512
442 pk-algorithm/ecdh-x448
443 pk-algorithm/eddsa-ed448
444 pk-algorithm/rsa-oaep
445 pk-algorithm/mlkem768
446 pk-algorithm/mldsa44
447 pk-algorithm/mldsa65
448 pk-algorithm/mldsa87
449 pk-algorithm/mlkem1024
450 sign-algorithm/unknown
451 sign-algorithm/rsa-sha1
452 sign-algorithm/dsa-sha1
453 sign-algorithm/rsa-md5
454 sign-algorithm/rsa-md2
455 sign-algorithm/rsa-rmd160
456 sign-algorithm/rsa-sha256
457 sign-algorithm/rsa-sha384
458 sign-algorithm/rsa-sha512
459 sign-algorithm/rsa-sha224
460 sign-algorithm/dsa-sha224
461 sign-algorithm/dsa-sha256
462 sign-algorithm/ecdsa-sha1
463 sign-algorithm/ecdsa-sha224
464 sign-algorithm/ecdsa-sha256
465 sign-algorithm/ecdsa-sha384
466 sign-algorithm/ecdsa-sha512
467 sign-algorithm/dsa-sha384
468 sign-algorithm/dsa-sha512
469 sign-algorithm/ecdsa-sha3-224
470 sign-algorithm/ecdsa-sha3-256
471 sign-algorithm/ecdsa-sha3-384
472 sign-algorithm/ecdsa-sha3-512
473 sign-algorithm/dsa-sha3-224
474 sign-algorithm/dsa-sha3-256
475 sign-algorithm/dsa-sha3-384
476 sign-algorithm/dsa-sha3-512
477 sign-algorithm/rsa-sha3-224
478 sign-algorithm/rsa-sha3-256
479 sign-algorithm/rsa-sha3-384
480 sign-algorithm/rsa-sha3-512
481 sign-algorithm/rsa-pss-sha256
482 sign-algorithm/rsa-pss-sha384
483 sign-algorithm/rsa-pss-sha512
484 sign-algorithm/eddsa-ed25519
485 sign-algorithm/rsa-raw
486 sign-algorithm/ecdsa-secp256r1-sha256
487 sign-algorithm/ecdsa-secp384r1-sha384
488 sign-algorithm/ecdsa-secp521r1-sha512
489 sign-algorithm/rsa-pss-rsae-sha256
490 sign-algorithm/rsa-pss-rsae-sha384
491 sign-algorithm/rsa-pss-rsae-sha512
492 sign-algorithm/gost-94
493 sign-algorithm/gost-256
494 sign-algorithm/gost-512
495 sign-algorithm/eddsa-ed448
496 sign-algorithm/mldsa44
497 sign-algorithm/mldsa65
498 sign-algorithm/mldsa87
499 psk-key-format/raw
500 psk-key-format/hex
501 key-usage/digital-signature
502 key-usage/non-repudiation
503 key-usage/key-encipherment
504 key-usage/data-encipherment
505 key-usage/key-agreement
506 key-usage/key-cert-sign
507 key-usage/crl-sign
508 key-usage/encipher-only
509 key-usage/decipher-only
510 certificate-verify/disable-ca-sign
511 certificate-verify/allow-x509-v1-ca-crt
512 certificate-verify/allow-x509-v1-ca-certificate
513 certificate-verify/do-not-allow-same
514 certificate-verify/allow-any-x509-v1-ca-crt
515 certificate-verify/allow-any-x509-v1-ca-certificate
516 certificate-verify/allow-sign-rsa-md2
517 certificate-verify/allow-sign-rsa-md5
518 server-name-type/dns
519 privkey/import-auto-release
520 privkey/import-copy
521 privkey/disable-callbacks
522 privkey/sign-flag-tls1-rsa
523 privkey/flag-provable
524 privkey/flag-export-compat
525 privkey/sign-flag-rsa-pss
526 privkey/flag-reproducible
527 privkey/flag-ca
528 privkey/flag-rsa-pss-fixed-salt-length
529 oid/x520-country-name
530 oid/x520-organization-name
531 oid/x520-organizational-unit-name
532 oid/x520-common-name
533 oid/x520-locality-name
534 oid/x520-state-or-province-name
535 oid/x520-initials
536 oid/x520-generation-qualifier
537 oid/x520-surname
538 oid/x520-given-name
539 oid/x520-title
540 oid/x520-dn-qualifier
541 oid/x520-pseudonym
542 oid/x520-postalcode
543 oid/x520-name
544 oid/ldap-dc
545 oid/ldap-uid
546 oid/pkcs9-email
547 oid/pkix-date-of-birth
548 oid/pkix-place-of-birth
549 oid/pkix-gender
550 oid/pkix-country-of-citizenship
551 oid/pkix-country-of-residence
552 oid/aia
553 oid/ad-ocsp
554 oid/ad-caissuers
555 ecc-curve/invalid
556 ecc-curve/secp224r1
557 ecc-curve/secp256r1
558 ecc-curve/secp384r1
559 ecc-curve/secp521r1
560 ecc-curve/secp192r1
561 ecc-curve/x25519
562 ecc-curve/ed25519
563 ecc-curve/gost256cpa
564 ecc-curve/gost256cpb
565 ecc-curve/gost256cpc
566 ecc-curve/gost256cpxa
567 ecc-curve/gost256cpxb
568 ecc-curve/gost512a
569 ecc-curve/gost512b
570 ecc-curve/gost512c
571 ecc-curve/gost256a
572 ecc-curve/gost256b
573 ecc-curve/gost256c
574 ecc-curve/gost256d
575 ecc-curve/x448
576 ecc-curve/ed448
577 certificate-print-format/full
578 certificate-print-format/oneline
579 certificate-print-format/unsigned-full
580 certificate-print-format/compact
581 certificate-print-format/full-numbers
582 random-level/nonce
583 random-level/random
584 random-level/key
585
586 ;; FIXME: Automate this:
587 ;; grep '^#define GNUTLS_E_' ../../lib/includes/gnutls/gnutls.h.in | \
588 ;; sed -r -e 's|^#define GNUTLS_E_([^ ]+).*$|error/\1|' | tr A-Z_ a-z-
589 error/success
590 error/unsupported-version-packet
591 error/tls-packet-decoding-error
592 error/unexpected-packet-length
593 error/invalid-session
594 error/fatal-alert-received
595 error/unexpected-packet
596 error/warning-alert-received
597 error/error-in-finished-packet
598 error/unexpected-handshake-packet
599 error/decryption-failed
600 error/memory-error
601 error/decompression-failed
602 error/compression-failed
603 error/again
604 error/expired
605 error/db-error
606 error/srp-pwd-error
607 error/keyfile-error
608 error/insufficient-credentials
609 error/insuficient-credentials
610 error/insufficient-cred
611 error/insuficient-cred
612 error/hash-failed
613 error/base64-decoding-error
614 error/rehandshake
615 error/got-application-data
616 error/record-limit-reached
617 error/encryption-failed
618 error/pk-encryption-failed
619 error/pk-decryption-failed
620 error/pk-sign-failed
621 error/x509-unsupported-critical-extension
622 error/key-usage-violation
623 error/no-certificate-found
624 error/invalid-request
625 error/short-memory-buffer
626 error/interrupted
627 error/push-error
628 error/pull-error
629 error/received-illegal-parameter
630 error/requested-data-not-available
631 error/pkcs1-wrong-pad
632 error/received-illegal-extension
633 error/internal-error
634 error/dh-prime-unacceptable
635 error/file-error
636 error/too-many-empty-packets
637 error/unknown-pk-algorithm
638 error/too-many-handshake-packets
639 error/received-disallowed-name
640 error/certificate-required
641 error/no-temporary-rsa-params
642 error/no-compression-algorithms
643 error/no-cipher-suites
644 error/openpgp-getkey-failed
645 error/pk-sig-verify-failed
646 error/illegal-srp-username
647 error/srp-pwd-parsing-error
648 error/keyfile-parsing-error
649 error/no-temporary-dh-params
650 error/asn1-element-not-found
651 error/asn1-identifier-not-found
652 error/asn1-der-error
653 error/asn1-value-not-found
654 error/asn1-generic-error
655 error/asn1-value-not-valid
656 error/asn1-tag-error
657 error/asn1-tag-implicit
658 error/asn1-type-any-error
659 error/asn1-syntax-error
660 error/asn1-der-overflow
661 error/openpgp-uid-revoked
662 error/certificate-error
663 error/x509-certificate-error
664 error/certificate-key-mismatch
665 error/unsupported-certificate-type
666 error/x509-unknown-san
667 error/openpgp-fingerprint-unsupported
668 error/x509-unsupported-attribute
669 error/unknown-hash-algorithm
670 error/unknown-pkcs-content-type
671 error/unknown-pkcs-bag-type
672 error/invalid-password
673 error/mac-verify-failed
674 error/constraint-error
675 error/warning-ia-iphf-received
676 error/warning-ia-fphf-received
677 error/ia-verify-failed
678 error/unknown-algorithm
679 error/unsupported-signature-algorithm
680 error/safe-renegotiation-failed
681 error/unsafe-renegotiation-denied
682 error/unknown-srp-username
683 error/premature-termination
684 error/malformed-cidr
685 error/base64-encoding-error
686 error/incompatible-gcrypt-library
687 error/incompatible-crypto-library
688 error/incompatible-libtasn1-library
689 error/openpgp-keyring-error
690 error/x509-unsupported-oid
691 error/random-failed
692 error/base64-unexpected-header-error
693 error/openpgp-subkey-error
694 error/crypto-already-registered
695 error/already-registered
696 error/handshake-too-large
697 error/cryptodev-ioctl-error
698 error/cryptodev-device-error
699 error/channel-binding-not-available
700 error/bad-cookie
701 error/openpgp-preferred-key-error
702 error/incompat-dsa-key-with-tls-protocol
703 error/insufficient-security
704 error/heartbeat-pong-received
705 error/heartbeat-ping-received
706 error/unrecognized-name
707 error/pkcs11-error
708 error/pkcs11-load-error
709 error/parsing-error
710 error/pkcs11-pin-error
711 error/pkcs11-slot-error
712 error/locking-error
713 error/pkcs11-attribute-error
714 error/pkcs11-device-error
715 error/pkcs11-data-error
716 error/pkcs11-unsupported-feature-error
717 error/pkcs11-key-error
718 error/pkcs11-pin-expired
719 error/pkcs11-pin-locked
720 error/pkcs11-session-error
721 error/pkcs11-signature-error
722 error/pkcs11-token-error
723 error/pkcs11-user-error
724 error/crypto-init-failed
725 error/timedout
726 error/user-error
727 error/ecc-no-supported-curves
728 error/ecc-unsupported-curve
729 error/pkcs11-requested-object-not-availble
730 error/certificate-list-unsorted
731 error/illegal-parameter
732 error/no-priorities-were-set
733 error/x509-unsupported-extension
734 error/session-eof
735 error/tpm-error
736 error/tpm-key-password-error
737 error/tpm-srk-password-error
738 error/tpm-session-error
739 error/tpm-key-not-found
740 error/tpm-uninitialized
741 error/tpm-no-lib
742 error/no-certificate-status
743 error/ocsp-response-error
744 error/random-device-error
745 error/auth-error
746 error/no-application-protocol
747 error/sockets-init-error
748 error/key-import-failed
749 error/inappropriate-fallback
750 error/certificate-verification-error
751 error/privkey-verification-error
752 error/unexpected-extensions-length
753 error/asn1-embedded-null-in-string
754 error/self-test-error
755 error/no-self-test
756 error/lib-in-error-state
757 error/pk-generation-error
758 error/idna-error
759 error/need-fallback
760 error/session-user-id-changed
761 error/handshake-during-false-start
762 error/unavailable-during-handshake
763 error/pk-invalid-pubkey
764 error/pk-invalid-privkey
765 error/not-yet-activated
766 error/invalid-utf8-string
767 error/no-embedded-data
768 error/invalid-utf8-email
769 error/invalid-password-string
770 error/certificate-time-error
771 error/record-overflow
772 error/asn1-time-error
773 error/incompatible-sig-with-key
774 error/pk-invalid-pubkey-params
775 error/pk-no-validation-params
776 error/ocsp-mismatch-with-certs
777 error/no-common-key-share
778 error/reauth-request
779 error/too-many-matches
780 error/crl-verification-error
781 error/missing-extension
782 error/db-entry-exists
783 error/early-data-rejected
784 error/unimplemented-feature
785 error/int-ret-0
786 error/int-check-again
787 error/application-error-max
788 error/application-error-min
789
790 fatal-error?
791
792 ;; base16
793 hex-encode hex-decode
794
795 ;; base64
796 base64-encode base64-decode
797
798 ;; OpenPGP keys (formerly in GnuTLS-extra)
799 openpgp-certificate? openpgp-private-key?
800 import-openpgp-certificate import-openpgp-private-key
801 openpgp-certificate-id openpgp-certificate-id!
802 openpgp-certificate-fingerprint openpgp-certificate-fingerprint!
803 openpgp-certificate-name openpgp-certificate-names
804 openpgp-certificate-algorithm openpgp-certificate-version
805 openpgp-certificate-usage
806
807 ;; OpenPGP keyrings
808 openpgp-keyring? import-openpgp-keyring
809 openpgp-keyring-contains-key-id?
810
811 ;; certificate credentials
812 set-certificate-credentials-openpgp-keys!
813
814 ;; enum->string functions
815 openpgp-certificate-format->string
816
817 ;; enum values
818 openpgp-certificate-format/raw
819 openpgp-certificate-format/base64))
820
821 (eval-when (expand load eval)
822 (define %libdir
823 (or (getenv "GNUTLS_GUILE_EXTENSION_DIR")
824
825 ;; The .scm file is supposed to be architecture-independent. Thus,
826 ;; save 'extensiondir' only if it's different from what Guile expects.
827 @maybe_guileextensiondir@))
828
829 (unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
830 (load-extension (if %libdir
831 (string-append %libdir "/guile-gnutls-v-2")
832 "guile-gnutls-v-2")
833 "scm_init_gnutls")))
834
835 (define-syntax define-deprecated
836 (lambda (s)
837 "Define a deprecated variable or procedure, along these lines:
838
839 (define-deprecated variable alias)
840
841 This defines 'variable' as an alias for 'alias', and emits a warning when
842 'variable' is used."
843 (syntax-case s ()
844 ((_ variable)
845 (with-syntax ((alias (datum->syntax
846 #'variable
847 (symbol-append
848 '% (syntax->datum #'variable)))))
849 #'(define-deprecated variable alias)))
850 ((_ variable alias)
851 (identifier? #'variable)
852 #`(define-syntax variable
853 (lambda (s)
854 (issue-deprecation-warning
855 (format #f "GnuTLS variable '~a' is deprecated"
856 (syntax->datum #'variable)))
857 (syntax-case s ()
858 ((_ args (... ...))
859 #'(alias args (... ...)))
860 (id
861 (identifier? #'id)
862 #'alias))))))))
863
864 ;; Renaming.
865 (define protocol/ssl-3 #f)
866 (define protocol/tls-1.0 #f)
867 (define protocol/tls-1.1 #f)
868
869 ;; Aliases.
870 (define credentials/anonymous #f)
871 (define cipher/rijndael-256-cbc #f)
872 (define cipher/rijndael-128-cbc #f)
873 (define cipher/rijndael-cbc #f)
874 (define cipher/arcfour-128 #f)
875 (define certificate-verify/allow-any-x509-v1-ca-certificate #f)
876 (define certificate-verify/allow-x509-v1-ca-certificate #f)
877
878 (unless (getenv "GNUTLS_GUILE_CROSS_COMPILING")
879 ;; Renaming.
880 (set! protocol/ssl-3 protocol/ssl3)
881 (set! protocol/tls-1.0 protocol/tls1-0)
882 (set! protocol/tls-1.1 protocol/tls1-1)
883
884 ;; Aliases.
885 (set! credentials/anonymous credentials/anon)
886 (set! cipher/rijndael-256-cbc cipher/aes-256-cbc)
887 (set! cipher/rijndael-128-cbc cipher/aes-128-cbc)
888 (set! cipher/rijndael-cbc cipher/aes-128-cbc)
889 (set! cipher/arcfour-128 cipher/arcfour)
890 (set! certificate-verify/allow-any-x509-v1-ca-certificate
891 certificate-verify/allow-any-x509-v1-ca-crt)
892 (set! certificate-verify/allow-x509-v1-ca-certificate
893 certificate-verify/allow-x509-v1-ca-crt))
894
895 ;; Deprecated OpenPGP bindings.
896 (define-deprecated certificate-type/openpgp)
897 (define-deprecated error/openpgp-getkey-failed)
898 (define-deprecated error/openpgp-uid-revoked)
899 (define-deprecated error/openpgp-fingerprint-unsupported)
900 (define-deprecated error/openpgp-keyring-error)
901 (define-deprecated error/openpgp-subkey-error)
902 (define-deprecated error/openpgp-preferred-key-error)
903 (define-deprecated openpgp-private-key?)
904 (define-deprecated import-openpgp-certificate)
905 (define-deprecated import-openpgp-private-key)
906 (define-deprecated openpgp-certificate-id)
907 (define-deprecated openpgp-certificate-id!)
908 (define-deprecated openpgp-certificate-fingerprint)
909 (define-deprecated openpgp-certificate-fingerprint!)
910 (define-deprecated openpgp-certificate-name)
911 (define-deprecated openpgp-certificate-names)
912 (define-deprecated openpgp-certificate-algorithm)
913 (define-deprecated openpgp-certificate-version)
914 (define-deprecated openpgp-certificate-usage)
915 (define-deprecated openpgp-keyring?)
916 (define-deprecated import-openpgp-keyring)
917 (define-deprecated openpgp-keyring-contains-key-id?)
918 (define-deprecated set-certificate-credentials-openpgp-keys!)
919
920 ;; XXX: The following bindings should be marked as deprecated as well, but due
921 ;; to the way binding names are constructed for enums and smobs, it's
922 ;; complicated. Oh well.
923 ;;
924 ;; (define-deprecated openpgp-certificate?)
925 ;; (define-deprecated openpgp-certificate-format->string)
926 ;; (define-deprecated openpgp-certificate-format/raw)
927 ;; (define-deprecated openpgp-certificate-format/base64)
928
929 ;;; Local Variables:
930 ;;; mode: scheme
931 ;;; coding: utf-8
932 ;;; End:
933
934 ;;; arch-tag: 3394732c-d9fa-48dd-a093-9fba3a325b8b