axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Davanum Srinivas" <dava...@gmail.com>
Subject [Axis2] Conditional execution (Re: svn commit: r449291 - /webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java)
Date Sat, 23 Sep 2006 21:46:34 GMT
Ruchith,

Is it possible to query programatically whether the BASIC 256 algo's
are present? And run the tests if they are present? We could log a
message (not an junit failure/exception) in the log files telling the
user to install unlimited strength jurisdiction. That way the tests
are run at least on our machines where we do have it installed.

thanks,
-- dims

On 9/23/06, ruchithf@apache.org <ruchithf@apache.org> wrote:
> Author: ruchithf
> Date: Sat Sep 23 12:17:03 2006
> New Revision: 449291
>
> URL: http://svn.apache.org/viewvc?view=rev&rev=449291
> Log:
> Commenting out the tests that require Basic256 algo suite since they require the JRE
to have unlimited strength jurisdiction policy
>
> Modified:
>     webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java
>
> Modified: webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java
> URL: http://svn.apache.org/viewvc/webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java?view=diff&rev=449291&r1=449290&r2=449291
> ==============================================================================
> --- webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java
(original)
> +++ webservices/axis2/trunk/java/modules/security/test/org/apache/rampart/AsymmetricBindingBuilderTest.java
Sat Sep 23 12:17:03 2006
> @@ -26,173 +26,173 @@
>  import java.util.ArrayList;
>
>  public class AsymmetricBindingBuilderTest extends MessageBuilderTestBase {
> -
> -    public void testAsymmBinding() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-1.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> -    public void testAsymmBindingServerSide() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            ctx.setServerSide(true);
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-1.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> -    public void testAsymmBindingWithSigDK() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-2-sig-dk.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> -    public void testAsymmBindingWithDK() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-3-dk.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> -            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> -    public void testAsymmBindingWithDKEncrBeforeSig() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-4-dk-ebs.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> -
> -    public void testAsymmBindingEncrBeforeSig() {
> -        try {
> -            MessageContext ctx = getMsgCtx();
> -
> -            String policyXml = "test-resources/policy/rampart-asymm-binding-5-ebs.xml";
> -            Policy policy = this.loadPolicy(policyXml);
> -
> -            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> -
> -            MessageBuilder builder = new MessageBuilder();
> -            builder.build(ctx);
> -
> -            ArrayList list = new ArrayList();
> -
> -            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> -            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> -            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> -
> -            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> -        } catch (Exception e) {
> -            e.printStackTrace();
> -            fail(e.getMessage());
> -        }
> -    }
> -
> +//
> +//    public void testAsymmBinding() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-1.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
> +//    public void testAsymmBindingServerSide() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            ctx.setServerSide(true);
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-1.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
> +//    public void testAsymmBindingWithSigDK() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-2-sig-dk.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
> +//    public void testAsymmBindingWithDK() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-3-dk.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.WSSE_NS, WSConstants.BINARY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> +//            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
> +//    public void testAsymmBindingWithDKEncrBeforeSig() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-4-dk-ebs.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//            list.add(new QName(ConversationConstants.WSC_NS_05_02, ConversationConstants.DERIVED_KEY_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
> +//
> +//    public void testAsymmBindingEncrBeforeSig() {
> +//        try {
> +//            MessageContext ctx = getMsgCtx();
> +//
> +//            String policyXml = "test-resources/policy/rampart-asymm-binding-5-ebs.xml";
> +//            Policy policy = this.loadPolicy(policyXml);
> +//
> +//            ctx.setProperty(RampartMessageData.KEY_RAMPART_POLICY, policy);
> +//
> +//            MessageBuilder builder = new MessageBuilder();
> +//            builder.build(ctx);
> +//
> +//            ArrayList list = new ArrayList();
> +//
> +//            list.add(new QName(WSConstants.WSU_NS, WSConstants.TIMESTAMP_TOKEN_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.ENC_KEY_LN));
> +//            list.add(new QName(WSConstants.SIG_NS, WSConstants.SIG_LN));
> +//            list.add(new QName(WSConstants.ENC_NS, WSConstants.REF_LIST_LN));
> +//
> +//            this.verifySecHeader(list.iterator(), ctx.getEnvelope());
> +//        } catch (Exception e) {
> +//            e.printStackTrace();
> +//            fail(e.getMessage());
> +//        }
> +//    }
> +//
>      public void testAsymmBindingTripleDesRSA15() {
>          try {
>              MessageContext ctx = getMsgCtx();
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-cvs-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-cvs-help@ws.apache.org
>
>


-- 
Davanum Srinivas : http://www.wso2.net (Oxygen for Web Service Developers)

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


Mime
View raw message