[prev in list] [next in list] [prev in thread] [next in thread]
List: ms-cryptoapi
Subject: Re: CryptoAPI Digest - 25 Feb 1997 to 26 Feb 1997
From: Peter Williams <peter () VERISIGN ! COM>
Date: 1997-02-27 22:49:43
[Download RAW message or body]
hi,
If anyone has some pointers on NT versus Win95 issues
for vb-level access to cryptoApi and the crypto Objects
for 99%-pure java, perhaps respond:
Based on Keith Vogel's demo code for vbscript types, I compiled
the following in vb on win95, and it works fine in vb5, and
vbscript execution environments.
Set ProvObj = CryptApi.AcquireContext("Signer", "", 1, 0)
If Err.Number <> 0 Then
MyWriteLn "AcquireContext err = " & Hex(Err.Number)
MyWriteLn "The above error is expected if private keys " & _
"don't exist for the default username"
The same code on WinNT, with the same registry
setup for a pre-created "Signer" key container, causes err 1d4.
I note in the wincrypt.h there are unicode and non-unicode varieties of
call, and thus I can imagine this being a cause of incompatibility.
WINADVAPI
BOOL
WINAPI
CryptAcquireContextA(
HCRYPTPROV *phProv,
LPCSTR pszContainer,
LPCSTR pszProvider,
DWORD dwProvType,
DWORD dwFlags);
WINADVAPI
BOOL
WINAPI
CryptAcquireContextW(
HCRYPTPROV *phProv,
LPCWSTR pszContainer,
LPCWSTR pszProvider,
DWORD dwProvType,
DWORD dwFlags);
#ifdef UNICODE
As Im using the cryptFunctions object in the java/vb CryptLib package
versus cryptoAPI directly, of course Ive no idea what is really going on.
Anything obvious I need to do obtain portability?
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic