From: Ludovic Courtès Date: Tue, 1 Mar 2011 22:51:19 +0000 (+0100) Subject: guile: Change tests to use priority strings. X-Git-Tag: gnutls_2_99_0~160 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31c85c662e370730d7410826b47d65f83259cfcf;p=thirdparty%2Fgnutls.git guile: Change tests to use priority strings. --- 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