On 5/9/14, Ted Unangst <t...@tedunangst.com> wrote:
> On Fri, May 09, 2014 at 18:09, Ted Unangst wrote:
>> On Fri, May 09, 2014 at 19:49, Stuart Henderson wrote:
>>
>>> Works on amd64, but macppc fails tests:
>>>
>>> ===>  Regression tests for reop-1.0.0
>>> reop: decryption failed
>>
>> I'll one up that. It segfaults on sparc64. :(
>
> This will fix it, at the cost of making startup slow as balls. The one
> second test.sh now takes over 15 seconds to run.
>
> The libsodium documentation says this isn't required. Obviously, it's
> a crypto library, therefore it lies.
>
> diff -r b7b0f515429c reop.c
> --- a/reop.c    Sat Apr 19 11:32:25 2014 -0400
> +++ b/reop.c    Fri May 09 18:17:07 2014 -0400
> @@ -1054,6 +1054,7 @@
>                 VERIFY
>         } verb = NONE;
>
> +       sodium_init();
>
>         rounds = 42;

Ted, what is the purpose of the first if-statement
in readident()?

static char *
readident(char *buf, char *ident)
{
        if (IDENTLEN != 64)
                errx(1, "wrong IDENTLEN");
...

given on line 62:

#define IDENTLEN 64


$ cc -E /tmp/reop.c | grep -A3 ^readident
/tmp/reop.c:36:20: error: sodium.h: No such file or directory
readident(char *buf, char *ident)
{
 if (64 != 64)
  errx(1, "wrong IDENTLEN");


just curious.
--patrick

Reply via email to