Skip Menu |

This queue is for tickets about the Crypt-Sodium CPAN distribution.

Report information
The Basics
Id: 95985
Status: resolved
Worked: 10 min
Priority: 0/
Queue: Crypt-Sodium

People
Owner: mike [...] mg2.org
Requestors: sgunderson [...] bigfoot.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Confusing length error messages
Date: Mon, 26 May 2014 22:35:00 +0200
To: bug-Crypt-Sodium [...] rt.cpan.org
From: "Steinar H. Gunderson" <sgunderson [...] bigfoot.com>
Hi, I'm trying to use crypto_box, and I get error messages like [fatal]: nonce must be exactly 32 bytes long. It turns out, from the code, that the check is actually on the public key, so it shouldn't say nonce at all. Furthermore, when there are two keys passed in (public and secret key), it should really say “public key” instead of just “key”. Last, it's a bit scary that when something dies and the web framework I'm using sends me a backtrace, it includes all keys since they are function arguments and you're using die() in there. Is there any way to work around that, short of filtering the backtraces myself? /* Steinar */ -- Homepage: http://www.sesse.net/
Fixed in 0.05, Corrected the incorrect text in the error messages, most of them were just referring to "nonce". I'm also now more specific wrt to what key the errors are talking about. This should just be a cosmetic fix. See also https://github.com/mgregoro/Crypt-Sodium/commit/90ac624ed0dd0450b22a95a9254074eebc5d96f8