Skip to content

Commit 123abe0

Browse files
authored
Merge pull request #1187 from jonathanio/improve-ocspserve-ipv6-handling
Improve IPv6 address handling in ocspserve
2 parents a4a432b + 00a28f6 commit 123abe0

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cli/ocspserve/ocspserve.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package ocspserve
33

44
import (
55
"errors"
6-
"fmt"
6+
"net"
77
"net/http"
8+
"strconv"
89

910
"github.com/cloudflare/cfssl/cli"
1011
"github.com/cloudflare/cfssl/log"
@@ -53,7 +54,7 @@ func ocspServerMain(args []string, c cli.Config) error {
5354
log.Info("Registering OCSP responder handler")
5455
http.Handle(c.Path, ocsp.NewResponder(src, nil))
5556

56-
addr := fmt.Sprintf("%s:%d", c.Address, c.Port)
57+
addr := net.JoinHostPort(c.Address, strconv.Itoa(c.Port))
5758
log.Info("Now listening on ", addr)
5859
return http.ListenAndServe(addr, nil)
5960
}

0 commit comments

Comments
 (0)