summaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-16 09:55:44 +0200
committerNikos Mavrogiannopoulos <nmav@redhat.com>2017-06-16 15:31:51 +0200
commit2bf2ca6174e7e3fcbda8362a500f2d6a92716367 (patch)
treee1f14e1c60e11cf03cb84e600c6ed886804c590c /guile
parent598e5aa40d1fdd018f0c86f2737d7360ce3517e1 (diff)
downloadgnutls-2bf2ca6174e7e3fcbda8362a500f2d6a92716367.tar.gz
guile: removed openpgp related tests
Signed-off-by: Nikos Mavrogiannopoulos <nmav@redhat.com>
Diffstat (limited to 'guile')
-rw-r--r--guile/Makefile.am13
-rw-r--r--guile/tests/openpgp-auth.scm105
-rw-r--r--guile/tests/openpgp-elg-pub.asc24
-rw-r--r--guile/tests/openpgp-elg-sec.asc32
-rw-r--r--guile/tests/openpgp-keyring.asc37
-rw-r--r--guile/tests/openpgp-keyring.gpgbin1503 -> 0 bytes
-rw-r--r--guile/tests/openpgp-keyring.scm71
-rw-r--r--guile/tests/openpgp-keys.scm71
-rw-r--r--guile/tests/openpgp-pub.asc27
-rw-r--r--guile/tests/openpgp-sec.asc35
10 files changed, 0 insertions, 415 deletions
diff --git a/guile/Makefile.am b/guile/Makefile.am
index acbb594e2c..95fa96c66b 100644
--- a/guile/Makefile.am
+++ b/guile/Makefile.am
@@ -104,13 +104,6 @@ TESTS = \
tests/x509-auth.scm \
tests/priorities.scm
-if ENABLE_OPENPGP
-TESTS += \
- tests/openpgp-keys.scm \
- tests/openpgp-keyring.scm \
- tests/openpgp-auth.scm
-endif
-
if ENABLE_SRP
TESTS += \
tests/srp-base64.scm
@@ -125,12 +118,6 @@ LOG_COMPILER = $(top_builddir)/guile/pre-inst-guile -L $(srcdir)/tests
EXTRA_DIST += \
$(TESTS) \
- tests/openpgp-pub.asc \
- tests/openpgp-sec.asc \
- tests/openpgp-elg-pub.asc \
- tests/openpgp-elg-sec.asc \
- tests/openpgp-keyring.gpg \
- tests/openpgp-keyring.asc \
tests/rsa-parameters.pem \
tests/dh-parameters.pem \
tests/x509-certificate.pem \
diff --git a/guile/tests/openpgp-auth.scm b/guile/tests/openpgp-auth.scm
deleted file mode 100644
index 8c732ce077..0000000000
--- a/guile/tests/openpgp-auth.scm
+++ /dev/null
@@ -1,105 +0,0 @@
-;;; GnuTLS-extra --- Guile bindings for GnuTLS-EXTRA.
-;;; Copyright (C) 2007-2014, 2016 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
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; GnuTLS-extra is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GnuTLS-EXTRA; if not, write to the Free Software
-;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-;;; USA.
-
-;;; Written by Ludovic Courtès <ludo@chbouib.org>.
-
-
-;;;
-;;; Test session establishment using OpenPGP certificate authentication.
-;;;
-
-(use-modules (gnutls)
- (gnutls build tests)
- (srfi srfi-4))
-
-
-;; TLS session settings.
-(define priorities
- "NONE:+VERS-TLS-ALL:+CTYPE-OPENPGP:+CIPHER-ALL:+MAC-ALL:+SIGN-ALL:+DHE-RSA:+DHE-DSS:+COMP-ALL")
-
-;; Message sent by the client.
-(define %message
- (cons "hello, world!" (iota 4444)))
-
-(define (import-something import-proc file fmt)
- (let* ((path (search-path %load-path file))
- (size (stat:size (stat path)))
- (raw (make-u8vector size)))
- (uniform-vector-read! raw (open-input-file path))
- (import-proc raw fmt)))
-
-(define (import-key import-proc file)
- (import-something import-proc file openpgp-certificate-format/base64))
-
-(define (import-dh-params file)
- (import-something pkcs3-import-dh-parameters file
- x509-certificate-format/pem))
-
-;; Debugging.
-;; (set-log-level! 3)
-;; (set-log-procedure! (lambda (level str)
-;; (format #t "[~a|~a] ~a" (getpid) level str)))
-
-(run-test
- (lambda ()
- (let ((socket-pair (socketpair PF_UNIX SOCK_STREAM 0))
- (pub (import-key import-openpgp-certificate
- "openpgp-pub.asc"))
- (sec (import-key import-openpgp-private-key
- "openpgp-sec.asc")))
- (with-child-process pid
- ;; server-side
- (let ((server (make-session connection-end/server))
- (dh (import-dh-params "dh-parameters.pem")))
- (set-session-priorities! server priorities)
- (set-server-session-certificate-request! server
- certificate-request/require)
-
- (set-session-transport-fd! server (port->fdes (cdr socket-pair)))
- (let ((cred (make-certificate-credentials)))
- (set-certificate-credentials-dh-parameters! cred dh)
- (set-certificate-credentials-openpgp-keys! cred pub sec)
- (set-session-credentials! server cred))
- (set-session-dh-prime-bits! server 1024)
-
- (handshake server)
- (let ((msg (read (session-record-port server)))
- (auth-type (session-authentication-type server)))
- (bye server close-request/rdwr)
- (and (zero? (cdr (waitpid pid)))
- (eq? auth-type credentials/certificate)
- (equal? msg %message))))
-
- ;; client-side (child process)
- (let ((client (make-session connection-end/client))
- (cred (make-certificate-credentials)))
- (set-session-priorities! client priorities)
-
- (set-certificate-credentials-openpgp-keys! cred pub sec)
- (set-session-credentials! client cred)
- (set-session-dh-prime-bits! client 1024)
-
- (set-session-transport-fd! client (port->fdes (car socket-pair)))
-
- (handshake client)
- (write %message (session-record-port client))
- (bye client close-request/rdwr)
-
- (primitive-exit))))))
-
-;;; arch-tag: 1a973ed5-f45d-45a4-8160-900b6a8c27ff
diff --git a/guile/tests/openpgp-elg-pub.asc b/guile/tests/openpgp-elg-pub.asc
deleted file mode 100644
index 6bdfabf9d2..0000000000
--- a/guile/tests/openpgp-elg-pub.asc
+++ /dev/null
@@ -1,24 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-
-mQGiBDxKxWwRBADnLna2Lu+po71ZQJMpJBgFDALXAp1sogZu/DTIYDhifGQ+saZS
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KxK/SE1Nv4+luydCuplFktXbgGzeo3KifKyV9CIRgQY
-EQIABgUCPErFbwAKCRC9VyzczMB8NXVmAJ9gHh+Z4LB8d+Z/Puyh4Z+UY9NzZwCf
-asaetBGab/v0SefRVNguBdQIYds=
-=GwWK
------END PGP PUBLIC KEY BLOCK-----
diff --git a/guile/tests/openpgp-elg-sec.asc b/guile/tests/openpgp-elg-sec.asc
deleted file mode 100644
index 58bafeea47..0000000000
--- a/guile/tests/openpgp-elg-sec.asc
+++ /dev/null
@@ -1,32 +0,0 @@
------BEGIN PGP PRIVATE KEY BLOCK-----
-
-lQG7BDxKxWwRBADnLna2Lu+po71ZQJMpJBgFDALXAp1sogZu/DTIYDhifGQ+saZS
-p68dN89G/FBaweDGmbN4lbS8s+U1Qf/aR2bWFowriq/WqyJGbQbRgDTV2saY5pk7
-pbNQ/4IuHNhwKnURTotzprCcs7k85E27UWybtflbtmYYhgKgoURyNsBljwCgj1te
-eNhfeSzCBy+UdGRXJvtNk3MD/jV41onWYG6RGOn5pwQrljzyPz2PE3eic8Dwl02/
-RLPKvL4U3WRBJVWGPjmpxidmLXesNmYq5El5LDJi0/EumDKnVlMJ1nugrk3yX17a
-CTcFatW+ifQGnr1+x2zkMkQd9dUv/9BtOeX2HjaUe2mKd8tiq4HkpBIr+QUGcdmU
-bIZeBADQYUN6lk3eMYgYwrJN4AjmAJa2DbimhLhag40Rn8kwMRiJrVejuSf0SPhO
-slPGI+2nO0L/eLzmOmpTHXWmTOhUBROAjp9bEM4HXTQXuAEWSRixMdNUTIdlqOy5
-lx9hoJ/HPVCYBhBrWXfSEcsOHQTQ7Za86Juuj3PYALBSE5y/jQAAn2P+O9oRyd/b
-1jXd4F2H8SSzMMu3DM/9JiM6RFNBX2ZhY3RvcjoAAK9+8VCrUSp2tkcQT5PxLJzr
-ENoOP4NB/SYjOkRTQV9mYWN0b3I6AACvTy8J9Y0wrRLLV4I96AjHaNfLwQp9E/0m
-IzpEU0FfZmFjdG9yOgAAr2T4C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VATE KEY BLOCK-----
diff --git a/guile/tests/openpgp-keyring.asc b/guile/tests/openpgp-keyring.asc
deleted file mode 100644
index 4495a5a8e3..0000000000
--- a/guile/tests/openpgp-keyring.asc
+++ /dev/null
@@ -1,37 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.6 (GNU/Linux)
-
-mQGiBDxnlY0RBACAsWUhi/goBvpvTBgL8fFPwBAuD04VYFEtC7+4pBp6kFsHjUR7
-TTUkBsOk2PvMHrDdv0+C4x2CH8YGP1e+O0f2yLWk8Uu+kkF12yiqbbvDEiCdeJT6
-c3vIstY8vJ9Jso5g/LB8Xggq88R7jXFS3hH+WC5v/6P6SARfzXl457cVewCgvxSf
-Gsm9mFospJ0B3RGyg5MB0d8D/RQQryJCGdR2nLe4VfctPL2QBD/1XhtubqEbetaV
-PxssqrJdA+eplBRT7UHokSBahM8gmSmNuSrLDujPfEtaMg6YIkB+Kq0VeJLE0cXT
-ZIH29KJlI/qk1xG4K7D6B0cKaHC/L4BIoKcQLJzfTIPw3frS4jVeNaQZNHSVqZ8/
-VmOMA/9rkNtccQ4RVd9WTFoHKvT4vfiISEOIzKGmcBY9Hymq7MCci3mNe4CDImkv
-ZgnjDlJAM91CX1ODthPLBqvyhnMhhxDnaDl4Nh42uPMSr9JEW2IwoIbFne10ihGT
-O4lBS1C28UfSGEMm/8JBMtxAjbYy3BYzUtCMA+bGBG6Voe5i5LQlRHIuIFdobyAo
-Tm8gY29tbWVudHMpIDx3aG9Ad2hvaXMub3JnPohdBBMRAgAdBQI8Z5WNBQkDwmcA
-BQsHCgMEAxUDAgMWAgECF4AACgkQNRRc6qfZPD+WWACfeJnLyfbpTDB7mDh3aATb
-+0PXz28AoKRdApBVM6Bty+vWyXH6HfF6ZTj+mQGiBDxKxWwRBADnLna2Lu+po71Z
-QJMpJBgFDALXAp1sogZu/DTIYDhifGQ+saZSp68dN89G/FBaweDGmbN4lbS8s+U1
-Qf/aR2bWFowriq/WqyJG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X0IhOBBgRAgAGBQI8SsVvABIJ
-EL1XLNzMwHw1B2VHUEcAAQF1ZgCfYB4fmeCwfHfmfz7soeGflGPTc2cAn2rGnrQR
-mm/79Enn0VTYLgXUCGHb
-=7B/E
------END PGP PUBLIC KEY BLOCK-----
diff --git a/guile/tests/openpgp-keyring.gpg b/guile/tests/openpgp-keyring.gpg
deleted file mode 100644
index f78440407b..0000000000
--- a/guile/tests/openpgp-keyring.gpg
+++ /dev/null
Binary files differ
diff --git a/guile/tests/openpgp-keyring.scm b/guile/tests/openpgp-keyring.scm
deleted file mode 100644
index 957b952651..0000000000
--- a/guile/tests/openpgp-keyring.scm
+++ /dev/null
@@ -1,71 +0,0 @@
-;;; GnuTLS-extra --- Guile bindings for GnuTLS-EXTRA.
-;;; Copyright (C) 2007-2012, 2014 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
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; GnuTLS-extra is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GnuTLS-EXTRA; if not, write to the Free Software
-;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-;;; USA.
-
-;;; Written by Ludovic Courtès <ludo@chbouib.org>.
-
-
-;;;
-;;; Exercise the OpenPGP keyring API part of GnuTLS-extra.
-;;;
-
-(use-modules (gnutls)
- (gnutls build tests)
- (srfi srfi-1)
- (srfi srfi-4))
-
-(define %raw-keyring-file
- (search-path %load-path "openpgp-keyring.gpg"))
-
-(define %ascii-keyring-file
- (search-path %load-path "openpgp-keyring.asc"))
-
-(define %ids-in-keyring
- ;; The IDs of keys that are in the keyring.
- ;; Change me if you change the keyring file.
- (list '#u8(#x35 #x14 #x5c #xea
- #xa7 #xd9 #x3c #x3f)
- '#u8(#xbd #x57 #x2c #xdc
- #xcc #xc0 #x7c #x35)))
-
-(define (file-size file)
- (stat:size (stat file)))
-
-(define (valid-keyring? file format)
- ;; Return true if FILE contains a valid keyring encoded in FORMAT.
- (let ((raw-keyring (make-u8vector (file-size file))))
-
- (uniform-vector-read! raw-keyring (open-file file "rb"))
-
- (let ((keyring (import-openpgp-keyring raw-keyring format))
- (null-id (make-u8vector 8 0)))
-
- (and (openpgp-keyring? keyring)
- (not (openpgp-keyring-contains-key-id? keyring null-id))
- (every (lambda (id)
- (openpgp-keyring-contains-key-id? keyring id))
- %ids-in-keyring)))))
-
-(run-test
- (lambda ()
- (every valid-keyring?
- (list %raw-keyring-file
- %ascii-keyring-file)
- (list openpgp-certificate-format/raw
- openpgp-certificate-format/base64))))
-
-;;; arch-tag: 516bf608-5c8b-4787-abe9-5f7b6e6d660b
diff --git a/guile/tests/openpgp-keys.scm b/guile/tests/openpgp-keys.scm
deleted file mode 100644
index a7ca0f193a..0000000000
--- a/guile/tests/openpgp-keys.scm
+++ /dev/null
@@ -1,71 +0,0 @@
-;;; GnuTLS-extra --- Guile bindings for GnuTLS-EXTRA.
-;;; Copyright (C) 2007-2012 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
-;;; the Free Software Foundation; either version 3 of the License, or
-;;; (at your option) any later version.
-;;;
-;;; GnuTLS-extra is distributed in the hope that it will be useful,
-;;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-;;; GNU General Public License for more details.
-;;;
-;;; You should have received a copy of the GNU General Public License
-;;; along with GnuTLS-EXTRA; if not, write to the Free Software
-;;; Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301,
-;;; USA.
-
-;;; Written by Ludovic Courtès <ludo@chbouib.org>.
-
-
-;;;
-;;; Exercise the OpenPGP key API part of GnuTLS-extra.
-;;;
-
-(use-modules (gnutls)
- (gnutls build tests)
- (srfi srfi-1)
- (srfi srfi-4)
- (srfi srfi-11))
-
-(define %certificate-file
- (search-path %load-path "openpgp-elg-pub.asc"))
-
-(define %private-key-file
- (search-path %load-path "openpgp-elg-sec.asc"))
-
-(define %key-id
- ;; Change me if you change the key files.
- '#u8(#xbd #x57 #x2c #xdc #xcc #xc0 #x7c #x35))
-
-(define (file-size file)
- (stat:size (stat file)))
-
-
-(run-test
- (lambda ()
- (let ((raw-pubkey (make-u8vector (file-size %certificate-file)))
- (raw-privkey (make-u8vector (file-size %private-key-file))))
-
- (uniform-vector-read! raw-pubkey (open-input-file %certificate-file))
- (uniform-vector-read! raw-privkey (open-input-file %private-key-file))
-
- (let ((pub (import-openpgp-certificate raw-pubkey
- openpgp-certificate-format/base64))
- (sec (import-openpgp-private-key raw-privkey
- openpgp-certificate-format/base64)))
-
- (and (openpgp-certificate? pub)
- (openpgp-private-key? sec)
- (equal? (openpgp-certificate-id pub) %key-id)
- (u8vector? (openpgp-certificate-fingerprint pub))
- (every string? (openpgp-certificate-names pub))
- (member (openpgp-certificate-version pub) '(3 4))
- (list? (openpgp-certificate-usage pub))
- (let-values (((pk bits)
- (openpgp-certificate-algorithm pub)))
- (and (string? (pk-algorithm->string pk))
- (number? bits))))))))
-
-;;; arch-tag: 2ee2a377-7f4d-4031-92a8-275090e4f83d
diff --git a/guile/tests/openpgp-pub.asc b/guile/tests/openpgp-pub.asc
deleted file mode 100644
index 4aa5cf921d..0000000000
--- a/guile/tests/openpgp-pub.asc
+++ /dev/null
@@ -1,27 +0,0 @@
------BEGIN PGP PUBLIC KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-Comment: Test key for GnuTLS
-
-mI0ETYD2OQEEAMHmDBtJii82NbWuYcvEWCYnwa7GTcz2PYikYCcq/t5nkyb5Bfmx
-mh2hpto7Lr5d1L/shvab1gXCcrWE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VsSU6ADCkMuGT3LLNo+UnckK+4i
-BACcivWsW40ddtEQ0wno1uP65TmKq3aJrdODXTAnqkmNQKL7X7Fz+nmEWiS+LBH8
-lRvAaeRPX2LV+DCJDbAPrYd7LkOHyuM0I+ZApto5cjem/EnO7op2QwkCCa6oUp0l
-YA6i6aGF2KGx7WQwi2URIMPhihpOvAbkjfszYpFL4VP5wQ==
-=ydIq
------END PGP PUBLIC KEY BLOCK-----
diff --git a/guile/tests/openpgp-sec.asc b/guile/tests/openpgp-sec.asc
deleted file mode 100644
index 886ba3453c..0000000000
--- a/guile/tests/openpgp-sec.asc
+++ /dev/null
@@ -1,35 +0,0 @@
------BEGIN PGP PRIVATE KEY BLOCK-----
-Version: GnuPG v1.4.10 (GNU/Linux)
-Comment: Test key for GnuTLS
-
-lQHYBE2A9jkBBADB5gwbSYovNjW1rmHLxFgmJ8Guxk3M9j2IpGAnKv7eZ5Mm+QX5
-sZodoabaOy6+XdS/7Ib2m9YFwnK1hAERIDTZPS4qMLS7kxwXXjhZSdbtT9a73RVS
-qtmun7e+0OVZbVAyj4E6s+DVh9ilJS3078CQ56tg8WLG8FaQQ1EblKHF4QARAQAB
-AAP9HJePsXZmqg+UW/Ya9bE+TmIObXdQgajN6hhTFXOBocokKNsPxoIp97Sepg+U
-FP5BIQv/2t2f8bl6sMmGXsAhCqVzRxGuA+9USx8OfTHSdgIKT5T2VFSGJaU4df3Q
-rstUY3dcvl6VKpDDZic1T7u2ANzaWM2u+pwooKC4cc/k9AECAMNDvrKF3FC7R9sd
-TagVrrfde0RZuwhbGW9ghslkY893EelXQL/lbBI20crPdrsdDpMe370KO2bQLqwO
-HGAxIYUCAP41iC7KReYvysLZ34tM55ZFE7BPsMcXUeu6hkYOMDZYvE+x4KV6Umo+
-Civd4qD9dESR3WOcI9MwALUdNTxQU60B/21MrWjajY1m1vv7l2slJon5eSrH6BkH
-Aj173uZca8HbgqSF1xOQW8ZGa6KInN3wHe+vPOXAgzlku/4XHgEYVVGeq7QJ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