boulder/ca
Aaron Gable 602f3e4708
Fix reference bug in CA.noteSignError (#7534)
In the process of writing
https://github.com/letsencrypt/boulder/pull/7533 I discovered that the
method for detecting pkcs11.Error errors is broken: it attempts to
unwrap the returned error into a pointer-to-a-pointer type, which
doesn't work because only `pkcs11.Error` implements the Error interface,
while `*pkcs11.Error` does not.

Add a test which shows that the current noteSignError implementation is
broken. Then fix noteSignError and the two locations which duplicate
that code by removing the extra layer of indirection. And since the same
code exists in three locations, refactor how the caImpl, ocspImpl, and
crlImpl share metrics so that it only has to exist in one place.

A minimal reproduction case of this type of breakage can be seen here:
https://go.dev/play/p/qCLDQ1SFiWu
2024-06-07 15:34:02 -04:00
..
proto Use generic types for gRPC stream implementations (#7501) 2024-05-24 13:54:25 -07:00
testdata Dynamically generate grpc-creds at integration test startup (#7477) 2024-05-15 11:31:23 -04:00
ca.go Fix reference bug in CA.noteSignError (#7534) 2024-06-07 15:34:02 -04:00
ca_test.go Fix reference bug in CA.noteSignError (#7534) 2024-06-07 15:34:02 -04:00
crl.go Fix reference bug in CA.noteSignError (#7534) 2024-06-07 15:34:02 -04:00
crl_test.go Better compile-time type checking for gRPC server implementations (#7504) 2024-05-28 09:26:29 -07:00
ecdsa_allow_list.go Remove config live reloader package (#7112) 2023-10-26 16:06:31 -04:00
ecdsa_allow_list_test.go CA: Run all CA package tests in parallel (#7438) 2024-04-17 16:01:37 -07:00
ocsp.go Fix reference bug in CA.noteSignError (#7534) 2024-06-07 15:34:02 -04:00
ocsp_test.go Fix reference bug in CA.noteSignError (#7534) 2024-06-07 15:34:02 -04:00