emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] scratch/tzz/nettle e8b49a1: WIP: GnuTLS: test that string


From: Teodor Zlatanov
Subject: [Emacs-diffs] scratch/tzz/nettle e8b49a1: WIP: GnuTLS: test that string IV is preserved
Date: Thu, 1 Jun 2017 13:01:10 -0400 (EDT)

branch: scratch/tzz/nettle
commit e8b49a1bc4e8718d5809678cc666c45d837d85c1
Author: Ted Zlatanov <address@hidden>
Commit: Ted Zlatanov <address@hidden>

    WIP: GnuTLS: test that string IV is preserved
---
 test/lisp/net/gnutls-tests.el | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/test/lisp/net/gnutls-tests.el b/test/lisp/net/gnutls-tests.el
index a4e7bb7..7cef8c1 100644
--- a/test/lisp/net/gnutls-tests.el
+++ b/test/lisp/net/gnutls-tests.el
@@ -273,9 +273,12 @@
                        (reverse (nth 0 reverse-output)))
                   ;; GNUTLS_RND_NONCE should be good enough to ensure this.
                   (should-not (member (secure-hash 'sha384 actual-iv 0 ivsize) 
actual-ivlist))
-                  (when (consp iv)
+                  (cond
+                   ((stringp iv)
+                    (should (equal iv actual-iv)))
+                   ((consp iv)
                     (push (secure-hash 'sha384 actual-iv 0 ivsize) 
actual-ivlist)
-                    (gnutls-tests-message "IV list length: %d" (length 
actual-ivlist)))
+                    (gnutls-tests-message "IV list length: %d" (length 
actual-ivlist))))
 
                   (gnutls-tests-message "%s %S" cipher cplist)
                   (gnutls-tests-message "key %S IV %S input %S auth %S => 
hexdata %S and reverse %S" key iv input auth (encode-hex-string data) reverse)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]