dmcgiv / DKIM.Net

DomainKeys Identified Mail (DKIM) and DomainKey email signing for .Net (C#)
31 stars 9 forks source link

DK_STAT_SYNTAX error on domain keys signing #1

Closed toptensoftware closed 13 years ago

toptensoftware commented 13 years ago

Hi,

I'm trying to use DKIM.NET to sign email messages being sent through gmail and getting the following error back from check-auth@verifier.port25.com on the domain key signature:

----------------------------------------------------------
DomainKeys check details:
----------------------------------------------------------
Result:         permerror (DK_STAT_SYNTAX: Message is not valid syntax. Signature could not be created/checked)
ID(s) verified: header.=
DNS record(s):

The generated header is:

DomainKey-Signature: a=rsa-sha256; c=simple; d=showcaselane.com; h=From:To:Subject; q=dns;
 s=selector;
 b=UjIbMn/14hGIJn/BzRYuIPqjueRm47jh16FNAfY3ZFQ3LugTXFe/Vc8knQFuNtqV9yMpc1OGBsyK8jAHJ/4C55oyeixzUkcmZwAtenpml30PJG421dm3jb8maivJFkW9i/qFQ9MiDzWazhIlAJN1rDhCV/0blkFyhizTExNS/Bs=;

Signing with DKIM (as opposed to DomainKeys) works fine.

toptensoftware commented 13 years ago

found the issue... wasn't passing hashing algorithm sha1 to the private key constructor, causing it to use sha256 for domainkey signing - which isn't allowed.

dmcgiv commented 13 years ago

Hi,

I came across this issue also and have a fixed version but which also breaks the current API. I'll try and get it completed and committed soon.

Damien

On 7 June 2011 23:23, toptensoftware < reply@reply.github.com>wrote:

Hi,

I'm trying to use DKIM.NET to sign email messages being sent through gmail and getting the following error back from check-auth@verifier.port25.comon the domain key signature:


DomainKeys check details:


Result: permerror (DK_STAT_SYNTAX: Message is not valid syntax. Signature could not be created/checked) ID(s) verified: header.= DNS record(s):

The generated header is:

DomainKey-Signature: a=rsa-sha256; c=simple; d=showcaselane.com; h=From:To:Subject; q=dns; s=selector;

b=UjIbMn/14hGIJn/BzRYuIPqjueRm47jh16FNAfY3ZFQ3LugTXFe/Vc8knQFuNtqV9yMpc1OGBsyK8jAHJ/4C55oyeixzUkcmZwAtenpml30PJG421dm3jb8maivJFkW9i/qFQ9MiDzWazhIlAJN1rDhCV/0blkFyhizTExNS/Bs=;

Signing with DKIM (as opposed to DomainKeys) works fine.

Reply to this email directly or view it on GitHub: https://github.com/dmcgiv/DKIM.Net/issues/1