question

Wise42-6819 avatar image
0 Votes"
Wise42-6819 asked ·

NCryptOpenKey returning x80090016 and 0x80280185 [Note change in function]

I'm getting the errors x80090016 and 0x80280185 from NCryptOpenKey occasionally. What are all the possible reasons for these errors.

windows-api-security-crypto
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

StriveSun-MSFT avatar image
0 Votes"
StriveSun-MSFT answered ·

Hello, @Wise42-6819

You can refer COM Error Codes(Seurity and Setup)which provides a list of error codes used by COM-based APIs.

NTE_BAD_KEYSET 0x80090016 Keyset does not exist

You can also check the NCryptOpenKey documentation to determine the error message

I did not find the error message about 0x80280185, please help to check the error code.


Thank you!

If the answer is helpful, please click "Accept Answer" and upvote it.

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Wise42-6819 avatar image
0 Votes"
Wise42-6819 answered ·

When using the platform provider (e.g., the TPM) is there a case where an error in the TPM can cause this error to occur? IOW: If there were an error in the TPM would that always return a different error?

I'll double check on the other error code.

· 7 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have not used TPM. You can check what caused the error.

0 Votes 0 ·

This was not a helpful response. My primary question is still: Would an error returned by the TPM ever result in "NTE_BAD_KEYSET 0x80090016 Keyset does not exist" or is there error always the result of the key not being in the key manager?

0 Votes 0 ·

I will contact the relevant engineer to help you solve the problem, please be patient.

0 Votes 0 ·
Show more comments