[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-cryptoapi
Subject:    Re: Export / Import Public Key problems on Schlumberger CSP
From:       Klemens Klaffke <KLAFFKE () DE ! IBM ! COM>
Date:       2000-01-26 16:06:08
[Download RAW message or body]


I cannot  tell you what the problem is, but I would try to call CryptExportKey
with a buffer and
length supplied (big enough to hold any public key). If that call succeeds, then
your problem
is a bug in the CSP.  It should return you the size of the BLOB if you pass a
null ptr.

rg, Klemens


JOAG <joagaa@EMIRATES.NET.AE> on 01/26/2000 04:30:59 PM

Please respond to Microsoft Cryptographic API <CryptoAPI@DISCUSS.MICROSOFT.COM>

To:   CryptoAPI@DISCUSS.MICROSOFT.COM
cc:    (bcc: Klemens Klaffke/Germany/IBM)
Subject:  Export / Import Public Key problems on Schlumberger CSP




Hi,
I've looked in the archives - please pardon me if I have missed this. I am doing
something quite simple
Sign a document
Export public key using CryptExportkey into a file
To verify document, import signature.
Import public key using cryptImportkey
Verify Signature

This works perfectly fine MS Base CSP (Keypair in the registry)
I have a Schlumberger Smart Card from Litronic with a key pair downloaded on it
through Verisign
In this case I am using the Schlumberger CSP
The above procedure bombs out during
lResult = CryptExportKey(lhCryptKey, 0, PUBLICKEYBLOB, 0, vbNull, LenKeyBlob)
This gives me LenKeyBlob = 0

In both cases I am using AT_KEYEXCHANGE for CryptgetUserKey
Thanks and Regards,
Joag

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic