-
Notifications
You must be signed in to change notification settings - Fork 131
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(crypto): enabled the use of certificate/key pairs from disk vs. … #66
base: master
Are you sure you want to change the base?
Conversation
…just using letsencrypt - issue#20
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just need to remove the os.Exit
calls after a log.Fatal
https://golang.org/src/log/log.go?s=10156:10184#L320
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to do a more in-depth review locally but have addressed some initial concerns.
main.go
Outdated
// Plain text web server for use behind a reverse proxy. | ||
if !letsencrypt { | ||
if !letsencrypt && tlsCertificate == "" || tlsKey == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if !letsencrypt && tlsCertificate == "" || tlsKey == "" { | |
if !letsencrypt || tlsCertificate == "" || tlsKey == "" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when:
le == false
kp == true
(!le || kp) then pass (which we don't want, correct?)
when:
le == false
kp == true
(!le && cert) then fail (which is what we want, no?)
So it should stay a && and not be changed to a || - or am I missing it?
main.go
Outdated
httpsd := &http.Server{ | ||
Handler: r, | ||
Addr: httpAddr, | ||
WriteTimeout: httpTimeout, | ||
ReadTimeout: httpTimeout, | ||
MaxHeaderBytes: maxHeaderBytes, | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I need to check out the PR on my own machine but this looks like it's in the wrong place.
It's been a few days - any other issues which need be resolved before merging? |
Is there a possibility this might get merged soon? |
Kudos, SonarCloud Quality Gate passed! |
enabled the use of certificate/key pairs from disk vs. just using let's encrypt - issue#20
to:
cc: @subspacecommunity/subspace-maintainers
related to:
resolves: #20
Background
Requested in #20
Changes
Testing
Steps for how this change was tested and verified
Generate a certificate/key pair in PEM format and try it out on the command line: