/*
**  Copyright (c) 2007, 2008 Sendmail, Inc. and its suppliers.
**    All rights reserved.
**
**  Copyright (c) 2009-2012, The Trusted Domain Project.  All rights reserved.
**
**  Copyright (c) 2026, PhoenixDKIM contributors. All rights reserved.
*/


#define	CRLF		"\r\n"
#define	SP		" "

#define	LARGEBODYSIZE	65536
#define	LARGELINESIZE	4100

#define	KEYFILE		"testkeys"

#define	JOBID		"testing"
#define	SELECTOR	"test"
#define	SELECTOR2	"brisbane"
#define	SELECTOR256	"sha256only"
#define SELECTORED25519 "edtest"
#define	SELECTORBADH	"badh"
#define	SELECTORBADK	"badk"
#define	SELECTORBADV	"badv"
#define	SELECTORNOK	"nok"
#define	SELECTORNOP	"nop"
#define	SELECTOREMPTYP	"emptyp"
#define	SELECTORCORRUPTP "corruptp"
#define	SELECTORRFC8463 "rfc8463"
#define	DOMAIN		"example.com"
#define	DOMAIN2		"sendmail.com"
#define	REPLYADDRESS	"postmaster"
#define	SMTPTOKENENC	"=5BDKIM=20error=5D"
#define	SMTPTOKEN	"[DKIM error]"
#define	USER		"msk"

#define	HEADER01	"Received: received data 0"
#define	HEADER02	"Received: received data 1"
#define	HEADER03	"Received: received data 2"
#define	HEADER04	"Received: received data 3 part 1\r\n\t data 3 part 2"
#define	HEADER04UNWRAP	"Received: received data 3 part 1 data 3 part 2"
#define	HEADER05	"From: Murray S. Kucherawy <msk@sendmail.com>"
#define	HEADER06	"To: Sendmail Test Address <sa-test@sendmail.net>"
#define	HEADER07	"Date: Thu, 05 May 2005 11:59:09 -0700"
#define	HEADER07XLEADSP	"Date:   Thu, 05 May 2005 11:59:09 -0700"
#define	HEADER07NOLEADSP "Date:Thu, 05 May 2005 11:59:09 -0700"
#define	HEADER08	"Subject: DKIM test message"
#define	HEADER09	"Message-ID: <439094BF.5010709@sendmail.com>"
#define	HEADER10	"Cc: user@example.com"

#define	BODY00		"This is a message body.  Fun!\r\n"
#define	BODY01		"Here is a second line.\r\n"
#define	BODY01A		"Here is a line"
#define	BODY01B		" that is broken up across calls.\r"
#define	BODY01C		"\n"
#define	BODY01D		"Now we can try something interesting, like a\r\nmulti-line buffer.  This should not be mangled.\r\n"
#define	BODY01E		"And a line with a trailing space: \r\n"
#define	BODY02		"Next we'll try a blank.\r\n"
#define	BODY03		"\r\n"
#define	BODY04		"Next we'll try multiple blanks.\r\n"
#define	BODY05		"Finally we'll try multiple trailing blanks.\r\n"
#define	BODY06		"Surprise, more data!\r\n"

#define	NBODY00		"This is a message body.  Fun!\n"
#define	NBODY01		"Here is a second line.\r"
#define	NBODY01A	"Here is a line"
#define	NBODY01B	" that is broken up across calls.\r"
#define	NBODY01C	"\n"
#define	NBODY01D	"Now we can try something interesting, like a\nmulti-line buffer.  This should not be mangled.\r\n"
#define	NBODY01E	"And a line with a trailing space: \n"
#define	NBODY02		"Next we'll try a blank.\r"
#define	NBODY03		"\r\n"
#define	NBODY04		"Next we'll try multiple blanks.\r\n"
#define	NBODY05		"Finally we'll try multiple trailing blanks.\r"

#define THEADER00	"Received: from client1.football.example.com  [192.0.2.1]\r\n" \
	"      by submitserver.example.com with SUBMISSION;\r\n" \
	"      Fri, 11 Jul 2003 21:01:54 -0700 (PDT)"
#define	THEADER01	"From: Joe SixPack <joe@football.example.com>"
#define THEADER02	"To: Suzie Q <suzie@shopping.example.net>"
#define THEADER03	"Subject: Is dinner ready?"
#define THEADER04	"Date: Fri, 11 Jul 2003 21:00:37 -0700 (PDT)"
#define	THEADER05	"Message-ID: <20030712040037.46341.5F8J@football.example.com>"
#define	TBODY		"Hi.\r\n" \
			"\r\n" \
			"We lost the game. Are you hungry yet?\r\n" \
			"\r\n" \
			"Joe.\r\n"

#define KEY		"-----BEGIN RSA PRIVATE KEY-----\n" \
	"MIICXQIBAAKBgQC4GUGr+d/6SFNzVLYpphnRd0QPGKz2uWnV65RAxa1Pw352Bqiz\n" \
	"qiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFgF0gu3UJbNnu3+cd8k/kiQj+q\n" \
	"4cKKR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aWuX4qJVgYZLQIhAM3jzTlssVyh\n" \
	"y34LCV4Wap5e2eH/wlpLnHWsVD3sR8JpAiBbxJNtZv8JzUv/e14caxtngoy7F1Mb\n" \
	"XZIZ/dhDhl1nDQIhAK3rADDB4BCfm4WdTQxtYyLkfKiro0EjHcdJCuBD91oBAiB3\n" \
	"dJk2Cl+yMP+oIqR6bDZQY5lzuaE5v3GMRSSWC94B6A==\n" \
	"-----END RSA PRIVATE KEY-----\n"
#define ED25519_PRIVKEY	"-----BEGIN PRIVATE KEY-----\n" \
	"MC4CAQAwBQYDK2VwBCIEIP4tsVbnTpLuFaC4JLLV9L0LDlhBDaub2vwIOYsThmxi\n" \
	"-----END PRIVATE KEY-----\n"
#define	PUBLICKEY	"v=DKIM1; k=rsa; t=y:s; h=sha1:sha256; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEYNOS	"v=DKIM1; k=rsa; t=y; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEY2	"v=DKIM1; p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQ" \
	"KBgQDwIRP/UC3SBsEmGqZ9ZJW3/DkMoGeLnQg1fWn7/zYt" \
	"IxN2SnFCjxOCKG9v3b4jYfcTNh5ijSsq631uBItLa7od+v" \
	"/RtdC2UzJ1lWT947qR+Rcac2gbto/NMqJ0fzfVjH4OuKhi" \
	"tdY9tf6mcwGjaNBcWToIMmPSPDdQPNUYckcQ2QIDAQAB"
#define	PUBLICKEYBADV	"v=DKIM0; k=rsa; t=y:s; h=sha1:sha256; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEY256	"v=DKIM1; k=rsa; t=y:s; h=sha256; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define PUBLICKEYED25519 "v=DKIM1; k=ed25519; p=qrX9fPtgfFLYw1xdv8wtrKcugHwNS76PH9Y7VIYlB4w="
#define	PUBLICKEYBADH	"v=DKIM1; k=rsa; t=y:s; h=sha0; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEYNOK	"v=DKIM1; t=y:s; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEYBADK	"v=DKIM1; k=xxx; t=y:s; h=sha1:sha256; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQAB"
#define	PUBLICKEYEMPTYP	"v=DKIM1; k=rsa; t=y:s; h=sha1:sha256; p="
#define	PUBLICKEYNOP	"v=DKIM1; k=rsa; t=y:s; h=sha1:sha256"
#define	PUBLICKEYCORRUPTP	"v=DKIM1; k=rsa; t=y:s; h=sha1:sha256; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC4GUGr+d/6SFNzVLYpphnRd0QP" \
	"GKz2uWnV65RAxa1Pw352BqizqiKOBjgYGzj8pJQSs8tOvv/2k6jpI809RnESqOFg" \
	"F0gu3UJbNnu3+cd8k/kiQj+q4cKKRpAT92ccxc7svhCNgN1sBGmROYZuysG3Vu3D" \
	"yc079gSLtnSrgXb+gQIDAQ"

