summaryrefslogtreecommitdiff
path: root/guile
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2007-12-11 18:15:07 +0100
committerLudovic Courtès <ludo@gnu.org>2007-12-12 12:41:34 +0100
commit94a7936149cec4c2135382c9af98a24e71dfcce5 (patch)
treefd95b540c40513e16b42a2fc990051cb73fa10bb /guile
parente3c2847c04566c6def41e4fb19bebe62789abd3a (diff)
downloadgnutls-94a7936149cec4c2135382c9af98a24e71dfcce5.tar.gz
Update Guile OpenPGP test cases to use the new names.
* guile/tests/*.scm: Substitute `certificate' to `public-key' in tests using the OpenPGP API.
Diffstat (limited to 'guile')
-rw-r--r--guile/tests/openpgp-auth.scm4
-rw-r--r--guile/tests/openpgp-keyring.scm6
-rw-r--r--guile/tests/openpgp-keys.scm26
3 files changed, 19 insertions, 17 deletions
diff --git a/guile/tests/openpgp-auth.scm b/guile/tests/openpgp-auth.scm
index aac4e9f956..576f1ed8c3 100644
--- a/guile/tests/openpgp-auth.scm
+++ b/guile/tests/openpgp-auth.scm
@@ -48,7 +48,7 @@
(import-proc raw fmt)))
(define (import-key import-proc file)
- (import-something import-proc file openpgp-key-format/base64))
+ (import-something import-proc file openpgp-certificate-format/base64))
(define (import-rsa-params file)
(import-something pkcs1-import-rsa-parameters file
@@ -65,7 +65,7 @@
(lambda ()
(let ((socket-pair (socketpair PF_UNIX SOCK_STREAM 0))
- (pub (import-key import-openpgp-public-key
+ (pub (import-key import-openpgp-certificate
"openpgp-pub.asc"))
(sec (import-key import-openpgp-private-key
"openpgp-sec.asc")))
diff --git a/guile/tests/openpgp-keyring.scm b/guile/tests/openpgp-keyring.scm
index 721cb3488f..e58129465e 100644
--- a/guile/tests/openpgp-keyring.scm
+++ b/guile/tests/openpgp-keyring.scm
@@ -67,8 +67,10 @@
(lambda ()
(exit
(every valid-keyring?
- (list %raw-keyring-file %ascii-keyring-file)
- (list openpgp-key-format/raw openpgp-key-format/base64))))
+ (list %raw-keyring-file
+ %ascii-keyring-file)
+ (list openpgp-certificate-format/raw
+ openpgp-certificate-format/base64))))
(lambda ()
;; failure
diff --git a/guile/tests/openpgp-keys.scm b/guile/tests/openpgp-keys.scm
index 7e98241cf5..b02bebc8ee 100644
--- a/guile/tests/openpgp-keys.scm
+++ b/guile/tests/openpgp-keys.scm
@@ -29,7 +29,7 @@
(srfi srfi-4)
(srfi srfi-11))
-(define %public-key-file
+(define %certificate-file
(search-path %load-path "openpgp-pub.asc"))
(define %private-key-file
@@ -49,26 +49,26 @@
#t)
(lambda ()
- (let ((raw-pubkey (make-u8vector (file-size %public-key-file)))
+ (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 %public-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-public-key raw-pubkey
- openpgp-key-format/base64))
+ (let ((pub (import-openpgp-certificate raw-pubkey
+ openpgp-certificate-format/base64))
(sec (import-openpgp-private-key raw-privkey
- openpgp-key-format/base64)))
+ openpgp-certificate-format/base64)))
- (exit (and (openpgp-public-key? pub)
+ (exit (and (openpgp-certificate? pub)
(openpgp-private-key? sec)
- (equal? (openpgp-public-key-id pub) %key-id)
- (u8vector? (openpgp-public-key-fingerprint pub))
- (every string? (openpgp-public-key-names pub))
- (member (openpgp-public-key-version pub) '(3 4))
- (list? (openpgp-public-key-usage pub))
+ (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-public-key-algorithm pub)))
+ (openpgp-certificate-algorithm pub)))
(and (string? (pk-algorithm->string pk))
(number? bits))))))))