summaryrefslogtreecommitdiff
path: root/guix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-12-30 22:19:19 +0100
committerLudovic Courtès <ludo@gnu.org>2013-12-30 22:19:19 +0100
commit36341854dfedc3d173d09e686ffc3e255c102b01 (patch)
tree28a4e2c8c0501e7e5fae33e2d8f65093b6d793db /guix
parentc909dab2697d90a82c388e5efa8dab0001d09938 (diff)
pk-crypto: Work around Libgcrypt bug <https://bugs.g10code.com/gnupg/issue1594>.
* guix/pk-crypto.scm (canonical-sexp-fold): Call 'nth-data' before 'nth' to work around <https://bugs.g10code.com/gnupg/issue1594>. * tests/pk-crypto.scm ("https://bugs.g10code.com/gnupg/issue1594"): New test.
Diffstat (limited to 'guix')
-rw-r--r--guix/pk-crypto.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/guix/pk-crypto.scm b/guix/pk-crypto.scm
index 0e7affcce8..cf18faea04 100644
--- a/guix/pk-crypto.scm
+++ b/guix/pk-crypto.scm
@@ -298,8 +298,11 @@ return #f if not found."
(if (= index len)
result
(loop (+ 1 index)
- (proc (or (canonical-sexp-nth sexp index)
- (canonical-sexp-nth-data sexp index))
+ ;; XXX: Call 'nth-data' *before* 'nth' to work around
+ ;; <https://bugs.g10code.com/gnupg/issue1594>, which
+ ;; affects 1.6.0 and earlier versions.
+ (proc (or (canonical-sexp-nth-data sexp index)
+ (canonical-sexp-nth sexp index))
result)))))
(error "sexp is not a list" sexp)))