bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

crypto/gc-md2: add comment


From: Bruno Haible
Subject: crypto/gc-md2: add comment
Date: Sat, 24 Aug 2019 15:02:29 +0200
User-agent: KMail/5.1.3 (Linux/4.4.0-157-generic; KDE/5.18.0; x86_64; ; )

The gc-libgcrypt.c file always takes the md2 implementation from gnulib.
It should get it from libgcrypt, when this library is available, like for
md4, md5, sha1.

How to reproduce:
$ ./gnulib-tool --create-testdir --dir=../testdir1 --single-configure \
  crypto/gc-md2 crypto/gc-md4 crypto/gc-md5 crypto/gc-rijndael crypto/gc-sha1
$ cd ../testdir1
$ ./configure --with-libgcrypt
$ make
$ nm gltests/test-gc-md4 | grep md4
00000000004017e0 T gc_md4
$ nm gltests/test-gc-md5 | grep md5
00000000004018d0 T gc_md5
$ nm gltests/test-gc-sha1 | grep sha1
00000000004019b0 T gc_sha1
$ nm gltests/test-gc-md2 | grep md2
00000000004017e0 T gc_md2
0000000000401e00 T md2_buffer
0000000000401aa0 t md2_compress
0000000000401b90 T md2_finish_ctx
0000000000401b10 T md2_init_ctx
0000000000401e60 T md2_process_block
0000000000401c30 T md2_process_bytes
0000000000401b70 T md2_read_ctx
0000000000401cf0 T md2_stream

The reason is that libgcrypt declares GCRY_MD_MD2 but does not actually
implement the MD2 algorithm. This is worth a comment.


2019-08-24  Bruno Haible  <address@hidden>

        crypto/gc-md2: Add comment.
        * lib/gc-libgcrypt.c: Add comment.

diff --git a/lib/gc-libgcrypt.c b/lib/gc-libgcrypt.c
index f92fabc..6c95712 100644
--- a/lib/gc-libgcrypt.c
+++ b/lib/gc-libgcrypt.c
@@ -29,6 +29,8 @@
 /* Get libgcrypt API. */
 #include <gcrypt.h>
 #if GNULIB_GC_MD2
+/* libgcrypt declares GCRY_MD_MD2 but does not actually implement the
+   MD2 algorithm.  Therefore take the implementation from gnulib.  */
 # include "md2.h"
 #endif
 




reply via email to

[Prev in Thread] Current Thread [Next in Thread]