OCSP sign does not RSA_METHOD_FLAG_NO_CHECK#12087
OCSP sign does not RSA_METHOD_FLAG_NO_CHECK#12087ashman-p wants to merge 3 commits intoopenssl:OpenSSL_1_1_1-stablefrom
Conversation
|
The is related to issue #12064 |
OCSP_basic_sign_ctx() in ocsp_srv.c , and OCSP_request_sign() in ocsp_cl.c does not check for RSA_METHOD_FLAG_NO_CHECK. If RSA_set_flags() was csalled to enable RSA_METHOD_FLAG_NO_CHECK, then OCSP sign operations can fail (because the X509_check_private_key()). CLA: trivial
2cd4928 to
125076a
Compare
|
It seems to me that the current handling of So everything always ends up in EVP_PKEY_cmp(). For RSA keys this is implemented by openssl/crypto/rsa/rsa_ameth.c Lines 119 to 125 in 7f699cb This means that we will have to propagate this flag check everywhere where a consistency check is made to be sure we've got every instance. A possible alternative approach would be to strip the |
|
My (admittedly quite vague) recollection is that the |
Move RSA_METHOD_FLAG_NO_CHECK checks to rsa_pub_cmp(), rsa_ameth.c. CLA: trivial
These flags seem related but different: Compared to |
mattcaswell
left a comment
There was a problem hiding this comment.
I think this change goes beyond the definition of "CLA: trivial". Please could you submit a CLA?
I tagged it trivial mostly because i followed your guidance on the changes. I am working the CLA issue and happy to do that. Thanks. |
Updated per comment.
|
CLA and ICLA updated and emailed. |
|
Replaced by new updated PR |
OCSP_basic_sign_ctx() in ocsp_srv.c , and
OCSP_request_sign() in ocsp_cl.c does not check for RSA_METHOD_FLAG_NO_CHECK. If RSA_set_flags() was csalled to enable RSA_METHOD_FLAG_NO_CHECK, then OCSP sign operations can fail (because the X509_check_private_key()).
Checklist