[gnutls-devel] Guile-GnuTLS | Example Echo Client/Server Contains Removed Functions (#16)

Read-only notification of GnuTLS library development activities gnutls-devel at lists.gnutls.org
Sun Aug 13 03:01:25 CEST 2023



Skyler Ferris created an issue: https://gitlab.com/gnutls/guile/-/issues/16



Hello,

I am just starting to look at gnutls and the guile bindings and tried to use the echo server provided as examples. It contains calls to `set-session-certificate-type-priority!` and `set-session-kx-priority!` which no longer exist in the `(gnutls)` module. I replaced them with `(set-session-priorities! x "NORMAL:-KX-ALL:+ANON-DH")` and it seemed to work. But maybe there is a better way to call it, I just started looking at it today. The below diff updates both sites to use this call if you want it, it's not clear to me how to open a pull request here. In the doc (https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html) it says that trying to push should give me a link for opening a pull request, but that gave me an error.

Thanks,
Skyler

```diff
diff --git a/doc/gnutls-guile.texi b/doc/gnutls-guile.texi
index f48c766..13d4a03 100644
--- a/doc/gnutls-guile.texi
+++ b/doc/gnutls-guile.texi
@@ -487,11 +487,12 @@ is bound to an open socket port):
   ;; Use the default settings.
   (set-session-default-priority! client)
 
-  ;; Don't use certificate-based authentication.
-  (set-session-certificate-type-priority! client '())
-
-  ;; Request the "anonymous Diffie-Hellman" key exchange method.
-  (set-session-kx-priority! client (list kx/anon-dh))
+  ;; Set the priorities for the session. See "Priority Strings" in the GNUTLS manual for
+  ;; further details. The options used here are as follows:
+  ;; NORMAL:   Start with the default settings.
+  ;; -KX-ALL:  Don't use certificate-based authentication.
+  ;; +ANON-DH: Request the "anonymous Diffie-Hellman" key exchange method.
+  (set-session-priorities! client "NORMAL:-KX-ALL:+ANON-DH")
 
   ;; Specify the underlying socket.
   (set-session-transport-fd! client (fileno some-socket))
@@ -520,8 +521,7 @@ The corresponding server would look like this (again, assuming
 
 (let ((server (make-session connection-end/server)))
   (set-session-default-priority! server)
-  (set-session-certificate-type-priority! server '())
-  (set-session-kx-priority! server (list kx/anon-dh))
+  (set-session-priorities! server "NORMAL:-KX-ALL:+ANON-DH")
 
   ;; Specify the underlying transport socket.
   (set-session-transport-fd! server (fileno some-socket))
```

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/guile/-/issues/16
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20230813/94222b6c/attachment-0001.html>


More information about the Gnutls-devel mailing list