Skip to content

Loading…

Problems in cipher.lisp when compiling with ECL #24

Closed
ralcantaraperez opened this Issue · 2 comments

2 participants

@ralcantaraperez

I'm trying to compile using ECL 12.7.1 and I have a problem in src/ciphers/cipher.lisp with function generate-key-verifier-methods. It fails because:

(equal (array-element-type key) '(unsigned-byte 8)) 

Is always false on ECL (even when the array has been created with ascii-string-to-byte-array). This patch solves the problem:

diff -uNr ironclad_0.31/src/ciphers/cipher.lisp ironclad_0.31-patched/src/ciphers/cipher.lisp
--- ironclad_0.31/src/ciphers/cipher.lisp       2012-08-31 12:53:28.455080168 +0200
+++ ironclad_0.31-patched/src/ciphers/cipher.lisp       2012-08-31 12:49:36.115074219 +0200
@@ -284,7 +284,7 @@
 (defun generate-key-verifier-methods (name key-length-spec)
   (let ((acceptable-key-lengths (acceptable-key-lengths key-length-spec)))
     `(defmethod verify-key ((cipher ,name) (key vector))
-      (unless (equal (array-element-type key) '(unsigned-byte 8))
+      (unless (equal (array-element-type key) (upgraded-array-element-type '(unsigned-byte 8)))
         (error 'type-error :expected-type '(vector (unsigned-byte 8))
                :datum key))
       (let ((length (length key)))
@froydnj froydnj closed this in 8773097
@froydnj
Owner

Thanks for the patch!

@ralcantaraperez
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.