Skip to content

Commit

Permalink
Merge pull request #1187 from jonathanio/improve-ocspserve-ipv6-handling
Browse files Browse the repository at this point in the history
Improve IPv6 address handling in ocspserve
  • Loading branch information
nickysemenza authored Nov 23, 2022
2 parents a4a432b + 00a28f6 commit 123abe0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions cli/ocspserve/ocspserve.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ package ocspserve

import (
"errors"
"fmt"
"net"
"net/http"
"strconv"

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

addr := fmt.Sprintf("%s:%d", c.Address, c.Port)
addr := net.JoinHostPort(c.Address, strconv.Itoa(c.Port))
log.Info("Now listening on ", addr)
return http.ListenAndServe(addr, nil)
}
Expand Down

0 comments on commit 123abe0

Please sign in to comment.