Fix ECDSA issuer digest initialization and improve algorithm handling - #248
Fix ECDSA issuer digest initialization and improve algorithm handling#248adamboutcher wants to merge 2 commits into
Conversation
Initialize issuer_digest to NULL and handle digest_nid fallback for ECDSA certificates.
Refactor issuer certificate digest algorithm retrieval to handle cases where the signature info is not available.
|
Currently in draft as I'm iteratively working through the issue and I haven't yet confirmed that a new certificate will work. I will pick up the rest of this on Monday. |
|
Hi Adam, https://indico.cern.ch/event/1635405/#26-certificate-support-and-gri There are lots of Java-based storage services (dCache, StoRM) that would need to be upgraded It would be best if the UKCA continued supporting RSA for the foreseeable future, Hopefully I'm overly pessimistic here! |
I'm not really in a position to enforce this; it would have been nice for it to be the cause though. Would adding the fix here break things upstream? I believe this should fallback to its original methods so it should work nicely with incompatible upstream packages as they will just fail over if something with ECDSA touches them?
|
|
Hi Adam, |
|
The new PKI hierarchy ("3") is indeed EC based. End entity certs (serials >100000) default to RSA but the intermediate and the root in IGTF are all EC. These have been published through IGTF since (looks it up) 1.141 in May. |
|
@jjensenral Could something still be done about this matter in some way? Going to ECDSA was a rather significant change that ought to have been checked with experts from WLCG and other relying parties beforehand, I would think? |
|
Out of curiosity, does the C-based voms-proxy-init work? If so we could port part of the code over. |
|
Could we not, you know, just fix the tooling using the incorrect digest to check for the signing algorithm? Feels like if its being done wrong in the first place then fixing the underlying issue is the actual solution and not (yet again) trying to bodge in old stuff. |
DaveK forwarded the issue, we will discuss & get back to you |
Sure, but this matter creates an unexpected, big exercise that came totally out of nothing! |
Not really out of nothing, ECDSA has been supported in OpenSSL since ~2010. And (if Claude is to be believed) the code base is using the wrong checks to detect the signing algorithm. Sure a bug is a bug and to be somewhat expected however people relying on a bug is less sensible. As previously mentioned this PR should fall back to its current behaviour so any tooling expecting the wrong thing should still work as expected or simply fail with ECDSA certificates which they would anyway just in a different part of the codebase. |
To make those UK certificates usable in WLCG, we will need a really big deployment exercise to get storage services upgraded at the majority of our sites, to versions that do not even exist yet. So, a decision taken in the UK is leading to a lot of work for many parties around the world, including the UK... |
|
There is a GridPP collaboration meeting right now (= this week) where I'm sure it's being discussed |
|
Breaking upstream software isn't the scope of this repository though, the maintainers of said software can fix them as and when. Especially as this fix doesn't change any fundamental functions just corrects parts that should work. Also the move to ECDSA may be only a UK decision however pushing back on fixing it merely because "it's big" and not seeing the forwards progress is incredibly short sighted. Who's to say another NGI/CA doesn't move to ECDSA once it's actually supported? |
|
@adamboutcher The work you are doing in this repository is much appreciated and independent of what's happening elsewhere. We will look further into other concerned stacks and see what realistically can be done for those by when. At the very least, UKCA v2 should continue issuing certificates well into next year (with ever decreasing lifetimes), probably at least until summer, to allow us to have some chance to get all the concerned services upgraded... Mind, it's not so much the user certificates we need to worry about in WLCG proper (*), but rather the host certificates, in particular of the affected storage services. (*) LHC experiment users can get CERN certificates, while users from other communities may not be able to. |
|
Hi all, The java based voms-proxy-init complains though (as does indeed the grid-proxy-init) which might very well mean that the VOMS AA also will not accept it since it's relying on the same voms-api-java, canl-java and bouncycastle: |
|
@msalle Why is |
my point was that mixed is not a problem. I do agree SHA-1 will become an issue, but that we should open as an issue against VOMS. |

New UKCA certs are signed with ECDSA.
I used Claude to write this fix so it might not be safe; I don't write C so take it with a pinch of salt/review.