all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: 17312@debbugs.gnu.org
Subject: bug#17312: ‘guix authenticate’ failure in C locale
Date: Tue, 22 Apr 2014 10:51:34 +0200	[thread overview]
Message-ID: <87y4yx21d5.fsf@gnu.org> (raw)

As seen in <http://hydra.gnu.org/build/54212>, ‘guix authenticate’ could
fail when running in the C locale (as is the case on hydra.gnu.org):

--8<---------------cut here---------------start------------->8---
@ build-started /gnu/store/639n30wn56fsnvxnp5sv4nxshxdsym32-gmp-6.0.0a.drv - x86_64-linux /nix/var/log/guix/drvs/63//9n30wn56fsnvxnp5sv4nxshxdsym32-gmp-6.0.0a.drv
sending 2 store files to 'hydra.gnunet.org'...
importing path `/gnu/store/hyr8lvpbl2lbbkvr5v1qa25895bpcxls-gmp-6.0.0a-guile-builder'
guix archive: error: build failed: program `guix-authenticate' failed with exit code 1
builder for `/gnu/store/639n30wn56fsnvxnp5sv4nxshxdsym32-gmp-6.0.0a.drv' failed to produce output path `/gnu/store/6va1dygagfrlc1xqy71ckawh4cymrl4h-gmp-6.0.0a-debug'
@ hook-failed /gnu/store/639n30wn56fsnvxnp5sv4nxshxdsym32-gmp-6.0.0a.drv - 0 builder for `/gnu/store/639n30wn56fsnvxnp5sv4nxshxdsym32-gmp-6.0.0a.drv' failed to produce output path `/gnu/store/6va1dygagfrlc1xqy71ckawh4cymrl4h-gmp-6.0.0a-debug'
--8<---------------cut here---------------end--------------->8---

The problem was that it could in some cases produce a signature sexp
with an invalid hash value.  For example:

  guix  archive --export /gnu/store/hyr8lvpbl2lbbkvr5v1qa25895bpcxls-gmp-6.0.0a-guile-builder

would produce an archive with a signature sexp like this (literally):

  (signature 
   (data 
    (flags pkcs1)
    (hash sha256 "^?\vU????{N4?`??eL??x???|1y????{L")
    )

  [...]

The problem is that the hash value shown here is the result of
substituting non-ASCII characters with question marks and other things.
Obviously signature verification on such a thing would fail, leading to
errors like the one above.

This could happen in some cases, when libgcrypt would choose to use a
byte string representation instead of a hexadecimal string, and is due
to the fact that ‘string->canonical-sexp’ would convert strings passed
to ‘gcry_sexp_new’ to locale encoding.

This is fixed with commit 6030d84 (see that commit for a concrete
example.)

Ludo’.

             reply	other threads:[~2014-04-22  8:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-04-22  8:51 Ludovic Courtès [this message]
2014-04-22 11:35 ` bug#17312: ‘guix authenticate’ failure in C locale Ludovic Courtès

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87y4yx21d5.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=17312@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.