SPDX: license tags (mostly by guesswork)
[exim.git] / src / src / pdkim / pdkim.c
index c368be438498d8a9dc8fad6874168d255495d21a..eb26b3864651e117b675e89a6642a9d4af9dc97e 100644 (file)
@@ -1,9 +1,10 @@
 /*
  *  PDKIM - a RFC4871 (DKIM) implementation
  *
+ *  Copyright (c) The Exim Maintainers 2021 - 2022
  *  Copyright (C) 2009 - 2016  Tom Kistner <tom@duncanthrax.net>
  *  Copyright (C) 2016 - 2020  Jeremy Harris <jgh@exim.org>
- *  Copyright (c) The Exim Maintainers 2021
+ *  SPDX-License-Identifier: GPL-2.0-or-later
  *
  *  http://duncanthrax.net/pdkim/
  *
@@ -1613,7 +1614,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next)
          rh = pdkim_relax_header(rh, TRUE);    /* cook header for relaxed canon */
 
        /* Feed header to the hash algorithm */
-       exim_sha_update(&hhash_ctx, CUS rh, Ustrlen(rh));
+       exim_sha_update_string(&hhash_ctx, CUS rh);
 
        /* Remember headers block for signing (when the library cannot do incremental)  */
        /*XXX we could avoid doing this for all but the GnuTLS/RSA case */
@@ -1674,7 +1675,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next)
              : string_copy(CUS hdrs->value);
 
            /* Feed header to the hash algorithm */
-           exim_sha_update(&hhash_ctx, CUS rh, Ustrlen(rh));
+           exim_sha_update_string(&hhash_ctx, CUS rh);
 
            DEBUG(D_acl) pdkim_quoteprint(rh, Ustrlen(rh));
            hdrs->tag = 1;
@@ -1715,7 +1716,7 @@ for (pdkim_signature * sig = ctx->sig; sig; sig = sig->next)
     }
 
   /* Finalize header hash */
-  exim_sha_update(&hhash_ctx, CUS sig_hdr, Ustrlen(sig_hdr));
+  exim_sha_update_string(&hhash_ctx, CUS sig_hdr);
   exim_sha_finish(&hhash_ctx, &hhash);
 
   DEBUG(D_acl)