#define RFC8463_ED25519KEY	"-----BEGIN PRIVATE KEY-----\n" \
	"MC4CAQAwBQYDK2VwBCIEIJ1hsZ3v/VpguoRK9JLsLMREScVpezJpGXA7rAMcrn9g\n" \
	"-----END PRIVATE KEY-----\n"
#define RFC8463_ED25519PUBLICKEY	"v=DKIM1; k=ed25519; p=" \
	"11qYAYKxCrfVS/7TyWQHOg7hcvPapiMlrwIaaPcHURo="

#define RFC8463_RSAKEY	"-----BEGIN RSA PRIVATE KEY-----\n" \
	"MIICXQIBAAKBgQDkHlOQoBTzWRiGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQi\n" \
	"Y/J16JYi0Qvx/byYzCNb3W91y3FutACDfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqM\n" \
	"KrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3Ip3G+2kryOTIKT+l/K4w3QIDAQAB\n" \
	"AoGAH0cxOhFZDgzXWhDhnAJDw5s4roOXN4OhjiXa8W7Y3rhX3FJqmJSPuC8N9vQm\n" \
	"6SVbaLAE4SG5mLMueHlh4KXffEpuLEiNp9Ss3O4YfLiQpbRqE7Tm5SxKjvvQoZZe\n" \
	"zHorimOaChRL2it47iuWxzxSiRMv4c+j70GiWdxXnxe4UoECQQDzJB/0U58W7RZy\n" \
	"6enGVj2kWF732CoWFZWzi1FicudrBFoy63QwcowpoCazKtvZGMNlPWnC7x/6o8Gc\n" \
	"uSe0ga2xAkEA8C7PipPm1/1fTRQvj1o/dDmZp243044ZNyxjg+/OPN0oWCbXIGxy\n" \
	"WvmZbXriOWoSALJTjExEgraHEgnXssuk7QJBALl5ICsYMu6hMxO73gnfNayNgPxd\n" \
	"WFV6Z7ULnKyV7HSVYF0hgYOHjeYe9gaMtiJYoo0zGN+L3AAtNP9huqkWlzECQE1a\n" \
	"licIeVlo1e+qJ6Mgqr0Q7Aa7falZ448ccbSFYEPD6oFxiOl9Y9se9iYHZKKfIcst\n" \
	"o7DUw1/hz2Ck4N5JrgUCQQCyKveNvjzkkd8HjYs0SwM0fPjK16//5qDZ2UiDGnOe\n" \
	"uEzxBDAr518Z8VFbR41in3W4Y3yCDgQlLlcETrS+zYcL\n" \
	"-----END RSA PRIVATE KEY-----\n"
#define RFC8463_RSAPUBLICKEY	"v=DKIM1; k=ed25519; p=" \
	"MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDkHlOQoBTzWR" \
	"iGs5V6NpP3idY6Wk08a5qhdR6wy5bdOKb2jLQiY/J16JYi0Qvx/byYzCNb3W91y3FutAC" \
	"DfzwQ/BC/e/8uBsCR+yz1Lxj+PL6lHvqMKrM3rG4hstT5QjvHO9PzoxZyVYLzBfO2EeC3" \
	"Ip3G+2kryOTIKT+l/K4w3QIDAQAB"

#define	REPORTRECORD	"ra=postmaster; rs=" SMTPTOKENENC

#define	GIBBERISH	"abcdefghijklmnopqrstuvwxyz ABCDEFGHIJKLMNOPQRSTUVWXYZ 0123456789 !@#$%^&*()_+|-={}[];':,./<>?`~\r\n"
