Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions

CryptImportKey gives error NTE_BAD_VER

Posted on 2007-12-06
Last Modified: 2013-12-27
When I call CryptImportKey() to import a public key which is exported  from another key store, it gives error NTE_BAD_VER. Any idea what went wrong ?
Question by:walterwkh
  • 2
  • 2
LVL 86

Expert Comment

ID: 20425249
At first glance, I'd tend to say that the CSP's versions don't match. As with http://msdn2.microsoft.com/en-us/library/aa380207.aspx ("CryptImportKey"):

The version number of the key BLOB does not match the CSP version. This usually indicates that the CSP needs to be upgraded.

Author Comment

ID: 20426186
yes, I've already gone through the page when i get the error, but how to fix it ?
LVL 86

Expert Comment

ID: 20429232
Check the version of the CSPs involved and update accordingly...

Author Comment

ID: 20439299
sorry jkr, just discovered that it's because I am managing wrongly with the pointer to the keyblob, that's caused this error.

Thanks a lot anyway

Accepted Solution

ee_auto earned 0 total points
ID: 25502877
Question PAQ'd, 500 points refunded, and stored in the solution database.

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I recently asked a question (http://www.experts-exchange.com/Programming/Smartphones/Android/Q_28684946.html) about Computer Inventory applications for Mobile Devices.  I was specifically interested in an app I could use on my android phone.  The be…
In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

808 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question