SPDX: license tags (mostly by guesswork)
[exim.git] / src / src / arc.c
index a9523890dca0775be911cc5c62a80f96d583f1c7..e3a2b3dad723928f13884e830fa64ff8572cdac6 100644 (file)
@@ -3,8 +3,9 @@
 *************************************************/
 /* Experimental ARC support for Exim
    Copyright (c) Jeremy Harris 2018 - 2020
-   Copyright (c) The Exim Maintainers 2021
+   Copyright (c) The Exim Maintainers 2021 - 2022
    License: GPL
+   SPDX-License-Identifier: GPL-2.0-only
 */
 
 #include "exim.h"
@@ -569,7 +570,7 @@ while ((hn = string_nextinlist(&headernames, &sep, NULL, 0)))
 
       len = Ustrlen(s);
       DEBUG(D_acl) pdkim_quoteprint(s, len);
-      exim_sha_update(&hhash_ctx, s, Ustrlen(s));
+      exim_sha_update_string(&hhash_ctx, s);
       r->used = TRUE;
       break;
       }
@@ -1113,11 +1114,6 @@ h->type = 0;
 h->slen = len;
 h->text = US s;
 
-/* This works for either NL or CRLF lines; also nul-termination */
-while (*++s)
-  if (*s == '\n' && s[1] != '\t' && s[1] != ' ') break;
-s++;           /* move past end of line */
-
 return r;
 }
 
@@ -1532,6 +1528,7 @@ void
 arc_sign_init(void)
 {
 memset(&arc_sign_ctx, 0, sizeof(arc_sign_ctx));
+headers_rlist = NULL;
 }