hack: add script to regenerate certificates and update test-certs#42389
hack: add script to regenerate certificates and update test-certs#42389cpuguy83 merged 2 commits intomoby:masterfrom
Conversation
Certificates were originally added in c000cb6, but did not include a script to generate them. Current versions of Go expect certificates to use SAN instead of Common Name fields, so updating the script to include those; x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0 Some fields were updated to be a bit more descriptive (instead of "replaceme"), and the `-text` option was used to include a human-readable variant of the content. Signed-off-by: Sebastiaan van Stijn <[email protected]>
Updates the certificates to account for current versions of Go expecting
SANs to be used instead of the Common Name field:
FAIL: s390x.integration.plugin.authz TestAuthZPluginTLS (0.53s)
[2020-07-26T09:36:58.638Z] authz_plugin_test.go:132: assertion failed:
error is not nil: error during connect: Get "https://localhost:4271/v1.41/version":
x509: certificate relies on legacy Common Name field, use SANs or temporarily enable Common Name matching with GODEBUG=x509ignoreCN=0
Signed-off-by: Sebastiaan van Stijn <[email protected]>
|
failure on arm is a known flaky test; #42357 |
tianon
left a comment
There was a problem hiding this comment.
Exactly the level of complexity and line count I expected when I saw the PR title 😭
LG(enough)TM
Oh man, I went through multiple iterations; at first tried https://github.com/dmcgowan/quicktls (which is super handy), and even contributed a PR to it to add SAN support (dmcgowan/quicktls#3) but that didn't set the "subject" ( So... time to dive into the
|
|
Yepppp, it's a mess (slightly better in OpenSSL 3.0+ IIRC, but still pretty ugly). I can definitely relate. 😅 |
relates to #40353
Certificates were originally added in c000cb6 (#3068), but did not include a script to generate them. Current versions of Go expect certificates to use SAN instead of Common Name fields, so updating the script to include those;
Some fields were updated to be a bit more descriptive (instead of "replaceme"), and the
-textoption was used to include a human-readable variant of the content.- Description for the changelog
- A picture of a cute animal (not mandatory but encouraged)