Updating snow package utils to use pkcs1 padding.

This commit is contained in:
Alex Shinn 2014-06-23 07:54:51 +09:00
parent 34e1a27cb1
commit 638ea1bf8a
2 changed files with 3 additions and 2 deletions

View file

@ -11,7 +11,7 @@
(else (call-with-output-string (lambda (out) (display x out))))))
(define (maybe-parse-hex x)
(if (string? x) (string->number x 16) x))
(if (string? x) (hex-string->bytevector x) x))
;; rsa key utils
@ -134,7 +134,7 @@
(maybe-parse-hex digest)
(maybe-parse-hex sig)))
`(sign: rsa-signature-invalid: digest: ,digest sig: ,sig
actual: ,(rsa-encrypt rsa-key digest)))
actual: ,(rsa-verify rsa-key (maybe-parse-hex digest))))
(else #f))))
(define (package-signature-ok? cfg pkg raw)

View file

@ -17,6 +17,7 @@
(import (chibi)
(srfi 1)
(chibi snow interface)
(chibi bytevector)
(chibi config)
(chibi crypto md5)
(chibi crypto rsa)