-
Notifications
You must be signed in to change notification settings - Fork 702
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
generate TLS test certs with SAN for go1.15 #325
Conversation
All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter. We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
Hi @dmitris, thanks for this initiative. I think now would be a good time to replace this certificate generation code altogether, and use the Go x509 stack to generate certs on the fly, so we never have to worry about expiry. Would you mind implementing something like this for the tests that need it? You can look at https://golang.org/src/crypto/tls/generate_cert.go for inspiration. |
Hi @dmitris, did you see my last comment? |
664b7d7
to
65f8ec6
Compare
e4ac1c2
to
c57e7d7
Compare
Fixes grpc-ecosystem#324. The certificates need to have SAN fields instead of relying on the CommonName due to X.509 CommonName deprecation in go1.15. The certificate is generated on the fly and cached in github.com/grpc-ecosystem/go-grpc-middleware/testing/testcert utility package. Reference: https://golang.org/doc/go1.15#commonname
ee825a8
to
103e7fc
Compare
Codecov Report
@@ Coverage Diff @@
## master #325 +/- ##
==========================================
+ Coverage 73.93% 74.14% +0.21%
==========================================
Files 42 43 +1
Lines 1592 1636 +44
==========================================
+ Hits 1177 1213 +36
- Misses 363 367 +4
- Partials 52 56 +4
Continue to review full report at Codecov.
|
Thanks for your contribution! Could you please cherry-pick this against the v2 branch? |
Fixes #324. The certificates need to have SAN fields
instead of relying on the CommonName due to
X.509 CommonName deprecation in go1.15.
Reference: https://golang.org/doc/go1.15#commonname
/cc @johanbrandhorst