diff options
author | Werner Koch <[email protected]> | 2011-01-21 11:00:57 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2011-01-21 11:00:57 +0000 |
commit | 90b0ff23b7e51332592668e4034967c1aac1c593 (patch) | |
tree | a3ef4cbd4c679a954a2cceba218b54cc2e2e9be5 /common/convert.c | |
parent | Add ignore file (diff) | |
download | gnupg-90b0ff23b7e51332592668e4034967c1aac1c593.tar.gz gnupg-90b0ff23b7e51332592668e4034967c1aac1c593.zip |
Editorial changes and allow building with old libgcrypts.
Changed order of some conditional to make to put the special case into
the true branch. Indentation changes. Minor other changes to make the
ECC code more similar to the rest of our code.
It builds but many sefltests still fail. Need to fix that before
using it with an ECDH enabled libgcrypt.
[/]
2011-01-21 Werner Koch <[email protected]>
* configure.ac: Need Libgcrypt 1.4.6 due to AESWRAP.
(HAVE_GCRY_PK_ECDH): Add new test.
[agent/]
2011-01-21 Werner Koch <[email protected]>
* cvt-openpgp.c (GCRY_PK_ECDH) [!HAVE_GCRY_PK_ECDH]: New.
[include/]
2011-01-21 Werner Koch <[email protected]>
* cipher.h (GCRY_PK_USAGE_CERT): Remove compatibility macros
because we now require libgcrypt 1.4.6.
(GCRY_PK_ECDH): Add replacement.
Diffstat (limited to 'common/convert.c')
-rw-r--r-- | common/convert.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/common/convert.c b/common/convert.c index 0a0c46f8e..5df6b335e 100644 --- a/common/convert.c +++ b/common/convert.c @@ -23,7 +23,7 @@ #include <ctype.h> #include "util.h" -#include "gcrypt.h" +#include "gcrypt.h" /* FIXME: really needed? */ #define tohex(n) ((n) < 10 ? ((n) + '0') : (((n) - 10) + 'A')) @@ -250,7 +250,10 @@ hex2str_alloc (const char *hexstring, size_t *r_count) * caller must free with xfree * Returns NULL on error, never throws */ -char *mpi2hex( gcry_mpi_t m ) { +char * +mpi2hex( gcry_mpi_t m ) +{ +#warning we have code for this in libcrypt size_t nbytes; size_t nbytes2; int rc; @@ -270,7 +273,9 @@ char *mpi2hex( gcry_mpi_t m ) { bin2hex( p+2*nbytes+1, nbytes2, p ); p[nbytes2*2] = '\0'; -//printf("%s:%d>>>> Created the string %s from %d bytes %02x %02x ..., MPI was %d bytes\n", __FILE__, __LINE__, p, nbytes2, p[2*nbytes+1], p[2*nbytes+2], nbytes); + /*printf("%s:%d>>>> Created the string %s from %d bytes %02x %02x + ..., MPI was %d bytes\n", __FILE__, __LINE__, p, nbytes2, + p[2*nbytes+1], p[2*nbytes+2], nbytes); */ return p; } |