Subversion Repositories lsh

Compare Revisions

Regard whitespace Rev 32 → Rev 33

/trunk/debian/control
5,7 → 5,7
Uploaders: Stefan Pfetzing <dreamind@dreamind.de>
Standards-Version: 3.7.3
Build-Depends: cdbs, debhelper (>= 5), dpatch, autotools-dev,
libgmp3-dev, zlib1g-dev | libz-dev, liboop-dev, libxau-dev, libnettle-dev,
libgmp3-dev, zlib1g-dev | libz-dev, liboop-dev, libxau-dev, nettle-dev,
texinfo (>= 4.2), guile-1.6 | scsh-0.6, heimdal-dev, libwrap0-dev | libwrap-dev,
libpam0g-dev | libpam-dev, libreadline5-dev | libreadline-dev, m4
Homepage: http://www.lysator.liu.se/~nisse/lsh/
/trunk/debian/patches/00list
1,3 → 1,4
20_sftp-server_mansection
30_nonettle
40_better_errmsg_when_dotlsh_missing
nettle_2.0
/trunk/debian/patches/30_nonettle.dpatch
9,7 → 9,7
dpatch_patch() {
if [ ! -f debian/patched/30_nonettle_orig.tar.gz ]; then
tar -czf debian/patched/30_nonettle_orig.tar.gz $FILES
sed -ri -e '/^LDADD/s%(\.\.?/)*nettle/libnettle\.a%-lnettle%' \
sed -ri -e '/^LDADD/,+1s%(\.\.?/)*nettle/libnettle\.a|-lnettle%-lnettle -lhogweed%' \
-e 's%\s*(-[IL]\s*)?(\.\.?/)*\bnettle(/libnettle\.a)?\b%%g' $FILES
mv src/nettle src/nettle-unused
fi
/trunk/debian/patches/nettle_2.0.dpatch
0,0 → 1,200
#! /bin/sh /usr/share/dpatch/dpatch-run
## nettle_2.0.dpatch by Magnus Holmgren <holmgren@debian.org>
##
## DP: Adapt to Nettle 2.0
 
@DPATCH@
diff -ur lsh-2.0.4/src/crypto.c /var/cache/users/magnus/svn-buildpackage/lsh-utils/lsh-utils-2.0.4-dfsg/src/crypto.c
--- lsh-2.0.4/src/crypto.c 2005-11-26 18:13:55.000000000 +0100
+++ lsh-utils-2.0.4-dfsg/src/crypto.c 2009-08-04 23:57:22.000000000 +0200
@@ -71,7 +71,7 @@
assert(!(length % 8));
lsh_string_crypt(dst, di, src, si, length,
- (nettle_crypt_func) arcfour_crypt, &self->ctx);
+ (nettle_crypt_func*) arcfour_crypt, &self->ctx);
}
static struct crypto_instance *
@@ -114,7 +114,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
AES_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) aes_encrypt,
+ (nettle_crypt_func*) aes_encrypt,
&self->ctx.ctx);
}
@@ -128,7 +128,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
AES_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) aes_decrypt,
+ (nettle_crypt_func*) aes_decrypt,
&self->ctx.ctx);
}
@@ -185,7 +185,7 @@
lsh_string_ctr_crypt(dst, di, src, si, length,
AES_BLOCK_SIZE, self->ctx.ctr,
- (nettle_crypt_func) aes_encrypt,
+ (nettle_crypt_func*) aes_encrypt,
&self->ctx.ctx);
}
@@ -227,7 +227,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
DES3_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) des3_encrypt,
+ (nettle_crypt_func*) des3_encrypt,
&self->ctx.ctx);
}
@@ -241,7 +241,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
DES3_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) des3_decrypt,
+ (nettle_crypt_func*) des3_decrypt,
&self->ctx.ctx);
}
@@ -303,7 +303,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
CAST128_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) cast128_encrypt,
+ (nettle_crypt_func*) cast128_encrypt,
&self->ctx.ctx);
}
@@ -317,7 +317,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
CAST128_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) cast128_decrypt,
+ (nettle_crypt_func*) cast128_decrypt,
&self->ctx.ctx);
}
@@ -363,7 +363,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
TWOFISH_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) twofish_encrypt,
+ (nettle_crypt_func*) twofish_encrypt,
&self->ctx.ctx);
}
@@ -377,7 +377,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
TWOFISH_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) twofish_decrypt,
+ (nettle_crypt_func*) twofish_decrypt,
&self->ctx.ctx);
}
@@ -422,7 +422,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
BLOWFISH_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) blowfish_encrypt,
+ (nettle_crypt_func*) blowfish_encrypt,
&self->ctx.ctx);
}
@@ -436,7 +436,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
BLOWFISH_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) blowfish_decrypt,
+ (nettle_crypt_func*) blowfish_decrypt,
&self->ctx.ctx);
}
@@ -488,7 +488,7 @@
lsh_string_cbc_encrypt(dst, di, src, si, length,
SERPENT_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) serpent_encrypt,
+ (nettle_crypt_func*) serpent_encrypt,
&self->ctx.ctx);
}
@@ -502,7 +502,7 @@
lsh_string_cbc_decrypt(dst, di, src, si, length,
SERPENT_BLOCK_SIZE, self->ctx.iv,
- (nettle_crypt_func) serpent_decrypt,
+ (nettle_crypt_func*) serpent_decrypt,
&self->ctx.ctx);
}
diff -ur lsh-2.0.4/src/lsh-make-seed.c /var/cache/users/magnus/svn-buildpackage/lsh-utils/lsh-utils-2.0.4-dfsg/src/lsh-make-seed.c
--- lsh-2.0.4/src/lsh-make-seed.c 2006-01-23 18:51:06.000000000 +0100
+++ lsh-utils-2.0.4-dfsg/src/lsh-make-seed.c 2009-08-05 00:24:58.000000000 +0200
@@ -1219,6 +1219,7 @@
struct yarrow256_ctx yarrow;
struct yarrow_source sources[NSOURCES];
+ uint8_t seed[YARROW256_SEED_FILE_SIZE];
argp_parse(&main_argp, argc, argv, 0, NULL, options);
@@ -1371,7 +1372,8 @@
}
}
- e = write_raw(fd, sizeof(yarrow.seed_file), yarrow.seed_file);
+ yarrow256_random(&yarrow, sizeof(seed), seed);
+ e = write_raw(fd, sizeof(seed), seed);
if (e)
{
diff -ur lsh-2.0.4/src/unix_random.c /var/cache/users/magnus/svn-buildpackage/lsh-utils/lsh-utils-2.0.4-dfsg/src/unix_random.c
--- lsh-2.0.4/src/unix_random.c 2006-01-23 18:47:10.000000000 +0100
+++ lsh-utils-2.0.4-dfsg/src/unix_random.c 2009-08-05 00:28:31.000000000 +0200
@@ -81,6 +81,7 @@
int fd)
{
const struct exception *e;
+ uint8_t seed[YARROW256_SEED_FILE_SIZE];
if (lseek(fd, 0, SEEK_SET) < 0)
{
@@ -88,7 +89,8 @@
return 0;
}
- e = write_raw(fd, YARROW256_SEED_FILE_SIZE, ctx->seed_file);
+ yarrow256_random(ctx, sizeof(seed), seed);
+ e = write_raw(fd, sizeof(seed), seed);
if (e)
{
@@ -183,17 +183,19 @@
{
struct lsh_string *s = read_seed_file(self->seed_file_fd);
- write_seed_file(&self->yarrow, self->seed_file_fd);
- KILL_RESOURCE(lock);
-
/* Mix in the old seed file, it might have picked up
* some randomness. */
if (s)
{
+ self->yarrow.sources[RANDOM_SOURCE_NEW_SEED].next = YARROW_FAST;
yarrow256_update(&self->yarrow, RANDOM_SOURCE_NEW_SEED,
0, STRING_LD(s));
lsh_string_free(s);
+ yarrow256_fast_reseed(&self->yarrow);
}
+
+ write_seed_file(&self->yarrow, self->seed_file_fd);
+ KILL_RESOURCE(lock);
}
}
/trunk/debian/changelog
5,8 → 5,12
* Add ${misc:Depends} to Depends of arch: any packages in case Debhelper
needs it in the future.
* Increase Debhelper compat level to 5.
* Build with Nettle 2.0 (nettle-dev).
* nettle_2.0.dpatch created to adapt to API changes.
* 30_nonettle.dpatch modified to add -lhogweed to LDADD where
appropriate.
 
-- Magnus Holmgren <holmgren@debian.org> Tue, 01 Sep 2009 22:54:57 +0200
-- Magnus Holmgren <holmgren@debian.org> Tue, 01 Sep 2009 23:06:33 +0200
 
lsh-utils (2.0.4-dfsg-2) unstable; urgency=low