Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

XML Signing using PEM certificate / PKCS#7

843811Mar 8 2007
Hi all,

I am a newbie and I have this problem:

I have an XML string: <mydocument>xxxxxxx</mydocument>

I have a certificate in PEM format, it's a file mycertificate.pem, its contenbt it something like :
-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQDU1Dzg5SQbnQM6sadto64qfR0bmzzHgtOGHLVfgrt6YsZ04Y36
yNcvWuHK3VVGlmJAtLrmWJBdIlwkIZBBlqlitVmg/RBWRFEyKOCtbW+f1fvY8es2kCc
ezeHtMppY/ZxYVfCw3Ho7cafAr7fgjFgVbsCQB1f9lbrHFRv5Pf59VP03c5qhg4w
XDUXEkldtvxYt07x3qE3hD8RV4/ZgnMgb2SVZyqdVppbVkCvron5ZWZ9CMyaocqoh
gBkc3W/HHs4nQFN19aG2TpPRIE7JP5n4abqH0ol7DdC2
-----END RSA PRIVATE KEY-----
-----BEGIN CERTIFICATE-----
MIIDSDCCAjCgAwIBAgICEhQwDQYJKoZIhvcNAQEFBQAwLDEUMBIGA1UEChMLbW9iaXN0YXIuYmUx
cYFw2QYU2bSe6eFtCreUaR2WU4mVez2ZhR7mIYY1QS9PAR9GBVQREs/OPj8vAA==
-----END CERTIFICATE-----
I want to sign my XML String (what is inside <mydocument> element ) using the certificate above, with PKCS7 compliant algorithm.

I'm using JDK1.4 (and i cannot move to 1.6)

Any help please ?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Apr 5 2007
Added on Mar 8 2007
0 comments
247 views