[xmlsec] [Patch] Key / Certificate loading from memory

Aleksey Sanin aleksey at aleksey.com
Thu Aug 7 02:15:38 PDT 2003


Hi, Joachim!

Thanks for the patch! It looks ok to me and I would've applied it 
immidiately
but there is one small thing I would like to improve. Both functions for 
reading
keys from file and from memory looks like this:

       1) create BIO (file or memory)
       2) do a bunch of stuff

I think that the right approach would be to create 
xmlSecOpenSSLAppKeyLoadBio ()
function that does 2) and have trivial functions 
xmlSecOpenSSLAppKeyLoad() and
xmlSecOpenSSLAppKeyLoadMemory(). There is one minor issue with pkcs12 files
that do not use BIO now but I think it could be done the same way too. I 
think that
this would make code a little bit more simple :) Let me know of you 
would like to do
this change. Otherwise I probably can do it tomorrow night.

And I am not sure I see the memory leak fix you mentioned. Which 
function is it in?

Aleksey


Joachim Bauch wrote:

> Hi,
>
> attached is a patch that supports loading of keys and certificates 
> from memory with the
> openssl libraries. It also fixes a memory leak in 
> xmlSecOpenSSLAppKeyCertLoad.
>
> Joachim
>





More information about the xmlsec mailing list