Documentation ¶
Index ¶
- Variables
- func DecodeDNSTXT(txt string) (*rsa.PublicKey, error)
- func FileBuffer(r io.Reader) (*os.File, error)
- func NormalizeReader(r io.Reader) *normalizeReader
- func ReadSMTPBodyRelaxed(r io.Reader) (raw []byte, err error)
- func ReadSMTPHeaderRelaxed(r io.ReadSeeker) (raw, converted []byte, err error)
- func ReadSMTPHeaderSimple(r io.ReadSeeker) (raw, converted []byte, err error)
- func SignMessage(s Signature, r io.ReadSeeker, dst io.Writer, key *rsa.PrivateKey, nl string) error
- func SignedHeader(s Signature, r io.ReadSeeker, dst io.Writer, key *rsa.PrivateKey, nl string) error
- func Verify(r io.ReadSeeker) error
- func VerifyWithPublicKey(r io.ReadSeeker, key *rsa.PublicKey) error
- type Header
- type Signature
- type Tag
Constants ¶
This section is empty.
Variables ¶
View Source
var HeaderEnd = fmt.Errorf("End of mail headers")
Functions ¶
func NormalizeReader ¶
func ReadSMTPHeaderRelaxed ¶
func ReadSMTPHeaderRelaxed(r io.ReadSeeker) (raw, converted []byte, err error)
func ReadSMTPHeaderSimple ¶
func ReadSMTPHeaderSimple(r io.ReadSeeker) (raw, converted []byte, err error)
func SignMessage ¶
func SignMessage(s Signature, r io.ReadSeeker, dst io.Writer, key *rsa.PrivateKey, nl string) error
SignMessage signs the message in r with the signature parameters from s and the private key key, writing the result with the added DKIM-Signature to dst.
func SignedHeader ¶
func SignedHeader(s Signature, r io.ReadSeeker, dst io.Writer, key *rsa.PrivateKey, nl string) error
func Verify ¶
func Verify(r io.ReadSeeker) error
Verify verifies the message from reader r has a valid DKIM signature.
Newlines in r must already be in CRLF format.
func VerifyWithPublicKey ¶
func VerifyWithPublicKey(r io.ReadSeeker, key *rsa.PublicKey) error
VerifyWithPublicKey verifies a reader r, but uses the passed public key instead of trying to extract the key from the DNS.
Types ¶
Click to show internal directories.
Click to hide internal directories.