Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove TODO in rsa_ameth.c #14524

Closed
wants to merge 1 commit into from

Conversation

@slontis
Copy link
Contributor

@slontis slontis commented Mar 12, 2021

Fixes #14390

The only caller of this function tests EVP_KEYMGMT_is_a() beforehand
which will fail if the RSA key types do not match. So the test is not
necessary. The assert has been removed when it does the test.

Checklist
  • documentation is added or updated
  • tests are added or updated
Fixes #14390

The only caller of this function tests EVP_KEYMGMT_is_a() beforehand
which will fail if the RSA key types do not match. So the test is not
necessary. The assert has been removed when it does the test.
@@ -1714,7 +1714,7 @@ void *evp_pkey_export_to_provider(EVP_PKEY *pk, OSSL_LIB_CTX *libctx,
}

/* Make sure that the keymgmt key type matches the legacy NID */
if (!ossl_assert(EVP_KEYMGMT_is_a(tmp_keymgmt, OBJ_nid2sn(pk->type))))
if (!EVP_KEYMGMT_is_a(tmp_keymgmt, OBJ_nid2sn(pk->type)))

This comment has been minimized.

@levitte

levitte Mar 12, 2021
Member

Any reason why you removed the assertion?

This comment has been minimized.

@levitte

levitte Mar 12, 2021
Member

Aha, was it possibly for the added negative test in test/keymgmt_internal/test.c? Ok, I've no concerns then...

@t8m
t8m approved these changes Mar 12, 2021
@openssl-machine
Copy link

@openssl-machine openssl-machine commented Mar 13, 2021

24 hours has passed since 'approval: done' was set, but this PR has failing CI tests. Once the tests pass it will get moved to 'approval: ready to merge' automatically, alternatively please review and set the label manually.

@openssl-machine
Copy link

@openssl-machine openssl-machine commented Mar 13, 2021

This pull request is ready to merge

@paulidale
Copy link
Contributor

@paulidale paulidale commented Mar 14, 2021

Merged to master.

@paulidale paulidale closed this Mar 14, 2021
openssl-machine pushed a commit that referenced this pull request Mar 14, 2021
Fixes #14390

The only caller of this function tests EVP_KEYMGMT_is_a() beforehand
which will fail if the RSA key types do not match. So the test is not
necessary. The assert has been removed when it does the test.

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from #14524)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

5 participants