Multiple CertIDs work for the same certificate
Continuing the discussion from another thread, Implementing ARI / POST issue:
So, I don't know what's an issue with the spec vs. an issue with Boulder's implementation of it, but I've confirmed that Boulder (staging at least) replies the same regardless of whether the AlgorithmIdentifier has the parameters left out entirely, if it is a null value, or even if some other random data is in there. I feel like in order for CAs to be able to cache responses appropriately, and for clients to be sure of interoperability with CAs, there should exactly one clear representation for the certificate that is used. If some clients put in the null and others leave it out, then there will be twice as many possible URLs that need to be dealt with. (There's some discussion of the history of whether to need to add a NULL parameters for the algorithm for PKCS1 in this Stack Exchange post I found, but I have no idea what RFCs/etc. to chase down in order to figure out if it belongs there or not for OCSP CertID.)
Even more bizarre, Boulder doesn't seem to care what gets put in the issuerNameHash and issuerKeyHash at all! If I leave them as empty octet strings I still get the same response since all Boulder cares about is the serial number. (Like, it even makes sure that SHA-256 is specified, but then doesn't care what the actual hashed data is.) So only testing against Boulder doesn't tell me whether my implementation is actually hashing the right data or not, or if it would work with any other CA. Plus again, each client could be making its own different URL to test which would make it harder for caching and such to work. (Plus I'm curious if it's possible to inject tons of data or otherwise confuse something by putting stuff in those fields that doesn't belong.)
So, if this OCSP CertId is going to be what's used, I think that it needs to be very clearly and explicitly specified the steps to map a certificate to the value, server implementations should make sure that they check for and only allow the one canonical representation, and there should be a bunch of test cases for clients to use to check their work beyond just the one in Appendix A.