Solved

CryptImportKey gives error NTE_BAD_VER

Posted on 2007-12-06
6
1,230 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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

This is a short and sweet, but (hopefully) to the point article. There seems to be some fundamental misunderstanding about the function prototype for the "main" function in C and C++, more specifically what type this function should return. I see so…
A short article about problems I had with the new location API and permissions in Marshmallow
The goal of this video is to provide viewers with basic examples to understand opening and writing to files in the C programming language.
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

785 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