Skip to content

Commit

Permalink
Merge pull request #44 from securesign/tls-cherry-pick
Browse files Browse the repository at this point in the history
fix TLS configuration for CTLog server (google#1542)
  • Loading branch information
fghanmi authored Jul 31, 2024
2 parents b50bca0 + 007eb0c commit 2c6821a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,10 @@

* Add TLS support for ct_server: By using `--tls_certificate` and `--tls_key` flags, users can provide a service certificate and key, that enables the server to handle HTTPS requests. In https://github.com/google/certificate-transparency-go/pull/1523

### Fixes

* Fix ct_server TLS configuration: When TLS on ct_server is enable, use ListenAndServeTLS instead of ListenAndServe.

## v1.2.1

### Fixes
Expand Down
6 changes: 5 additions & 1 deletion trillian/ctfe/ct_server/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,11 @@ func main() {
klog.Info("HTTP server shutdown")
})

err = srv.ListenAndServe()
if *tlsCert != "" && *tlsKey != "" {
err = srv.ListenAndServeTLS("", "")
} else {
err = srv.ListenAndServe()
}
if err != http.ErrServerClosed {
klog.Warningf("Server exited: %v", err)
}
Expand Down

0 comments on commit 2c6821a

Please sign in to comment.