[Git][NTPsec/ntpsec][master] Sigh. Fix for previous attempt at cleaning up digest-find

Hal Murray gitlab at mg.gitlab.com
Sun Feb 18 12:19:00 UTC 2018


Hal Murray pushed to branch master at NTPsec / ntpsec


Commits:
9256682f by Hal Murray at 2018-02-18T04:17:47-08:00
Sigh.  Fix for previous attempt at cleaning up digest-find

- - - - -


1 changed file:

- attic/digest-find.c


Changes:

=====================================
attic/digest-find.c
=====================================
--- a/attic/digest-find.c
+++ b/attic/digest-find.c
@@ -31,7 +31,7 @@ const char* digests[] = {
   "MDC2", "GOST", "DSS1",
   NULL };
 
-int pkt[10];
+unsigned char pkt[100];
 int
 main (
 	int argc,
@@ -51,7 +51,7 @@ main (
 
   printf("      name type length\n");
   for (int i = 0; NULL != digests[i]; i++) {
-    uint8_t digest[EVP_MAX_MD_SIZE];
+    unsigned char digest[EVP_MAX_MD_SIZE];
     unsigned int length = 0;
     EVP_MD_CTX *ctx;
     int keytype;
@@ -70,7 +70,7 @@ main (
     /* libntp/macencrypt.c has an ifdef for this */
     EVP_MD_CTX_set_flags(ctx, EVP_MD_CTX_FLAG_NON_FIPS_ALLOW);
     EVP_DigestInit_ex(ctx, md, NULL);
-    EVP_DigestUpdate(ctx, (uint8_t *)pkt, sizeof(pkt));
+    EVP_DigestUpdate(ctx, pkt, sizeof(pkt));
     EVP_DigestFinal_ex(ctx, digest, &length);
     EVP_MD_CTX_destroy(ctx);
     printf("%10s %4d %6u\n", digests[i], keytype, length);



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9256682f4a13b1d6fb8267c4b0197bd4dc316e28

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/9256682f4a13b1d6fb8267c4b0197bd4dc316e28
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20180218/4f1a5b2d/attachment.html>


More information about the vc mailing list