[xmlsec] xmlSecMSCryptoKeyDataAdoptCert

Dmitry Belyavsky beldmit at cryptocom.ru
Wed Jan 11 02:16:03 PST 2006


Greetings!

On Wed, 11 Jan 2006, Dmitry Belyavsky wrote:

> On Tue, 10 Jan 2006, Aleksey Sanin wrote:
>
> > Can you figure out which flag to use from the key somehow? Can you
> > try to use one flag and if it does not work, then use another one?
> > Can you use both flags in the same time?
>
> No, I can't use either both flags or figure out which flag to use.
> I've profiled an application and got about 5% performance degradation
> using CRYPT_ACQUIRE_COMPARE_KEY_FLAG. So it seems to me this flag should
> be used always.

The patch is attached.

-- 
SY, Dmitry Belyavsky (ICQ UIN 11116575)
-------------- next part --------------
Index: src/mscrypto/certkeys.c
===================================================================
RCS file: /cvs/xmlsec/src/mscrypto/certkeys.c,v
retrieving revision 1.13
retrieving revision 1.15
diff -u -r1.13 -r1.15
--- src/mscrypto/certkeys.c	27 Dec 2005 10:18:04 -0000	1.13
+++ src/mscrypto/certkeys.c	11 Jan 2006 10:08:16 -0000	1.15
@@ -432,7 +432,7 @@
         BOOL fCallerFreeProv = FALSE;
 
         if (!CryptAcquireCertificatePrivateKey(pCert, 
-					       CRYPT_ACQUIRE_USE_PROV_INFO_FLAG, 
+						CRYPT_ACQUIRE_COMPARE_KEY_FLAG, 
 					       NULL, 
 					       &hProv, 
 					       &(ctx->dwKeySpec), 


More information about the xmlsec mailing list