Example Echo Client/Server Contains Removed Functions
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 --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))