Build with go tip.

This commit is contained in:
Mikkel Krautz 2011-06-17 16:48:41 +02:00
parent 739cd1ca9b
commit 71b9483e00
2 changed files with 5 additions and 3 deletions

View file

@ -5,9 +5,11 @@
package main package main
import ( import (
"big"
"crypto/rand" "crypto/rand"
"crypto/rsa" "crypto/rsa"
"crypto/x509" "crypto/x509"
"crypto/x509/pkix"
"encoding/pem" "encoding/pem"
"log" "log"
"os" "os"
@ -21,8 +23,8 @@ import (
func GenerateSelfSignedCert(certpath, keypath string) (err os.Error) { func GenerateSelfSignedCert(certpath, keypath string) (err os.Error) {
now := time.Seconds() now := time.Seconds()
tmpl := &x509.Certificate{ tmpl := &x509.Certificate{
SerialNumber: []byte{0}, SerialNumber: big.NewInt(0),
Subject: x509.Name{ Subject: pkix.Name{
CommonName: "Grumble Autogenerated Certificate", CommonName: "Grumble Autogenerated Certificate",
}, },
NotBefore: time.SecondsToUTC(now - 300), NotBefore: time.SecondsToUTC(now - 300),

View file

@ -15,7 +15,7 @@ import (
func SignalHandler() { func SignalHandler() {
for { for {
sig := <-signal.Incoming sig := <-signal.Incoming
if sig != signal.SIGINT && sig != signal.SIGTERM { if sig != os.SIGINT && sig != os.SIGTERM {
continue continue
} }
for sid, s := range servers { for sid, s := range servers {