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 vivek srinivasan <sr...@hotmail.com> on 2006/09/09 21:41:57 UTC

unsupported key transport encryption algorithm:

I am trying to do an encryption(no combination with sigantures but just 
encryotion). Here are the properties set on the client side.
user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS, 
"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE, 
"crypto.properties");

On the cilent side, iget the following error

    [junit] End override of Transform.register.
    [junit] org.apache.ws.security.WSSecurityException: WSHandler: 
Encryption: error during message
processingorg.apache.ws.security.WSSecurityException: An unsupported 
signature or encryption algorit
hm was used (unsupported key transport encryption algorithm: No such 
algorithm: http://www.w3.org/20
01/04/xmlenc#rsa-1_5)
    [junit]     at 
org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
    [junit]     at 
org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
    [junit]     at 
org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
    [junit]     at 
org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)

What am i missing here? Is there a problem with the keys that i generated? I 
use bouncy castle to generated the keys as follows
C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass 
KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD 
-storetype BKS -provider BC.
i eventried chaging the encryption transport algorithm  to 
user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT, 
"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")

_________________________________________________________________
Check the weather nationwide with MSN Search: Try it now!  
http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
Ok the problem was bascially because i was using the bcprovjdk1.2.7.jar. And 
this version doesnot support RSA/NONE/PKCSK1PADDING. I got past theproblem 
afteri upgraded bouncy castle to the newer version


