Files
go-dkim/errors.go
Stéphane Depierrepont aka Toorop d652e23632 verify 1
2015-05-11 18:32:19 +02:00

49 lines
1.7 KiB
Go

package dkim
import (
"errors"
)
var (
// ErrConfigPrivateKeyRequired when there not private key in config
ErrSignPrivateKeyRequired = errors.New("PrivateKey is required")
// ErrSignDomainRequired when there is no domain defined in config
ErrSignDomainRequired = errors.New("Domain is required")
// ErrSignSelectorRequired when there is no Selcteir defined in config
ErrSignSelectorRequired = errors.New("Selector is required")
// If Headers is specified it should at least contain 'from'
ErrSignHeaderShouldContainsFrom = errors.New("Header must contains 'from' field")
// If bad Canonicalization parameter
ErrSignBadCanonicalization = errors.New("bad Canonicalization parameter")
// when unable to parse private key
ErrCandNotParsePrivateKey = errors.New("can not parse private key, check format (pem) and validity")
// Bad algorithm
ErrSignBadAlgo = errors.New("bad algorithm. Only rsa-sha1 or rsa-sha256 are permitted")
// ErrBadMailFormat
ErrBadMailFormat = errors.New("bad mail format")
// ErrBadMailFormatHeaders
ErrBadMailFormatHeaders = errors.New("bad mail format found in headers")
// ErrBadDKimTagLBodyTooShort
ErrBadDKimTagLBodyTooShort = errors.New("bad tag l or bodyLength option. Body length < l value")
// ErrDkimHeaderNotFound when there's no DKIM-Signature header in an email we have to verify
ErrDkimHeaderNotFound = errors.New("no DKIM-Signature header field found ")
// ErrDkimHeaderBTagNotFound when there's no b tag
ErrDkimHeaderBTagNotFound = errors.New("no tag 'b' found in dkim header")
ErrDkimHeaderMissingTagV = errors.New("no tag 'v' found in dkim header")
// Version not supported
ErrDkimVersionUnsuported = errors.New("unsuported DKIM version")
)