diff --git a/gencert.go b/gencert.go index fec8208..405c171 100644 --- a/gencert.go +++ b/gencert.go @@ -5,9 +5,11 @@ package main import ( + "big" "crypto/rand" "crypto/rsa" "crypto/x509" + "crypto/x509/pkix" "encoding/pem" "log" "os" @@ -21,8 +23,8 @@ import ( func GenerateSelfSignedCert(certpath, keypath string) (err os.Error) { now := time.Seconds() tmpl := &x509.Certificate{ - SerialNumber: []byte{0}, - Subject: x509.Name{ + SerialNumber: big.NewInt(0), + Subject: pkix.Name{ CommonName: "Grumble Autogenerated Certificate", }, NotBefore: time.SecondsToUTC(now - 300), diff --git a/signal_unix.go b/signal_unix.go index 7356776..6f51ff7 100644 --- a/signal_unix.go +++ b/signal_unix.go @@ -15,7 +15,7 @@ import ( func SignalHandler() { for { sig := <-signal.Incoming - if sig != signal.SIGINT && sig != signal.SIGTERM { + if sig != os.SIGINT && sig != os.SIGTERM { continue } for sid, s := range servers {