Mercurial > hg > quicktun
diff src/proto.nacltai.c @ 32:51c6d2fc712f V2.1.8
Fixes contributed by Daniel Dickinson <daniel@cshore.neomailbox.net>
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Wed, 12 Oct 2011 01:34:46 +0200 |
parents | 6f0e6b7dc088 |
children | bb4bbf380938 |
line wrap: on
line diff
--- a/src/proto.nacltai.c Wed Oct 12 01:11:48 2011 +0200 +++ b/src/proto.nacltai.c Wed Oct 12 01:34:46 2011 +0200 @@ -174,13 +174,13 @@ crypto_scalarmult_curve25519_base(cownpublickey, csecretkey); - if (envval = getenv("TIME_WINDOW")) { + if (envval = getconf("TIME_WINDOW")) { taia_now(&d->cdtaip); d->cdtaip.sec.x -= atol(envval); } else { fprintf(stderr, "Warning: TIME_WINDOW not set, risking an initial replay attack\n"); } - if (envval = getenv("ROLE")) { + if (envval = getconf("ROLE")) { d->cenonce[nonceoffset-1] = atoi(envval) ? 1 : 0; } else { d->cenonce[nonceoffset-1] = memcmp(cownpublickey, cpublickey, crypto_box_curve25519xsalsa20poly1305_PUBLICKEYBYTES) > 0 ? 1 : 0;