diff options
author | Ludovic Courtès <ludo@gnu.org> | 2011-03-01 23:51:19 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2011-03-01 23:51:19 +0100 |
commit | 31c85c662e370730d7410826b47d65f83259cfcf (patch) | |
tree | ad6d366a20a2e3a9a3f1b03d33216699b80e8459 /guile | |
parent | f7a0137f7f1aa5fb9b5707b976c4e50ae63157e2 (diff) | |
download | gnutls-31c85c662e370730d7410826b47d65f83259cfcf.tar.gz |
guile: Change tests to use priority strings.
Diffstat (limited to 'guile')
-rw-r--r-- | guile/tests/anonymous-auth.scm | 24 | ||||
-rw-r--r-- | guile/tests/openpgp-auth.scm | 24 | ||||
-rw-r--r-- | guile/tests/x509-auth.scm | 2 |
3 files changed, 11 insertions, 39 deletions
diff --git a/guile/tests/anonymous-auth.scm b/guile/tests/anonymous-auth.scm index 17f5e8047d..be04fcdeeb 100644 --- a/guile/tests/anonymous-auth.scm +++ b/guile/tests/anonymous-auth.scm @@ -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 @@ -28,12 +28,8 @@ ;; 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))) @@ -65,12 +61,7 @@ (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)) @@ -84,12 +75,7 @@ (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)) diff --git a/guile/tests/openpgp-auth.scm b/guile/tests/openpgp-auth.scm index fe3c0cf71f..91dc9f3333 100644 --- a/guile/tests/openpgp-auth.scm +++ b/guile/tests/openpgp-auth.scm @@ -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 @@ -29,12 +29,8 @@ ;; 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 @@ -79,12 +75,7 @@ (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) @@ -102,12 +93,7 @@ (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) diff --git a/guile/tests/x509-auth.scm b/guile/tests/x509-auth.scm index 83cf423808..5e0663298a 100644 --- a/guile/tests/x509-auth.scm +++ b/guile/tests/x509-auth.scm @@ -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 |