Re: unusual behavior in cryptExportCert

Ed Curren <[email protected]>
Newsgroups gmane.comp.encryption.cryptlib
Message-ID <[email protected]>
Hey Peter,
The call to cryptExportCert with the first parameter as NULL returns a zero as the return value and 416 as the certLength.  It's the second call to cryptExport cert where the buffer is set to a char array of 416 (or whatever the length of the certificate will be, this time it is 416), where I get a -1 as the return code.  

Thanks Peter.
Ed

> From: [email protected]
> To: [email protected]; [email protected]
> Subject: Re: [Cryptlib] unusual behavior in cryptExportCert
> Date: Mon, 10 May 2010 23:20:35 +1200
> 
> Ed Curren <[email protected]> writes:
> 
> >This is because when I use certLength the second call to cryptExportCert (the
> >one with 'buffer' as the first argument) returns a -1.
> 
> Are you sure it isn't the first call that's returning the CRYPT_ERROR_PARAM1?
> You're telling cryptlib that you have a buffer of size 4K, but passing a null
> pointer, which would return an error for the buffer parameter.  If you're just
> doing a length check you pass a NULL pointer with the buffer size set to zero.
> 
> Peter.

_______________________________________________
Cryptlib mailing list
[email protected] via Mail: [email protected]
Archive: ftp://ftp.franken.de/pub/crypt/cryptlib/archives/
http://news.gmane.org/gmane.comp.encryption.cryptlib
Posts from non-subscribed addresses are blocked to prevent spam, please
subscribe in order to post messages.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.