>From: "vivek srinivasan" <sr...@hotmail.com>
>To: srinivasanvivek@hotmail.com, ruchith.fernando@gmail.com
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Mon, 11 Sep 2006 15:29:02 +0000
>
>Ok.. Here is where the exception happens when it tries to   cipher = 
>Cipher.getInstance("RSA/NONE/PKCS1PADDING");. The WSS4J code does seem to 
>initialize the Bouncy castle provider in(WSSConfig.java)
>Here is the method in WSSecurityUtil.java.
>public static Cipher getCipherInstance(String cipherAlgo)
>            throws WSSecurityException {
>        Cipher cipher = null;
>        try {
>            if 
>(cipherAlgo.equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSA15)) {
>                cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING");
>            } else if (cipherAlgo
>                    .equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSAOEP)) {
>                cipher = Cipher.getInstance("RSA/NONE/OAEPPADDING");
>            } else {
>                throw new WSSecurityException(
>                        WSSecurityException.UNSUPPORTED_ALGORITHM,
>                        "unsupportedKeyTransp", new Object[] { cipherAlgo 
>});
>            }
>        } catch (NoSuchPaddingException ex) {
>            throw new WSSecurityException(
>                    WSSecurityException.UNSUPPORTED_ALGORITHM,
>                    "unsupportedKeyTransp", new Object[] { "No such 
>padding: "
>                            + cipherAlgo });
>        } catch (NoSuchAlgorithmException ex) {
>            throw new WSSecurityException(
>                    WSSecurityException.UNSUPPORTED_ALGORITHM,
>                    "unsupportedKeyTransp",
>                    new Object[] { "No such algorithm: " + cipherAlgo });
>        }
>        return cipher;
>    }
>
>According the code in WSS4J , how does it know that it has to use the BC 
>provider?Should the code should not be   cipher = 
>Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");?
>
>>From: "vivek srinivasan" <sr...@hotmail.com>
>>To: ruchith.fernando@gmail.com
>>CC: wss4j-dev@ws.apache.org
>>Subject: Re: unsupported key transport encryption algorithm:
>>Date: Sun, 10 Sep 2006 16:38:59 +0000
>>
>>YEs. i have the bouncy castle jar in the classpath(to be very surei have 
>>included itin jre/lib/ext). I have updated the java.security and also have 
>>the appropriate unrestricted policy jars in the jre/lib/security 
>>directory. Is there anythuing else that i am missing? BTw, i am using axis 
>>1.4 and wss4j 1.5.
>>Can i not use another encryption transport algorithmjust to get overthis 
>>issue?
>>
>>
>>>From: "Ruchith Fernando" <ru...@gmail.com>
>>>To: "vivek srinivasan" <sr...@hotmail.com>
>>>CC: wss4j-dev@ws.apache.org
>>>Subject: Re: unsupported key transport encryption algorithm:
>>>Date: Sun, 10 Sep 2006 20:11:55 +0530
>>>
>>>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>>>bcprov-jdk15-132.jar) in the classpath.
>>>
>>>If you are using JKD 1.5 then follow the instructions given here : (In
>>>General item #3)
>>>http://ws.apache.org/axis2/faq.html
>>>
>>>Thanks,
>>>Ruchith
>>>
>>>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>>>I am trying to do an encryption(no combination with sigantures but just
>>>>encryotion). Here are the properties set on the client side.
>>>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>>>"crypto.properties");
>>>>
>>>>On the cilent side, iget the following error
>>>>
>>>>     [junit] End override of Transform.register.
>>>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>>>Encryption: error during message
>>>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>>>signature or encryption algorit
>>>>hm was used (unsupported key transport encryption algorithm: No such
>>>>algorithm: http://www.w3.org/20
>>>>01/04/xmlenc#rsa-1_5)
>>>>     [junit]     at
>>>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>>>     [junit]     at
>>>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>>>     [junit]     at
>>>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>>>     [junit]     at
>>>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>>
>>>>What am i missing here? Is there a problem with the keys that i 
>>>>generated? I
>>>>use bouncy castle to generated the keys as follows
>>>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>>>-storetype BKS -provider BC.
>>>>i eventried chaging the encryption transport algorithm  to
>>>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>>>
>>>>_________________________________________________________________
>>>>Check the weather nationwide with MSN Search: Try it now!
>>>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>>
>>>>
>>>
>>>
>>>--
>>>www.ruchith.org
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>
>>
>>_________________________________________________________________
>>Windows Live Spaces is here! It’s easy to create your own personal Web 
>>site.  http://spaces.live.com/signup.aspx
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>
>_________________________________________________________________
>Get the new Windows Live Messenger!   
>http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Search from any web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!   http://get.live.com/toolbar/overview


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
Ok the problem was bascially because i was using the bcprovjdk1.2.7.jar. And 
this version doesnot support RSA/NONE/PKCSK1PADDING. I got past theproblem 
afteri upgraded bouncy castle to the newer version


>From: "vivek srinivasan" <sr...@hotmail.com>
>To: srinivasanvivek@hotmail.com, ruchith.fernando@gmail.com
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Mon, 11 Sep 2006 15:29:02 +0000
>
>Ok.. Here is where the exception happens when it tries to   cipher = 
>Cipher.getInstance("RSA/NONE/PKCS1PADDING");. The WSS4J code does seem to 
>initialize the Bouncy castle provider in(WSSConfig.java)
>Here is the method in WSSecurityUtil.java.
>public static Cipher getCipherInstance(String cipherAlgo)
>            throws WSSecurityException {
>        Cipher cipher = null;
>        try {
>            if 
>(cipherAlgo.equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSA15)) {
>                cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING");
>            } else if (cipherAlgo
>                    .equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSAOEP)) {
>                cipher = Cipher.getInstance("RSA/NONE/OAEPPADDING");
>            } else {
>                throw new WSSecurityException(
>                        WSSecurityException.UNSUPPORTED_ALGORITHM,
>                        "unsupportedKeyTransp", new Object[] { cipherAlgo 
>});
>            }
>        } catch (NoSuchPaddingException ex) {
>            throw new WSSecurityException(
>                    WSSecurityException.UNSUPPORTED_ALGORITHM,
>                    "unsupportedKeyTransp", new Object[] { "No such 
>padding: "
>                            + cipherAlgo });
>        } catch (NoSuchAlgorithmException ex) {
>            throw new WSSecurityException(
>                    WSSecurityException.UNSUPPORTED_ALGORITHM,
>                    "unsupportedKeyTransp",
>                    new Object[] { "No such algorithm: " + cipherAlgo });
>        }
>        return cipher;
>    }
>
>According the code in WSS4J , how does it know that it has to use the BC 
>provider?Should the code should not be   cipher = 
>Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");?
>
>>From: "vivek srinivasan" <sr...@hotmail.com>
>>To: ruchith.fernando@gmail.com
>>CC: wss4j-dev@ws.apache.org
>>Subject: Re: unsupported key transport encryption algorithm:
>>Date: Sun, 10 Sep 2006 16:38:59 +0000
>>
>>YEs. i have the bouncy castle jar in the classpath(to be very surei have 
>>included itin jre/lib/ext). I have updated the java.security and also have 
>>the appropriate unrestricted policy jars in the jre/lib/security 
>>directory. Is there anythuing else that i am missing? BTw, i am using axis 
>>1.4 and wss4j 1.5.
>>Can i not use another encryption transport algorithmjust to get overthis 
>>issue?
>>
>>
>>>From: "Ruchith Fernando" <ru...@gmail.com>
>>>To: "vivek srinivasan" <sr...@hotmail.com>
>>>CC: wss4j-dev@ws.apache.org
>>>Subject: Re: unsupported key transport encryption algorithm:
>>>Date: Sun, 10 Sep 2006 20:11:55 +0530
>>>
>>>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>>>bcprov-jdk15-132.jar) in the classpath.
>>>
>>>If you are using JKD 1.5 then follow the instructions given here : (In
>>>General item #3)
>>>http://ws.apache.org/axis2/faq.html
>>>
>>>Thanks,
>>>Ruchith
>>>
>>>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>>>I am trying to do an encryption(no combination with sigantures but just
>>>>encryotion). Here are the properties set on the client side.
>>>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>>>"crypto.properties");
>>>>
>>>>On the cilent side, iget the following error
>>>>
>>>>     [junit] End override of Transform.register.
>>>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>>>Encryption: error during message
>>>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>>>signature or encryption algorit
>>>>hm was used (unsupported key transport encryption algorithm: No such
>>>>algorithm: http://www.w3.org/20
>>>>01/04/xmlenc#rsa-1_5)
>>>>     [junit]     at
>>>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>>>     [junit]     at
>>>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>>>     [junit]     at
>>>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>>>     [junit]     at
>>>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>>
>>>>What am i missing here? Is there a problem with the keys that i 
>>>>generated? I
>>>>use bouncy castle to generated the keys as follows
>>>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>>>-storetype BKS -provider BC.
>>>>i eventried chaging the encryption transport algorithm  to
>>>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>>>
>>>>_________________________________________________________________
>>>>Check the weather nationwide with MSN Search: Try it now!
>>>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>>>
>>>>
>>>>---------------------------------------------------------------------
>>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>>
>>>>
>>>
>>>
>>>--
>>>www.ruchith.org
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>
>>
>>_________________________________________________________________
>>Windows Live Spaces is here! It’s easy to create your own personal Web 
>>site.  http://spaces.live.com/signup.aspx
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>
>_________________________________________________________________
>Get the new Windows Live Messenger!   
>http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Search from any web page with powerful protection. Get the FREE Windows Live 
Toolbar Today!   http://get.live.com/toolbar/overview


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
Ok.. Here is where the exception happens when it tries to   cipher = 
Cipher.getInstance("RSA/NONE/PKCS1PADDING");. The WSS4J code does seem to 
initialize the Bouncy castle provider in(WSSConfig.java)
Here is the method in WSSecurityUtil.java.
public static Cipher getCipherInstance(String cipherAlgo)
            throws WSSecurityException {
        Cipher cipher = null;
        try {
            if (cipherAlgo.equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSA15)) 
{
                cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING");
            } else if (cipherAlgo
                    .equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSAOEP)) {
                cipher = Cipher.getInstance("RSA/NONE/OAEPPADDING");
            } else {
                throw new WSSecurityException(
                        WSSecurityException.UNSUPPORTED_ALGORITHM,
                        "unsupportedKeyTransp", new Object[] { cipherAlgo 
});
            }
        } catch (NoSuchPaddingException ex) {
            throw new WSSecurityException(
                    WSSecurityException.UNSUPPORTED_ALGORITHM,
                    "unsupportedKeyTransp", new Object[] { "No such padding: 
"
                            + cipherAlgo });
        } catch (NoSuchAlgorithmException ex) {
            throw new WSSecurityException(
                    WSSecurityException.UNSUPPORTED_ALGORITHM,
                    "unsupportedKeyTransp",
                    new Object[] { "No such algorithm: " + cipherAlgo });
        }
        return cipher;
    }

