Click here to Skip to main content
15,885,546 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDisplay file details Pin
GPat2414-Dec-07 11:36
GPat2414-Dec-07 11:36 
GeneralRe: Display file details [modified] Pin
Mark Salsbery14-Dec-07 11:58
Mark Salsbery14-Dec-07 11:58 
GeneralRe: Display file details Pin
Hamid_RT14-Dec-07 21:20
Hamid_RT14-Dec-07 21:20 
QuestionRe: Display file details Pin
GPat2415-Dec-07 23:49
GPat2415-Dec-07 23:49 
QuestionRestricting security in web browser control Pin
drummer14-Dec-07 11:35
drummer14-Dec-07 11:35 
QuestionUnable to load dll on computers which do not have Visual Studio installed Pin
Member 408492814-Dec-07 9:46
Member 408492814-Dec-07 9:46 
GeneralRe: Unable to load dll on computers which do not have Visual Studio installed Pin
Mark Salsbery14-Dec-07 10:05
Mark Salsbery14-Dec-07 10:05 
GeneralCryptoAPI: Send a challenge to a smart card Pin
Nyarlatotep14-Dec-07 5:28
Nyarlatotep14-Dec-07 5:28 
Various smart card certificates are imported into the system store. When a smart card is inserted into the reader, the user have to select his certificate from the list of certificates in the sistem and then insert the PIN.
To verify that the certificate selected from the system store correspond to the smart card currently in the reader I try to send a challenge to the smart card (GemPlus CSP)

- A crypto context from the certificate selected from the system store is acquired.
- A crypto context from the smart card in the reader is acquired.
- A challenge is created with random data (CryptGenRandom()).
- The public/private key pair is obtained from the certificate in the system. (CryptGetUserKey(AT_KEYEXCHANGE)).
- The challenge is encrypted with the previous public key from the certificate in the system store (CryptEncrypt()).
- The public/private key pair is obtained from the smart card (CryptGetUserKey(AT_KEYEXCHANGE)).
- The encrypted challenge is decrypted with the smart card (CryptDecrypt(AT_KEYEXCHANGE)) which should use his private key.

But when CryptDecrypt() with the crypto context of the smart card is called, error NTE_PROVIDER_DLL_FAIL (0x8009001D) is obtained.

Where is the error ? NTE_PROVIDER_DLL_FAIL is an error raised when a context is acquired, according to the documentation, but it seems to have no relation with Crypt/Decrypt !

Thanks
GeneralOff-topic Pin
CPallini14-Dec-07 6:30
mveCPallini14-Dec-07 6:30 
GeneralRe: CryptoAPI: Send a challenge to a smart card Pin
Mark Salsbery14-Dec-07 8:59
Mark Salsbery14-Dec-07 8:59 
GeneralRe: CryptoAPI: Send a challenge to a smart card Pin
Nyarlatotep14-Dec-07 9:27
Nyarlatotep14-Dec-07 9:27 
GeneralCompression algorithms using MMX extensions Pin
Member 208814-Dec-07 3:07
Member 208814-Dec-07 3:07 
GeneralRe: Compression algorithms using MMX extensions Pin
Randor 14-Dec-07 3:36
professional Randor 14-Dec-07 3:36 
GeneralRe: Compression algorithms using MMX extensions Pin
Mike Dimmick15-Dec-07 8:13
Mike Dimmick15-Dec-07 8:13 
Generalfilling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 2:13
CrocodileBuck14-Dec-07 2:13 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
Nelek14-Dec-07 2:54
protectorNelek14-Dec-07 2:54 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 2:59
CrocodileBuck14-Dec-07 2:59 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
David Crow14-Dec-07 3:20
David Crow14-Dec-07 3:20 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 3:44
CrocodileBuck14-Dec-07 3:44 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 3:47
CrocodileBuck14-Dec-07 3:47 
QuestionRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
David Crow14-Dec-07 4:29
David Crow14-Dec-07 4:29 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 4:45
CrocodileBuck14-Dec-07 4:45 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
David Crow14-Dec-07 5:29
David Crow14-Dec-07 5:29 
GeneralRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
CrocodileBuck14-Dec-07 6:03
CrocodileBuck14-Dec-07 6:03 
QuestionRe: filling an EditBox (which is embedded) in a toolbar by clicking a ToolBarButton ! Pin
David Crow14-Dec-07 6:16
David Crow14-Dec-07 6:16 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.