Commit 84c4fdb6 authored by Ludovic Courtès's avatar Ludovic Courtès
Browse files

Require Guile-Gcrypt >= 0.2.0.

* configure.ac: Ensure we have the (gcrypt mac) module.
* jupyter/kernels.scm: Use (gcrypt mac) instead of (gcrypt hmac).
(generate-key): Call 'generate-signing-key'.
* jupyter/messages.scm: Use (gcrypt mac).
(get-signature): Use 'mac-algorithm' instead of a symbol.
parent 536d9f98
......@@ -40,8 +40,8 @@ if test "x$have_guile_json" != "xyes"; then
AC_MSG_ERROR([Guile-Json is missing; please install it.])
fi
dnl Check for Guile-Gcrypt.
GUILE_MODULE_AVAILABLE([have_guile_gcrypt], [(gcrypt hmac)])
dnl Check for Guile-Gcrypt >= 0.2.0.
GUILE_MODULE_AVAILABLE([have_guile_gcrypt], [(gcrypt mac)])
if test "x$have_guile_gcrypt" != "xyes"; then
AC_MSG_ERROR([Guile-Gcrypt could not be found; please install it.])
fi
......
......@@ -19,7 +19,7 @@
#:use-module (jupyter messages)
#:use-module (jupyter json)
#:use-module (guix build utils)
#:use-module (gcrypt hmac)
#:use-module (gcrypt mac)
#:use-module (gcrypt base64)
#:use-module (ice-9 rdelim)
#:use-module (ice-9 match)
......@@ -224,7 +224,7 @@ could not be found."
(define (generate-key)
"Return a string usable as a shared secret key between a kernel server and
its clients."
(base64-encode (gen-signing-key)))
(base64-encode (generate-signing-key)))
(define* (allocate-connection context transport ip key
#:key
......
......@@ -19,7 +19,7 @@
#:use-module (simple-zmq)
#:use-module (json)
#:use-module (jupyter json)
#:use-module (gcrypt hmac)
#:use-module (gcrypt mac)
#:use-module (gcrypt base16)
#:use-module (rnrs bytevectors)
#:use-module (srfi srfi-9)
......@@ -140,7 +140,7 @@
with KEY, another string."
(bytevector->base16-string
(sign-data key (string->utf8 str)
#:algorithm 'sha256)))
#:algorithm (mac-algorithm hmac-sha256))))
(define* (message-parts message key
#:key
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment