Patrick Seiler
29-Apr-2015, 07:10 AM
Hi there,
talking about latest changes in AcquireContext (CRYPT_VERIFYCONTEXT). I just would like to know, if the following change is explicit wanted or if it's a bug:
VDF17.1:
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,0)) to bOk
If (not(bOk)) Begin
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,CRYPT_NEWKEYSET)) to bOk
End
changed to
DF18.1 alpha 3:
// Fallback to original
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,0)) to bOk
If (bOk) Begin
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,CRYPT_NEWKEYSET)) to bOk
End
Just wondering, if it just fixed a bug or introduced a new one :confused:
And, if I'm already here and talking about that function - I have a feature request. Please consider supporting the default provider:
if(CryptAcquireContext(
&hCryptProv, // handle to the CSP
UserName, // container name
NULL, // use the default provider
PROV_RSA_FULL, // provider type
0)) // flag values
According to Microsoft we have to provide NULL if psProvider(self) is empty and not the AddressOf an empty string ;)
Greetings,
Patrick.
talking about latest changes in AcquireContext (CRYPT_VERIFYCONTEXT). I just would like to know, if the following change is explicit wanted or if it's a bug:
VDF17.1:
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,0)) to bOk
If (not(bOk)) Begin
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,CRYPT_NEWKEYSET)) to bOk
End
changed to
DF18.1 alpha 3:
// Fallback to original
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,0)) to bOk
If (bOk) Begin
Move (CryptAcquireContext(AddressOf(hProv),0,AddressOf( sProvider),iProvider,CRYPT_NEWKEYSET)) to bOk
End
Just wondering, if it just fixed a bug or introduced a new one :confused:
And, if I'm already here and talking about that function - I have a feature request. Please consider supporting the default provider:
if(CryptAcquireContext(
&hCryptProv, // handle to the CSP
UserName, // container name
NULL, // use the default provider
PROV_RSA_FULL, // provider type
0)) // flag values
According to Microsoft we have to provide NULL if psProvider(self) is empty and not the AddressOf an empty string ;)
Greetings,
Patrick.