mpeylo / cmpossl

An OpenSSL-based implementation of the Certificate Management Protocol (CMP), defined in IETF RFCs 4210, 4211, and 6712. It is being extended according to the emerging RFCs 'CMP Updates' (CMPv3), 'CMP Algorithms', and 'Lightweight CMP Profile'.
https://github.com/mpeylo/cmpossl/wiki
Other
35 stars 13 forks source link

Load only pubkey as newkey for no popo #188

Closed mpeylo closed 5 years ago

mpeylo commented 5 years ago

That would do the trick to load only pubkey if privkey is not needed and also not available.

Could potentially benefit from taking the autofmt stuff into use.

I wasn't able to check so far whether it's attempted to verify the certificate using the (not available) private key if popo is set to none or RAVerified. In that case the check should be at least then omitted if the private key is not available. If the private key is available, it will usually not make sense to use none or RAVerified in the first place...

So, I don't expect that this is merged right away, still some more tests need to be done, this is more to contribute to the discussion.

DDvO commented 5 years ago

I've meanwhile extended the code in cmp-dev such that the -newkey option and ctx->newPkey may take a private or public key, recording whether the private portion is included or not. Consequently a signature-based (and indirect decryption-based) POPO is enabled only when a private key is present. It turns out that the consistency check on the public key in the received cert using X509_check_private_key(), despite the name of this function, just needs the public portion.

This new commit 14726e979d6f1457b10c04bb880f62370fb6a461 supersedes the PR given here, so closing it.