You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wss4j-dev@ws.apache.org by Dimitri Idessis <Di...@gmx.de> on 2006/02/21 20:12:03 UTC
encryption with wss4j
Hi
I´m trying to encrypt my SOAP message with wss4j and this is a part of the
code:
WSEncryptBody encryptor = new WSEncryptBody();
encryptor.setUserInfo("Server");
Crypto crypto = CryptoFactory.getInstance("crypto_properties.txt");
Document cryptDoc = encryptor.build(Doc, crypto);
In my crypto_properties.txt is certificate with rsa key. And i get the
following exception:
java.lang.IllegalArgumentException: can't support mode ECB
at
org.bouncycastle.jce.provider.JCERSACipher.engineSetMode(JCERSACipher.java:112)
at javax.crypto.Cipher.initCipherSpi(Cipher.java:332)
at javax.crypto.Cipher.getInstance(Cipher.java:247)
at
org.apache.ws.security.util.WSSecurityUtil.getCipherInstance(WSSecurityUtil.java:883)
at
org.apache.ws.security.message.WSEncryptBody.build(WSEncryptBody.java:337)
Can i use an another provider or another mode or something else to avoid
this problem?
--
Lust, ein paar Euro nebenbei zu verdienen? Ohne Kosten, ohne Risiko!
Satte Provisionen für GMX Partner: http://www.gmx.net/de/go/partner
---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org