summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/miekg/dns/smimea.go
diff options
context:
space:
mode:
authorChristopher Speller <crspeller@gmail.com>2017-03-13 12:54:22 -0400
committerGitHub <noreply@github.com>2017-03-13 12:54:22 -0400
commitc281ee3b61e8ab53ff118866d72618ae8cce582b (patch)
tree776e7bdf6c8bfbb9a1dee5976496ab065959991f /vendor/github.com/miekg/dns/smimea.go
parent3ada7a41a7fb13abef19dd63dc56b720900dbaa9 (diff)
downloadchat-c281ee3b61e8ab53ff118866d72618ae8cce582b.tar.gz
chat-c281ee3b61e8ab53ff118866d72618ae8cce582b.tar.bz2
chat-c281ee3b61e8ab53ff118866d72618ae8cce582b.zip
Updating server dependancies. Also adding github.com/jaytaylor/html2text and gopkg.in/gomail.v2 (#5748)
Diffstat (limited to 'vendor/github.com/miekg/dns/smimea.go')
-rw-r--r--vendor/github.com/miekg/dns/smimea.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/vendor/github.com/miekg/dns/smimea.go b/vendor/github.com/miekg/dns/smimea.go
index 3a4bb5700..4e7ded4b3 100644
--- a/vendor/github.com/miekg/dns/smimea.go
+++ b/vendor/github.com/miekg/dns/smimea.go
@@ -33,15 +33,15 @@ func (r *SMIMEA) Verify(cert *x509.Certificate) error {
return ErrSig // ErrSig, really?
}
-// SIMEAName returns the ownername of a SMIMEA resource record as per the
+// SMIMEAName returns the ownername of a SMIMEA resource record as per the
// format specified in RFC 'draft-ietf-dane-smime-12' Section 2 and 3
-func SMIMEAName(email_address string, domain_name string) (string, error) {
+func SMIMEAName(email, domain string) (string, error) {
hasher := sha256.New()
- hasher.Write([]byte(email_address))
+ hasher.Write([]byte(email))
// RFC Section 3: "The local-part is hashed using the SHA2-256
// algorithm with the hash truncated to 28 octets and
// represented in its hexadecimal representation to become the
// left-most label in the prepared domain name"
- return hex.EncodeToString(hasher.Sum(nil)[:28]) + "." + "_smimecert." + domain_name, nil
+ return hex.EncodeToString(hasher.Sum(nil)[:28]) + "." + "_smimecert." + domain, nil
}