mirror of
https://github.com/isc-projects/bind9.git
synced 2026-06-10 19:29:59 -04:00
1836. [cleanup] Silence compiler warnings in hash_test.c.
This commit is contained in:
parent
b4fcb547a2
commit
c553b3308e
2 changed files with 10 additions and 8 deletions
2
CHANGES
2
CHANGES
|
|
@ -1,3 +1,5 @@
|
|||
1836. [cleanup] Silence compiler warnings in hash_test.c.
|
||||
|
||||
1835. [bug] Update dnssec-signzone's usage message. [RT #13657]
|
||||
|
||||
1834. [bug] Bad memset in rdata_test.c. [RT #13658]
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
|
||||
/* $Id: hash_test.c,v 1.10 2004/03/05 04:58:37 marka Exp $ */
|
||||
/* $Id: hash_test.c,v 1.11 2005/03/16 13:40:14 marka Exp $ */
|
||||
|
||||
#include <config.h>
|
||||
|
||||
|
|
@ -50,7 +50,7 @@ main(int argc, char **argv) {
|
|||
isc_hmacmd5_t hmacmd5;
|
||||
unsigned char digest[20];
|
||||
unsigned char buffer[1024];
|
||||
const unsigned char *s;
|
||||
const char *s;
|
||||
unsigned char key[20];
|
||||
|
||||
UNUSED(argc);
|
||||
|
|
@ -58,21 +58,21 @@ main(int argc, char **argv) {
|
|||
|
||||
s = "abc";
|
||||
isc_sha1_init(&sha1);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_sha1_update(&sha1, buffer, strlen(s));
|
||||
isc_sha1_final(&sha1, digest);
|
||||
print_digest(buffer, "sha1", digest, 5);
|
||||
|
||||
s = "abcdbcdecdefdefgefghfghighijhijkijkljklmklmnlmnomnopnopq";
|
||||
isc_sha1_init(&sha1);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_sha1_update(&sha1, buffer, strlen(s));
|
||||
isc_sha1_final(&sha1, digest);
|
||||
print_digest(buffer, "sha1", digest, 5);
|
||||
|
||||
s = "abc";
|
||||
isc_md5_init(&md5);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_md5_update(&md5, buffer, strlen(s));
|
||||
isc_md5_final(&md5, digest);
|
||||
print_digest(buffer, "md5", digest, 4);
|
||||
|
|
@ -83,7 +83,7 @@ main(int argc, char **argv) {
|
|||
s = "Hi There";
|
||||
memset(key, 0x0b, 16);
|
||||
isc_hmacmd5_init(&hmacmd5, key, 16);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
|
||||
isc_hmacmd5_sign(&hmacmd5, digest);
|
||||
print_digest(buffer, "hmacmd5", digest, 4);
|
||||
|
|
@ -91,7 +91,7 @@ main(int argc, char **argv) {
|
|||
s = "what do ya want for nothing?";
|
||||
strcpy(key, "Jefe");
|
||||
isc_hmacmd5_init(&hmacmd5, key, 4);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
|
||||
isc_hmacmd5_sign(&hmacmd5, digest);
|
||||
print_digest(buffer, "hmacmd5", digest, 4);
|
||||
|
|
@ -103,7 +103,7 @@ main(int argc, char **argv) {
|
|||
"\335\335\335\335\335\335\335\335\335\335";
|
||||
memset(key, 0xaa, 16);
|
||||
isc_hmacmd5_init(&hmacmd5, key, 16);
|
||||
strcpy(buffer, s);
|
||||
memcpy(buffer, s, strlen(s));
|
||||
isc_hmacmd5_update(&hmacmd5, buffer, strlen(s));
|
||||
isc_hmacmd5_sign(&hmacmd5, digest);
|
||||
print_digest(buffer, "hmacmd5", digest, 4);
|
||||
|
|
|
|||
Loading…
Reference in a new issue