[xmlsec] decryption error

Meg Morgan meg at votehere.net
Wed Jan 29 14:47:39 PST 2003

As a follow up to my problems this morning I thought I'd share
with you what I found to be wrong.  As background info, I run
two kinds of tests on my code - one test calls the functions
as a user would, generating data and using it along the way.
The second test calls each function several times, with all
of the combinations of valid and invalid arguments, provided
by compiled test data.  Output from the first test can be used
to fuel the second test (at least for valid inputs).

My decryption problems in the first test seem to have resulted
from not freeing memory through BIO_free_all and RSA_free (and
of course DSA_free also).  Once I fixed that my first tests all
worked perfectly.  But the output data was not being accepted
by my second tests, in particular the RSA private key.  I found
that my compiled test data needed carriage-return/newlines at
the proper places, just like when the PEM-format keys are in
files.  Once I added those, my second tests succeeded.

Thanks again for your help!

Aleksey Sanin wrote:
> In your document you have the name of the key used for encryption:
> <KeyName>RSA Public Key</KeyName>
> You can specify this name in the xmlSecKey object. And I really think that
> you should try standalone xmlsec utility with this file and key.
> Aleksey

Meg Morgan                           425/450-2754
meg at votehere.net                   http://www.votehere.net

More information about the xmlsec mailing list