According the code in WSS4J , how does it know that it has to use the BC 
provider?Should the code should not be   cipher = 
Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");?

>From: "vivek srinivasan" <sr...@hotmail.com>
>To: ruchith.fernando@gmail.com
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Sun, 10 Sep 2006 16:38:59 +0000
>
>YEs. i have the bouncy castle jar in the classpath(to be very surei have 
>included itin jre/lib/ext). I have updated the java.security and also have 
>the appropriate unrestricted policy jars in the jre/lib/security directory. 
>Is there anythuing else that i am missing? BTw, i am using axis 1.4 and 
>wss4j 1.5.
>Can i not use another encryption transport algorithmjust to get overthis 
>issue?
>
>
>>From: "Ruchith Fernando" <ru...@gmail.com>
>>To: "vivek srinivasan" <sr...@hotmail.com>
>>CC: wss4j-dev@ws.apache.org
>>Subject: Re: unsupported key transport encryption algorithm:
>>Date: Sun, 10 Sep 2006 20:11:55 +0530
>>
>>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>>bcprov-jdk15-132.jar) in the classpath.
>>
>>If you are using JKD 1.5 then follow the instructions given here : (In
>>General item #3)
>>http://ws.apache.org/axis2/faq.html
>>
>>Thanks,
>>Ruchith
>>
>>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>>I am trying to do an encryption(no combination with sigantures but just
>>>encryotion). Here are the properties set on the client side.
>>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>>"crypto.properties");
>>>
>>>On the cilent side, iget the following error
>>>
>>>     [junit] End override of Transform.register.
>>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>>Encryption: error during message
>>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>>signature or encryption algorit
>>>hm was used (unsupported key transport encryption algorithm: No such
>>>algorithm: http://www.w3.org/20
>>>01/04/xmlenc#rsa-1_5)
>>>     [junit]     at
>>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>>     [junit]     at
>>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>>     [junit]     at
>>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>>     [junit]     at
>>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>
>>>What am i missing here? Is there a problem with the keys that i 
>>>generated? I
>>>use bouncy castle to generated the keys as follows
>>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>>-storetype BKS -provider BC.
>>>i eventried chaging the encryption transport algorithm  to
>>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>>
>>>_________________________________________________________________
>>>Check the weather nationwide with MSN Search: Try it now!
>>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>
>>>
>>
>>
>>--
>>www.ruchith.org
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>
>_________________________________________________________________
>Windows Live Spaces is here! It’s easy to create your own personal Web 
>site.  http://spaces.live.com/signup.aspx
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Get the new Windows Live Messenger!   
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
Ok.. Here is where the exception happens when it tries to   cipher = 
Cipher.getInstance("RSA/NONE/PKCS1PADDING");. The WSS4J code does seem to 
initialize the Bouncy castle provider in(WSSConfig.java)
Here is the method in WSSecurityUtil.java.
public static Cipher getCipherInstance(String cipherAlgo)
            throws WSSecurityException {
        Cipher cipher = null;
        try {
            if (cipherAlgo.equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSA15)) 
{
                cipher = Cipher.getInstance("RSA/NONE/PKCS1PADDING");
            } else if (cipherAlgo
                    .equalsIgnoreCase(WSConstants.KEYTRANSPORT_RSAOEP)) {
                cipher = Cipher.getInstance("RSA/NONE/OAEPPADDING");
            } else {
                throw new WSSecurityException(
                        WSSecurityException.UNSUPPORTED_ALGORITHM,
                        "unsupportedKeyTransp", new Object[] { cipherAlgo 
});
            }
        } catch (NoSuchPaddingException ex) {
            throw new WSSecurityException(
                    WSSecurityException.UNSUPPORTED_ALGORITHM,
                    "unsupportedKeyTransp", new Object[] { "No such padding: 
"
                            + cipherAlgo });
        } catch (NoSuchAlgorithmException ex) {
            throw new WSSecurityException(
                    WSSecurityException.UNSUPPORTED_ALGORITHM,
                    "unsupportedKeyTransp",
                    new Object[] { "No such algorithm: " + cipherAlgo });
        }
        return cipher;
    }

