Subversion Repositories lsh

Compare Revisions

Ignore whitespace Rev 132 → Rev 133

/trunk/debian/changelog
1,3 → 1,10
lsh-utils (2.1-7) unstable; urgency=low
 
* nettle3.patch: fix pointer type mismatches, mainly changing length
variables from unsigned to size_t.
 
-- Magnus Holmgren <holmgren@debian.org> Wed, 03 Jun 2015 00:06:24 +0200
 
lsh-utils (2.1-6) unstable; urgency=low
 
* skip-argp.patch (new): Make sure we don't touch the embedded argp copy
/trunk/debian/patches/nettle3.patch
18,7 → 18,7
dsa_signature_init(&rs);
- res = (dsa_keypair_from_sexp_alist(&dsa, NULL,
+ res = (dsa_keypair_from_sexp_alist((struct dsa_public_key *)&dsa, dsa.y, NULL,
+ res = (dsa_keypair_from_sexp_alist((struct dsa_params *)&dsa, dsa.y, NULL,
RSA_KEYSIZE_LIMIT, DSA_SHA1_Q_BITS, &key->sexp)
&& spki_parse_type(key)
&& dsa_signature_from_sexp(&rs, &signature->sexp, DSA_SHA1_Q_BITS)
212,3 → 212,59
r, lsh_random,
NULL, progress,
512 + 64 * level, DSA_SHA1_Q_BITS))
--- a/src/lsh_string.c
+++ b/src/lsh_string.c
@@ -367,10 +367,10 @@ lsh_string_format_sexp(int transport, co
{
struct lsh_string *s;
va_list args;
- unsigned length;
+ size_t length;
struct nettle_buffer buffer;
- unsigned (*vformat)(struct nettle_buffer *, const char *, va_list)
+ size_t (*vformat)(struct nettle_buffer *, const char *, va_list)
= transport ? sexp_transport_vformat : sexp_vformat;
va_start(args, format);
@@ -415,7 +415,7 @@ int
lsh_string_base64_decode(struct lsh_string *s)
{
struct base64_decode_ctx ctx;
- uint32_t done = s->length;
+ size_t done = s->length;
base64_decode_init(&ctx);
--- a/src/randomness.c
+++ b/src/randomness.c
@@ -35,7 +35,7 @@
/* Wrapper for using lsh's randomness generator with nettle
* functions. */
void
-lsh_random(void *x, unsigned length, uint8_t *data)
+lsh_random(void *x, size_t length, uint8_t *data)
{
CAST_SUBTYPE(randomness, r, x);
RANDOM(r, length, data);
--- a/src/randomness.h
+++ b/src/randomness.h
@@ -84,6 +84,6 @@ make_system_random(void);
/* Randomness function matching nettle's expectations. */
void
-lsh_random(void *x, unsigned length, uint8_t *data);
+lsh_random(void *x, size_t length, uint8_t *data);
#endif /* LSH_RANDOMNESS_H_INCLUDED */
--- a/src/sexp.c
+++ b/src/sexp.c
@@ -97,7 +97,7 @@ lsh_sexp_to_string(struct sexp_iterator
struct lsh_string *
lsh_sexp_copy(struct sexp_iterator *i)
{
- unsigned length;
+ size_t length;
const uint8_t *subexpr = sexp_iterator_subexpr(i, &length);
return subexpr ? ssh_format("%ls", length, subexpr) : NULL;