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

List:       ms-cryptoapi
Subject:    CryptHashToBeSigned() and CertGetIntendedKeyUsage()
From:       "Camille V. M. Collantes" <ccollant () CERTICOM ! COM>
Date:       1997-10-30 13:54:24
[Download RAW message or body]


I've been running some tests on those functions and noticed the following
things:

   The CryptHashToBeSigned() function is the only CryptHash* function that
   does not allow you to specify the hash algorithm to be used.  So when I
   ran a parallel test (hash the encoded PCERT_SIGNED_CONTENT_INFO
   structure using this function AND using the sequence of functions
   CryptCreateHash(), CryptHashData(), CryptGetHashParam(), and
   CryptDestroyHash()), the resulting hash values generated by those
   methods were not the same).  What default hash algorithm is used by the
   CryptHashToBeSigned() function?
   The CertGetIntendedKeyUsage() parameter list in the help file is not
   accurate.  In practice, the cbKeyUsage parameter is not a DWORD * but
   just a DWORD so the programmer must specify the size of the pbKeyUsage
   parameter.  In any event, I assigned cbKeyUsage with a value of 191 and
   allocated that much memory to the pbKeyUsage parameter.  The function
   returned FALSE but the corresponding error message was "Operation
   completed successfully".

Could anyone please explain why I got these results?

Thanks

---------------------------------------------------------------------------
---------------------------------------------------
Camille V. M. Collantes
Certicom Corp.
ccollant@certicom.com

www.certicom.com

----------------------------------------------------------------
Users Guide http://www.microsoft.com/sitebuilder/resource/mailfaq.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://microsoft.ease.lsoft.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