-
-
Notifications
You must be signed in to change notification settings - Fork 614
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
Update go versions in CI and release #7971
base: main
Are you sure you want to change the base?
Conversation
Three classes of errors currently:
|
I've fixed the |
I've fixed all the remaining code errors -- all that's left is the golangci-lint failure. |
a886006
to
c2379fe
Compare
The new go1.24 FIPS-compliant crypto/rsa package refuses to work with the integration test's keys with too-close-together factors. We can still unit-test the underlying function, because that operates on big ints rather than keys, but the integration test now errors during setup.
c2379fe
to
709ae64
Compare
Updated to go1.23.6 and go1.24.0, now that it's been officially released. Updated golangci-lint to 1.64.0, which supports go1.24.0. Updated staticcheck to 2025.1, which supports go1.24.0. Fixed a lot of lint complaints, and added a new linter which will help us more narrowly target and document our lint exceptions. Now just waiting on the official go1.24.0 docker image for the release workflows. |
|
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 like the revamped Fermat-factorizable integration test 👍🏻
// Test that a self-signed cert with issuer and subject fields that don't | ||
// match is rejected. | ||
certBytes, err := x509.CreateCertificate(rand.Reader, eeTemplate, issuerCert, eeKey.Public(), eeKey) |
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.
It looks like you updated the test to also check the case where the cert is signed by a different key, but this comment needs to be updated (it appears to be a copy-paste of the one below).
|
||
// Test that a self-signed cert with issuer and subject fields that don't | ||
// match is rejected. | ||
certBytes, err = x509.CreateCertificate(rand.Reader, eeTemplate, eeTemplate, eeKey.Public(), issuerKey) |
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.
The public and private key here are eeKey.Public()
and issuerKey
. Those don't match! I think that's not what this test is intending to test.
@@ -370,7 +364,7 @@ func (tc testCtx) addCertificates(t *testing.T) { | |||
DNSNames: []string{"example-b.com"}, | |||
SerialNumber: serial2, | |||
} | |||
certDerB, _ := x509.CreateCertificate(rand.Reader, &rawCertB, &rawCertB, &testKey.PublicKey, &testKey) | |||
certDerB, _ := x509.CreateCertificate(rand.Reader, &rawCertB, &rawCertB, key.Public(), key) |
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.
above on line 340, you made a change to check the error return; here you left it as _
. Probably we should be consistent one way or the other.
@@ -344,37 +344,27 @@ func insertCertificate(ctx context.Context, dbMap *db.WrappedMap, fc clock.FakeC | |||
SerialNumber: serialBigInt, | |||
} | |||
|
|||
testKey := makeKey() |
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.
Seeing this removal makes me think we could use an improved makeKey()
that runs ecdsa.GenerateKey
and panics on error. Could save us a few lines of boilerplate here and there.
} | ||
} | ||
|
||
// Newf is a convenience function for creating a new BoulderError with a |
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.
Since Newf is internal-only, this could be unexported.
Though also I note that the new, constant New()
is only used one place; that place could use "%s", inErrMsg
instead.
Update from go1.23.1 to go1.23.6 for our primary CI and release builds. This brings in a few security fixes that aren't directly relevant to us.
Add go1.24.0 to our matrix of CI and release versions, to prepare for switching to this next major version in prod.