You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fx-dev@ws.apache.org by "Mohan, Muthiah" <Mu...@stercomm.com> on 2006/11/27 11:44:40 UTC
Problem using JCE Provider with WSS4J
Hi,
I am trying to use WSS4J as API to do SOAP Message Encryption. The
Problem here is that I cannot use Bouncy Castle as a JCE Provider.
I have a different JCE provider that I have to use as part of my code.
The WSS4J API tries to get the Cipher Instance this way (in
org\apache\ws\security\util\WSSecurityUtil.java)
cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING");
My JCE provider does not understand the cipher mode "NONE". When I use
"RSA/ECB/PKCS1PADDING" or simply "RSA" it works fine.
I cannot change the WSS4J code and make the changes. Is there any other
way in which I can dynamically set the Cipher Mode, Padding etc so that
I can use my JCE Provider and get back the Cipher?
Basically I should be able to set the String to "RSA/ECB/PKCS1PADDING"
instead of "RSA/NONE/PKCS1PADDING". Then everything will work for me and
my problem is solved.
Please advice.
Thanks
Muthiah Mohan