Subversion Repositories pike

Compare Revisions

Ignore whitespace Rev 116 → Rev 117

/trunk/debian/control
5,7 → 5,7
Uploaders: Henrik Andreasson <debian@han.pp.se>
Standards-Version: 3.9.1
Build-Depends: debhelper (>= 5), bison, sharutils, bc, pkg-config,
libgmp3-dev, nettle-dev,
libgmp3-dev, nettle-dev (>= 2.1),
zlib1g-dev | libz-dev, libbz2-dev,
libgdbm-dev, libiodbc2-dev, libmysqlclient-dev, libpq-dev, libsqlite3-dev,
libpcre3-dev,
/trunk/debian/patches/nettle-2.1.patch
0,0 → 1,61
--- a/src/post_modules/Nettle/cipher.cmod
+++ b/src/post_modules/Nettle/cipher.cmod
@@ -572,23 +572,11 @@ pike_des_set_key(void *c,
if (!des_set_key(ctx, (const uint8_t *)key))
{
- switch (ctx->status)
- {
- case DES_WEAK_KEY:
if (force)
/* Use key anyway */
- ctx->status = DES_OK;
+ ;
else
Pike_error("DES_INFO: Key is weak.\n");
- break;
-
- case DES_BAD_PARITY:
- /* FIXME: I don't think this should be visible in the user
- * interface, the parity bits should just be ignored. */
- Pike_error("DES_INFO: Key has bad parity.\n");
- default:
- Pike_error("DES_INFO: Unexpected error, please send a bug report.\n");
- }
}
}
@@ -742,28 +730,15 @@ pike_des3_set_key(void *c,
break;
}
- /* The hack of resetting ctx->status to use a weak key doesn't
- * currently work with nettle's des3_set_key function. So we set the
- * individual keys by ourself. */
- for (i = 0; i<3; i++, key += DES_KEY_SIZE)
- if (!des_set_key(&ctx->des[i], (const uint8_t *)key))
- switch (ctx->des[i].status)
- {
- case DES_WEAK_KEY:
+ /* Since Nettle 2.1 has removed the status field and simply returns
+ zero if the key is weak, we can simply call des3_set_key */
+ if (!des3_set_key(ctx, (const uint8_t *)key)) {
if (force)
/* Use key anyway */
- ctx->des[i].status = DES_OK;
+ ;
else
Pike_error("DES3_INFO: Key is weak.\n");
- break;
-
- case DES_BAD_PARITY:
- /* FIXME: I don't think this should be visible in the user
- * interface, the parity bits should just be ignored. */
- Pike_error("DES3_INFO: Key has bad parity.\n");
- default:
- Pike_error("DES3_INFO: Unexpected error, please send a bug report.\n");
- }
+ }
}
#define pike_des3_set_encrypt_key pike_des3_set_key
#define pike_des3_set_decrypt_key pike_des3_set_key
/trunk/debian/patches/series
8,3 → 8,4
pthread_stub.patch
unbreak_cross_compilation.patch
dumping_problems.patch
nettle-2.1.patch
/trunk/debian/changelog
1,8 → 1,9
pike7.8 (7.8.352-dfsg-5) unstable; urgency=low
 
* Convert to source format 3.0 (quilt).
* nettle-2.1.patch (new): Adjust Nettle module to build with Nettle 2.1.
 
-- Magnus Holmgren <holmgren@debian.org> Sat, 19 Mar 2011 22:40:26 +0100
-- Magnus Holmgren <holmgren@debian.org> Sat, 19 Mar 2011 23:24:55 +0100
 
pike7.8 (7.8.352-dfsg-4) unstable; urgency=low