[xmlsec] xmlsec-mscrypto code review

Aleksey Sanin aleksey at aleksey.com
Mon Sep 22 13:36:09 PDT 2003


First of all, thanks for your comments on my comments! I am going to 
compile a list of changes
I need to make based on your response and do necessary changes tonight.

>Speaking about errors. Why did you remove all the calls to GetLastError
>to fill the error msgs created by MS Crypto API error with some
>(especially during debugging) native error code?
I've explained in some other comment :) I put GetLastError() call in a 
central place "xmlsec-mscrypto
specific error handler in src/mscrypto/crypto.c file. Basicaly, all 
error messages reported by xmlsec in
xmlsec-mscrypto case include the error code reported by GetLastError() 
and the system error message
for that code. Probably I've should make a trivial change to skip that 
in case when GetLastError() == success
but this is a minor thing.

>Hmm, ok, I thought that it was desirable to use the buffer instead of
>direct (xml)mallocs in the xmlsec lib code. But I didn't use the
>xmlSecBuffer consistently, especially in the early code, simply because
>of my ignorance (I can be very ignorant, you know :)
It's better to use xmlSecBuffer instead of xmlMalloc() but you don't 
need to allocate memory in
xmlSecMSCryptoNodeGetBigNumValue() case at all :)


More information about the xmlsec mailing list