export SigOptions

This commit is contained in:
Stéphane Depierrepont aka Toorop
2015-05-15 07:49:31 +02:00
parent 293f4b202a
commit 59cecbc7e8
2 changed files with 5 additions and 5 deletions

View File

@@ -38,7 +38,7 @@ const (
) )
// sigOptions represents signing options // sigOptions represents signing options
type sigOptions struct { type SigOptions struct {
// DKIM version (default 1) // DKIM version (default 1)
Version uint Version uint
@@ -84,8 +84,8 @@ type sigOptions struct {
} }
// NewSigOption returns new sigoption with some defaults value // NewSigOption returns new sigoption with some defaults value
func NewSigOptions() sigOptions { func NewSigOptions() SigOptions {
return sigOptions{ return SigOptions{
Version: 1, Version: 1,
Canonicalization: "simple/simple", Canonicalization: "simple/simple",
Algo: "rsa-sha256", Algo: "rsa-sha256",
@@ -98,7 +98,7 @@ func NewSigOptions() sigOptions {
} }
// Sign signs an email // Sign signs an email
func Sign(email *[]byte, options sigOptions) error { func Sign(email *[]byte, options SigOptions) error {
var privateKey *rsa.PrivateKey var privateKey *rsa.PrivateKey
// PrivateKey // PrivateKey

View File

@@ -197,7 +197,7 @@ type dkimHeader struct {
} }
// NewDkimHeaderBySigOptions return a new DkimHeader initioalized with sigOptions value // NewDkimHeaderBySigOptions return a new DkimHeader initioalized with sigOptions value
func newDkimHeaderBySigOptions(options sigOptions) *dkimHeader { func newDkimHeaderBySigOptions(options SigOptions) *dkimHeader {
h := new(dkimHeader) h := new(dkimHeader)
h.Version = "1" h.Version = "1"
h.Algorithm = options.Algo h.Algorithm = options.Algo