]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
guile: Change tests to use priority strings.
authorLudovic Courtès <ludo@gnu.org>
Tue, 1 Mar 2011 22:51:19 +0000 (23:51 +0100)
committerLudovic Courtès <ludo@gnu.org>
Tue, 1 Mar 2011 22:51:19 +0000 (23:51 +0100)
guile/tests/anonymous-auth.scm
guile/tests/openpgp-auth.scm
guile/tests/x509-auth.scm

index 17f5e8047daed5a655d843a1df95f9476da19e75..be04fcdeeb5cd133fa0962979565c3de1efb1073 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GnuTLS --- Guile bindings for GnuTLS.
-;;; Copyright (C) 2007, 2010 Free Software Foundation, Inc.
+;;; Copyright (C) 2007, 2010, 2011 Free Software Foundation, Inc.
 ;;;
 ;;; GnuTLS is free software; you can redistribute it and/or
 ;;; modify it under the terms of the GNU Lesser General Public
 
 
 ;; TLS session settings.
-(define %protos  (list protocol/tls-1.0))
-(define %certs   '())
-(define %ciphers (list cipher/null cipher/arcfour cipher/aes-128-cbc
-                       cipher/aes-256-cbc))
-(define %kx      (list kx/anon-dh))
-(define %macs    (list mac/sha1 mac/rmd160 mac/md5))
+(define priorities
+  "NONE:+VERS-TLS-ALL:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+COMP-ALL:+ANON-DH")
 
 ;; Message sent by the client.
 (define %message (apply u8vector (iota 256)))
 
             (let ((client (make-session connection-end/client)))
               ;; client-side (child process)
-              (set-session-default-priority! client)
-              (set-session-certificate-type-priority! client %certs)
-              (set-session-kx-priority! client %kx)
-              (set-session-protocol-priority! client %protos)
-              (set-session-cipher-priority! client %ciphers)
-              (set-session-mac-priority! client %macs)
+              (set-session-priorities! client priorities)
 
               (set-session-transport-fd! client (fileno (car socket-pair)))
               (set-session-credentials! client (make-anonymous-client-credentials))
 
             (let ((server (make-session connection-end/server)))
               ;; server-side
-              (set-session-default-priority! server)
-              (set-session-certificate-type-priority! server %certs)
-              (set-session-kx-priority! server %kx)
-              (set-session-protocol-priority! server %protos)
-              (set-session-cipher-priority! server %ciphers)
-              (set-session-mac-priority! server %macs)
+              (set-session-priorities! server priorities)
 
               (set-session-transport-fd! server (fileno (cdr socket-pair)))
               (let ((cred (make-anonymous-server-credentials))
index fe3c0cf71f65253a218ed7c0b0277e2652a24f89..91dc9f33330926e21bd616dc8dfb62feca2e00a5 100644 (file)
@@ -1,5 +1,5 @@
 ;;; GnuTLS-extra --- Guile bindings for GnuTLS-EXTRA.
-;;; Copyright (C) 2007, 2008, 2010 Free Software Foundation, Inc.
+;;; Copyright (C) 2007, 2008, 2010, 2011 Free Software Foundation, Inc.
 ;;;
 ;;; GnuTLS-extra is free software; you can redistribute it and/or modify
 ;;; it under the terms of the GNU General Public License as published by
 
 
 ;; TLS session settings.
-(define %protos  (list protocol/tls-1.0))
-(define %certs   (list certificate-type/openpgp))
-(define %ciphers (list cipher/null cipher/arcfour cipher/aes-128-cbc
-                       cipher/aes-256-cbc))
-(define %kx      (list kx/rsa kx/rsa-export kx/dhe-rsa kx/dhe-dss))
-(define %macs    (list mac/sha1 mac/rmd160 mac/md5))
+(define priorities
+  "NONE:+VERS-TLS-ALL:+CTYPE-OPENPGP:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+DHE-DSS:+COMP-ALL")
 
 ;; Message sent by the client.
 (define %message
               (let ((client (make-session connection-end/client))
                     (cred   (make-certificate-credentials)))
                 ;; client-side (child process)
-                (set-session-default-priority! client)
-                (set-session-certificate-type-priority! client %certs)
-                (set-session-kx-priority! client %kx)
-                (set-session-protocol-priority! client %protos)
-                (set-session-cipher-priority! client %ciphers)
-                (set-session-mac-priority! client %macs)
+                (set-session-priorities! client priorities)
 
                 (set-certificate-credentials-openpgp-keys! cred pub sec)
                 (set-session-credentials! client cred)
                     (rsa    (import-rsa-params "rsa-parameters.pem"))
                     (dh     (import-dh-params "dh-parameters.pem")))
                 ;; server-side
-                (set-session-default-priority! server)
-                (set-session-certificate-type-priority! server %certs)
-                (set-session-kx-priority! server %kx)
-                (set-session-protocol-priority! server %protos)
-                (set-session-cipher-priority! server %ciphers)
-                (set-session-mac-priority! server %macs)
+                (set-session-priorities! server priorities)
                 (set-server-session-certificate-request! server
                          certificate-request/require)
 
index 83cf4238083020ef4cf6ac4a672e27421c344f57..5e0663298a1793b24e6514ca2cec3b351dcf57fe 100644 (file)
@@ -27,7 +27,7 @@
              (srfi srfi-4))
 
 
-;; TLS session settings.
+;; TLS session settings (using the deprecated method).
 (define %protos  (list protocol/tls-1.0))
 (define %certs   (list certificate-type/x509))
 (define %ciphers (list cipher/null cipher/arcfour cipher/aes-128-cbc