Solved

CryptImportKey gives error NTE_BAD_VER

Posted on 2007-12-06
6
1,218 Views
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 ?
0
Comment
Question by:walterwkh
  • 2
  • 2
6 Comments
 
LVL 86

Expert Comment

by:jkr
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"):

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

Author Comment

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

Expert Comment

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

Author Comment

by:walterwkh
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
0
 

Accepted Solution

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

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Preface: This article is part of a series focused on cross platform mobile app development (specifically Android and iOS) using the Alloy framework and Titanium Studio made by Appcelerator (https://www.appcelerator.com/). This article presumes a wor…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Video by: Grant
The goal of this video is to provide viewers with basic examples to understand and use nested-loops in the C programming language.
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…

863 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

Need Help in Real-Time?

Connect with top rated Experts

25 Experts available now in Live!

Get 1:1 Help Now