According the code in WSS4J , how does it know that it has to use the BC 
provider?Should the code should not be   cipher = 
Cipher.getInstance("RSA/NONE/PKCS1PADDING","BC");?

>From: "vivek srinivasan" <sr...@hotmail.com>
>To: ruchith.fernando@gmail.com
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Sun, 10 Sep 2006 16:38:59 +0000
>
>YEs. i have the bouncy castle jar in the classpath(to be very surei have 
>included itin jre/lib/ext). I have updated the java.security and also have 
>the appropriate unrestricted policy jars in the jre/lib/security directory. 
>Is there anythuing else that i am missing? BTw, i am using axis 1.4 and 
>wss4j 1.5.
>Can i not use another encryption transport algorithmjust to get overthis 
>issue?
>
>
>>From: "Ruchith Fernando" <ru...@gmail.com>
>>To: "vivek srinivasan" <sr...@hotmail.com>
>>CC: wss4j-dev@ws.apache.org
>>Subject: Re: unsupported key transport encryption algorithm:
>>Date: Sun, 10 Sep 2006 20:11:55 +0530
>>
>>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>>bcprov-jdk15-132.jar) in the classpath.
>>
>>If you are using JKD 1.5 then follow the instructions given here : (In
>>General item #3)
>>http://ws.apache.org/axis2/faq.html
>>
>>Thanks,
>>Ruchith
>>
>>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>>I am trying to do an encryption(no combination with sigantures but just
>>>encryotion). Here are the properties set on the client side.
>>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>>"crypto.properties");
>>>
>>>On the cilent side, iget the following error
>>>
>>>     [junit] End override of Transform.register.
>>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>>Encryption: error during message
>>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>>signature or encryption algorit
>>>hm was used (unsupported key transport encryption algorithm: No such
>>>algorithm: http://www.w3.org/20
>>>01/04/xmlenc#rsa-1_5)
>>>     [junit]     at
>>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>>     [junit]     at
>>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>>     [junit]     at
>>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>>     [junit]     at
>>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>>
>>>What am i missing here? Is there a problem with the keys that i 
>>>generated? I
>>>use bouncy castle to generated the keys as follows
>>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>>-storetype BKS -provider BC.
>>>i eventried chaging the encryption transport algorithm  to
>>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>>
>>>_________________________________________________________________
>>>Check the weather nationwide with MSN Search: Try it now!
>>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>>
>>>
>>>---------------------------------------------------------------------
>>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>>
>>>
>>
>>
>>--
>>www.ruchith.org
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>
>_________________________________________________________________
>Windows Live Spaces is here! It’s easy to create your own personal Web 
>site.  http://spaces.live.com/signup.aspx
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Get the new Windows Live Messenger!   
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
YEs. i have the bouncy castle jar in the classpath(to be very surei have 
included itin jre/lib/ext). I have updated the java.security and also have 
the appropriate unrestricted policy jars in the jre/lib/security directory. 
Is there anythuing else that i am missing? BTw, i am using axis 1.4 and 
wss4j 1.5.
Can i not use another encryption transport algorithmjust to get overthis 
issue?


>From: "Ruchith Fernando" <ru...@gmail.com>
>To: "vivek srinivasan" <sr...@hotmail.com>
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Sun, 10 Sep 2006 20:11:55 +0530
>
>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>bcprov-jdk15-132.jar) in the classpath.
>
>If you are using JKD 1.5 then follow the instructions given here : (In
>General item #3)
>http://ws.apache.org/axis2/faq.html
>
>Thanks,
>Ruchith
>
>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>I am trying to do an encryption(no combination with sigantures but just
>>encryotion). Here are the properties set on the client side.
>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>"crypto.properties");
>>
>>On the cilent side, iget the following error
>>
>>     [junit] End override of Transform.register.
>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>Encryption: error during message
>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>signature or encryption algorit
>>hm was used (unsupported key transport encryption algorithm: No such
>>algorithm: http://www.w3.org/20
>>01/04/xmlenc#rsa-1_5)
>>     [junit]     at
>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>     [junit]     at
>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>     [junit]     at
>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>     [junit]     at
>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>
>>What am i missing here? Is there a problem with the keys that i generated? 
>>I
>>use bouncy castle to generated the keys as follows
>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>-storetype BKS -provider BC.
>>i eventried chaging the encryption transport algorithm  to
>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>
>>_________________________________________________________________
>>Check the weather nationwide with MSN Search: Try it now!
>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>>
>
>
>--
>www.ruchith.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Windows Live Spaces is here! It’s easy to create your own personal Web site. 
  http://spaces.live.com/signup.aspx


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by vivek srinivasan <sr...@hotmail.com>.
YEs. i have the bouncy castle jar in the classpath(to be very surei have 
included itin jre/lib/ext). I have updated the java.security and also have 
the appropriate unrestricted policy jars in the jre/lib/security directory. 
Is there anythuing else that i am missing? BTw, i am using axis 1.4 and 
wss4j 1.5.
Can i not use another encryption transport algorithmjust to get overthis 
issue?


>From: "Ruchith Fernando" <ru...@gmail.com>
>To: "vivek srinivasan" <sr...@hotmail.com>
>CC: wss4j-dev@ws.apache.org
>Subject: Re: unsupported key transport encryption algorithm:
>Date: Sun, 10 Sep 2006 20:11:55 +0530
>
>Do you have the bcprov.jar (bcprov-jdk13-132.jar or
>bcprov-jdk15-132.jar) in the classpath.
>
>If you are using JKD 1.5 then follow the instructions given here : (In
>General item #3)
>http://ws.apache.org/axis2/faq.html
>
>Thanks,
>Ruchith
>
>On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
>>I am trying to do an encryption(no combination with sigantures but just
>>encryotion). Here are the properties set on the client side.
>>user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
>>user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
>>user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
>>"test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
>>user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
>>"crypto.properties");
>>
>>On the cilent side, iget the following error
>>
>>     [junit] End override of Transform.register.
>>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
>>Encryption: error during message
>>processingorg.apache.ws.security.WSSecurityException: An unsupported
>>signature or encryption algorit
>>hm was used (unsupported key transport encryption algorithm: No such
>>algorithm: http://www.w3.org/20
>>01/04/xmlenc#rsa-1_5)
>>     [junit]     at
>>org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>>     [junit]     at
>>org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>>     [junit]     at
>>org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>>     [junit]     at
>>org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>>
>>What am i missing here? Is there a problem with the keys that i generated? 
>>I
>>use bouncy castle to generated the keys as follows
>>C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
>>KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
>>-storetype BKS -provider BC.
>>i eventried chaging the encryption transport algorithm  to
>>user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
>>"http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>>
>>_________________________________________________________________
>>Check the weather nationwide with MSN Search: Try it now!
>>http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>>
>>
>
>
>--
>www.ruchith.org
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
>For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>

_________________________________________________________________
Windows Live Spaces is here! It’s easy to create your own personal Web site. 
  http://spaces.live.com/signup.aspx


---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by Ruchith Fernando <ru...@gmail.com>.
Do you have the bcprov.jar (bcprov-jdk13-132.jar or
bcprov-jdk15-132.jar) in the classpath.

If you are using JKD 1.5 then follow the instructions given here : (In
General item #3)
http://ws.apache.org/axis2/faq.html

Thanks,
Ruchith

On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
> I am trying to do an encryption(no combination with sigantures but just
> encryotion). Here are the properties set on the client side.
> user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
> user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
> user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
> "test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
> user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
> "crypto.properties");
>
> On the cilent side, iget the following error
>
>     [junit] End override of Transform.register.
>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
> Encryption: error during message
> processingorg.apache.ws.security.WSSecurityException: An unsupported
> signature or encryption algorit
> hm was used (unsupported key transport encryption algorithm: No such
> algorithm: http://www.w3.org/20
> 01/04/xmlenc#rsa-1_5)
>     [junit]     at
> org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>     [junit]     at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>     [junit]     at
> org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>     [junit]     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>
> What am i missing here? Is there a problem with the keys that i generated? I
> use bouncy castle to generated the keys as follows
> C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
> KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
> -storetype BKS -provider BC.
> i eventried chaging the encryption transport algorithm  to
> user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
> "http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>
> _________________________________________________________________
> Check the weather nationwide with MSN Search: Try it now!
> http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org


Re: unsupported key transport encryption algorithm:

Posted by Ruchith Fernando <ru...@gmail.com>.
Do you have the bcprov.jar (bcprov-jdk13-132.jar or
bcprov-jdk15-132.jar) in the classpath.

If you are using JKD 1.5 then follow the instructions given here : (In
General item #3)
http://ws.apache.org/axis2/faq.html

Thanks,
Ruchith

On 9/10/06, vivek srinivasan <sr...@hotmail.com> wrote:
> I am trying to do an encryption(no combination with sigantures but just
> encryotion). Here are the properties set on the client side.
> user2Binding._setProperty(WSHandlerConstants.ACTION, "ENCRYPT");
> user2Binding._setProperty(WSHandlerConstants.USER, "KEYHOLDER");
> user2Binding._setProperty(WSHandlerConstants.PW_CALLBACK_CLASS,
> "test.com.ams.coretest.serverdependent.webservices.WSS4JClientPWCallback");
> user2Binding._setProperty(WSHandlerConstants.ENC_PROP_FILE,
> "crypto.properties");
>
> On the cilent side, iget the following error
>
>     [junit] End override of Transform.register.
>     [junit] org.apache.ws.security.WSSecurityException: WSHandler:
> Encryption: error during message
> processingorg.apache.ws.security.WSSecurityException: An unsupported
> signature or encryption algorit
> hm was used (unsupported key transport encryption algorithm: No such
> algorithm: http://www.w3.org/20
> 01/04/xmlenc#rsa-1_5)
>     [junit]     at
> org.apache.ws.security.action.EncryptionAction.execute(EncryptionAction.java:64)
>     [junit]     at
> org.apache.ws.security.handler.WSHandler.doSenderAction(WSHandler.java:191)
>     [junit]     at
> org.apache.ws.axis.security.WSDoAllSender.invoke(WSDoAllSender.java:170)
>     [junit]     at
> org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
>
> What am i missing here? Is there a problem with the keys that i generated? I
> use bouncy castle to generated the keys as follows
> C:\>keytool -genkey -v -alias KEYHOLDER -sigalg DSA -keypass
> KEYHOLDERPASSWORD -keystore c:\.signing_device -storepass PASSWORD
> -storetype BKS -provider BC.
> i eventried chaging the encryption transport algorithm  to
> user2Binding._setProperty(WSHandlerConstants.ENC_KEY_TRANSPORT,
> "http://www.w3.org/2001/04/xmlenc#tripledes-cbc")
>
> _________________________________________________________________
> Check the weather nationwide with MSN Search: Try it now!
> http://search.msn.com/results.aspx?q=weather&FORM=WLMTAG
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: wss4j-dev-help@ws.apache.org
>
>


-- 
www.ruchith.org

---------------------------------------------------------------------
To unsubscribe, e-mail: wss4j-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: wss4j-dev-help@ws.apache.org