Impossible to clear the label with EVP_PKEY_CTX_set0_rsa_oaep_label() #21288
Labels
branch: master
Merge to master branch
branch: 3.0
Merge to openssl-3.0 branch
branch: 3.1
Merge to openssl-3.1
triaged: bug
The issue/pr is/fixes a bug
The version of OpenSSL is 3.0.7 and the 3.0 doc shows that
'EVP_PKEY_CTX_set0_rsa_oaep_label() sets the RSA OAEP label to binary data label and its length in bytes to len. If label is NULL or len is 0, the label is cleared. The library takes ownership of the label so the caller should not free the original memory pointed to by label. The padding mode must have been set to RSA_PKCS1_OAEP_PADDING.'
But when I use the input of NULL or 0 length, the return value is 0 and it seems that it is same as the wrong use situation.
Shoud it return 1 instead of 0 as well as the common return value?
The text was updated successfully, but these errors were encountered: