简体   繁体   中英

Minor Issues with DKIM signature while signing with Mimekit

While DKIM signing with Mimekit works perfectly, I have two small issues with the actual signature.

DKIM-Signature: v=1; a=rsa-sha256; d=xxxxx.xx.xxx.xx; s=xxxxxx; c=relaxed/relaxed; i=kxxxx@xxxxx.xx.xxx.xx; t=1505903265; h=subject:from:reply-to:to:date:message-id:list-unsubscribe:sender: content-type:mime-version; bh=+YJ8JIQ4EA+AyTfpYN8VFp1ZiNU7BC/a3XtvhaR/VZE=; b=NLPjxuR58K9Rixf6eLtWESFphai0PoATGpC0UaEz1lqTHRCFeECbDC8HbcVBEQQfO8gyKi8pOub f4e92zbgttUIgpVZfi5xu7OMSPm5t/seycBdGfNto9bhWRoW21avcan1LPtEERthtYV0Eb6kwlEFX UFH3AhZKsvzD2YFTVyU=
DKIM-Signature: v=1; a=rsa-sha256; d=xxxx.xxx; s=xxxxx; c=relaxed/relaxed; t=1505903265; h=subject:from:reply-to:to:date:message-id:x-feedback-id:list-unsubscribe: content-type:mime-version; bh=+YJ8JIQ4EA+AyTfpYN8VFp1ZiNU7BC/a3XtvhaR/VZE=; b=kVrvAHo7Kek5jx/YEzd9WWi42wpn65r+0FOTwQ9H0fHDB738WY93Cro2p6Hq4qUBu3q6Eztc54N aXOo95mr0Mu0qFvlYM0hLWWjA9Je+fBjvoJPwuFLZVEfd8taZWFYOdYlEvsgyrPz3JMDYYio26wXy zyR+4R2Yc4SBfFP4/vs=

1) For some reason the header substring staring from "h=" and ending in ";" doesn't preserve case, so "content-type:" should be "Content-Type:"

2) There seems to be an extra space that appears before "content-type:", how can this be removed?.

@jstedfast's answer below

The space before the content-type is probably because the header was folded there in the raw output. The header names are lowercased for canonicalization purposes. I suppose I could leave them whatever case the user feeds them in as, but I went with lowercasing because that's what gmail does. – jstedfast

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM