Hi there:

This is my first post to the list. My problem is very simple yet I have
not found an answer after reading the man pages, googling for it and
browsing the list archive.

I am writing a Java applet to sign documents created on line. No problem
over here, I hope.

However, to verify the signed documents output by the applet I resorted
to "openssl rsautl" to sign the document and compare the result to the
one signed by the applet. Here is where my problem is.

$ openssl rsautl -sign -raw -in prueba.xml -inkey abbpermarn.priv.pem
-out prueba.ssl.sgn
Enter pass phrase for abbpermarn.priv.pem:
RSA operation error
3919:error:0406B06E:rsa routines:RSA_padding_add_none:data too large for
key size:rsa_none.c:70:

I also tried:

$ openssl rsautl -sign -pkcs -in prueba.xml -inkey abbpermarn.priv.pem
-out prueba.ssl.sgn
Enter pass phrase for abbpermarn.priv.pem:
RSA operation error
3921:error:0406C06E:rsa routines:RSA_padding_add_PKCS1_type_1:data too
large for key size:rsa_pk1.c:73:
$

I have searched for "data too large for key size" and even took a look
at the source code trying to find an answer to an apparently simple
problem.

The input file (prueba.xml) is a small xml file (184 bytes). I have
tried two different private keys generated using openssl,  which are
working fine with the applet and in IE and Mozilla (after being exported
to a PFX with the self-signed certificate). I even tried the private key
used by Apache for HTTPS. In other words, I think there is no problem
with the RSA keys.

Given that the files are so small, I am attaching to this message a zip
file that contains prueba.xml and the test private key (no password)
just in case somebody wants to reproduce my test environment.

I am using OpenSSL 0.9.7a Feb 19 2003 under Mandrake Linux 9.1.

What am I doing wrong or missing?

Thanks in advance and, please, excuse me for my english.

Adolfo

P.S: 

Attachment: test.zip
Description: Zip archive

Reply via email to