Uploaded image for project: 'WSO2 Application Server '
  1. WSO2 Application Server
  2. WSAS-778

STSsample fails due to an invalid certificate version

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Nightly
    • Fix Version/s: None
    • Component/s: samples
    • Labels:
      None
    • Environment:

      winxp, jdk15

    • Estimated Complexity:
      Moderate

      Description

      Follow the instructions given in sample-guide and run client. You will get the following exception.

      org.apache.axis2.AxisFault: Error during encryption
      at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:70)
      at org.apache.axis2.engine.Phase.invoke(Phase.java:317)
      at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:264)
      at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:429)
      at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:401)
      at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:228)
      at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163)
      at org.apache.axis2.client.ServiceClient.sendReceive(ServiceClient.java:548)
      at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:134)
      at org.wso2.wsas.sample.sts.client.Client.main(Client.java:98)
      Caused by: org.apache.rampart.RampartException: Error during encryption
      at org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:544)
      at org.apache.rampart.builder.AsymmetricBindingBuilder.build(AsymmetricBindingBuilder.java:93)
      at org.apache.rampart.MessageBuilder.build(MessageBuilder.java:147)
      at org.apache.rampart.handler.RampartSender.invoke(RampartSender.java:64)
      ... 9 more
      Caused by: org.apache.ws.security.WSSecurityException: An unsupported token was provided (An X509 certificate with version 3 must be used for SKI. The presented cert has version: 1
      )
      at org.apache.ws.security.message.token.SecurityTokenReference.setKeyIdentifierSKI(SecurityTokenReference.java:272)
      at org.apache.ws.security.message.WSSecEncryptedKey.prepareInternal(WSSecEncryptedKey.java:253)
      at org.apache.ws.security.message.WSSecEncrypt.prepare(WSSecEncrypt.java:260)
      at org.apache.rampart.builder.AsymmetricBindingBuilder.doSignBeforeEncrypt(AsymmetricBindingBuilder.java:510)
      ... 12 more
      Exception in thread "main" org.apache.rahas.TrustException: Error in obtaining token from : "http://10.100.1.150:9762/services/wso2wsas-sts"
      at org.apache.rahas.client.STSClient.requestSecurityToken(STSClient.java:141)
      at org.wso2.wsas.sample.sts.client.Client.main(Client.java:98)

        Attachments

          Activity

            People

            • Assignee:
              azeez@wso2.com Afkham Azeez
              Reporter:
              charitha@wso2.com Charitha Kankanamge
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: