Safe Haskell | None |
---|---|
Language | Haskell2010 |
A library for DomainKeys (http://www.ietf.org/rfc/rfc4870.txt). Currently, only receiver side is implemented.
- runDK :: Resolver -> Mail -> IO DAResult
- runDK' :: Resolver -> Mail -> DK -> IO DAResult
- parseDK :: RawFieldValue -> Maybe DK
- data DK
- dkDomain :: DK -> Domain
- dkSelector :: DK -> ByteString
- dkFieldKey :: CanonFieldKey
Documentation
Authentication with DK
runDK' :: Resolver -> Mail -> DK -> IO DAResult Source #
Verifying Mail
with DomainKeys. The value of DomainKey-Signature:
should be parsed beforehand.
Parsing DomainKey-Signature:
parseDK :: RawFieldValue -> Maybe DK Source #
Parsing DomainKey-Signature:.
>>>
:{
let dk = BS8.concat [ "a=rsa-sha1; s=brisbane; d=football.example.com;\n" , " c=simple; q=dns;\n" , " b=dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZ\n" , " VoG4ZHRNiYzR;" ] in pPrintNoColor $ parseDK dk :} Just ( DK { dkAlgorithm = DK_RSA_SHA1 , dkSignature = "dzdVyOfAKCdLXdJOc9G2q8LoXSlEniSbav+yuU4zGeeruD00lszZVoG4ZHRNiYzR" , dkCanonAlgo = DK_SIMPLE , dkDomain0 = "football.example.com" , dkFields = Nothing , dkSelector0 = "brisbane" } )
dkSelector :: DK -> ByteString Source #
Getting of the value of the "s" tag in DomainKey-Signature:.
Field key for DomainKey-Signature:
dkFieldKey :: CanonFieldKey Source #
Canonicalized key for DomainKey-Signature:.