This commit is contained in:
Jakob Borg
2014-02-24 13:29:30 +01:00
parent e7bf3ac108
commit 434a0ccf2a
9 changed files with 35 additions and 37 deletions

2
tls.go
View File

@@ -25,7 +25,7 @@ func loadCert(dir string) (tls.Certificate, error) {
return tls.LoadX509KeyPair(path.Join(dir, "cert.pem"), path.Join(dir, "key.pem"))
}
func certId(bs []byte) string {
func certID(bs []byte) string {
hf := sha256.New()
hf.Write(bs)
id := hf.Sum(nil)