4 ms·
Serious question: what are the common, practical situations you've run into or can think of where you need to be validating certificate chains yourself in your
by pvg 10y ago
Serious question: what are the common, practical situations you've run into or can think of where you need to be validating certificate chains yourself in your application code?
- wbond 10y agoDocument signing is what pushed me down that path. It uses the same ecosystem and technologies as TLS, but cares more about revocation.
- pvg 10y agoAh I see. Seems a bit off the beaten path already, though. Were they some sort of existing documents, generated by something not easily available server side?
- wolf550e 10y agoDid you require online (not cached) revocation check? That would require buying more HSMs.
- wbond 10y agoNo, I'm just implementing code that signs and verifies PDF digital signatures for compliance with EU regulations. I'm not dealing with HSMs, or even the PKIX infrastructure other than verifying a certificate is valid according to Adobe/ETSI and generating/checking signatures. The certificate issuers need to provide the CRLs and OCSP responders/responses.
- wolf550e 10y agoWhy is this downvoted? Could the downvoter please comment?
- viraptor 10y agoOnline revocation check doesn't require buying HSMs. HSMs also usually operate on a much lower level / aren't really connected to the internet.
- wolf550e 10y agoIf you can't use a cached OCSP response and instead need a fresh one (or the cache is valid for a short period only), that means the CA must sign a new OCSP response much more often. The key the CA uses to sign OCSP must be held safely because it is important, even if that key can't sign new certificates. I think it belongs in an HSM. I've read Let's Encrypt spends ~98% of the time of its intermediate signing keys on OCSP, not on new certs. If the OCSP was good only for an hour instead of a week, they would need to perform many more signatures per unit of time which would require more hardware.
- viraptor 10y agoBut that's an implementation detail. Sure, some HSMs will make signing faster, some won't. You don't need to use HSMs which will have a considerable markup too. You can use more servers if you prefer. And anyway, that's the server case. OP just wanted to check the revocation as a client as far as I can tell, which definitely doesn't require any extra hardware.
- wbond 10y agoIn some cases revocation info will be live, in others it will be stored inside of the document. My use case involves embedding it, but also being able to verify it (Adobe distributes trusted CA certs through a signed PDF). Never would I need to run my own PKIX infrastructure.
- paulddraper 10y agoI want to implement SAML (as a consumer). (To be fair, it can be done without certificate chains, but it could also be done with chains.)
- pvg 10y agoYep, I saw your more general list further upthread as well. I'd argue that much of the time these things are bad and essentially a kind of unnecessary, self-inflicted cryptography. In most cases the same things can be accomplished with a secure authenticated channel, someone hanging on to the relevant state and a cryptographically secure random id. A prime example is all the 'state-carrying authenticated/encrypted session cookie' infrastructure typically built into ruby and python web frameworks.