TrustVerifier.Context falseTvc = new FalseTrustVerifierContext();
TrustVerifier.Context trueTvc = new TrueTrustVerifierContext();
TrustVerifier.Context prinTvc = new PrincipalTrustVerifierContext();
TrustVerifier.Context conTvc = new ConstraintTrustVerifierContext();
TrustVerifier.Context icTvc = new ICTrustVerifierContext();
TestPrincipal tp1 = new TestPrincipal("true TP", true);
TestPrincipal tp2 = new TestPrincipal("true TP1", true);
TestPrincipal tp3 = new TestPrincipal("false TP", false);
BasicMethodConstraints.MethodDesc md1 =
new BasicMethodConstraints.MethodDesc("Foo",
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES,
Delegation.YES }, null));
BasicMethodConstraints.MethodDesc md2 =
new BasicMethodConstraints.MethodDesc("Foo1",
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES,
Integrity.YES }, null));
BasicMethodConstraints.MethodDesc md3 =
new BasicMethodConstraints.MethodDesc("Foo2",
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES,
Confidentiality.YES,
Delegation.YES }, null));
Object[] testObjs = new Object[] {
ClientAuthentication.YES,
Confidentiality.YES,
Delegation.YES,
Integrity.YES,
ServerAuthentication.YES,
ClientAuthentication.NO,
Confidentiality.NO,
Delegation.NO,
Integrity.NO,
ServerAuthentication.NO,
new ClientMaxPrincipalType(TestPrincipal.class),
new ClientMinPrincipalType(TestPrincipal.class),
new DelegationRelativeTime(1000, 2000, 3000, 4000),
new DelegationAbsoluteTime(1000, 2000, 3000, 4000),
new ClientMinPrincipal(new Principal[] { tp1, tp2 }),
new ClientMaxPrincipal(new Principal[] { tp1, tp2 }),
new ServerMinPrincipal(new Principal[] { tp1, tp2 }),
new ClientMinPrincipal(new Principal[] { tp1, tp3, tp2 }),
new ClientMaxPrincipal(new Principal[] { tp1, tp3, tp2 }),
new ServerMinPrincipal(new Principal[] { tp1, tp3, tp2 }),
new ConstraintAlternatives(new InvocationConstraint[] {
Delegation.YES,
Integrity.YES,
ClientAuthentication.YES }),
new ConstraintAlternatives(new InvocationConstraint[] {
Delegation.YES,
Confidentiality.YES,
ClientAuthentication.YES }),
new BasicMethodConstraints(
new BasicMethodConstraints.MethodDesc[] { md1, md2 }),
new BasicMethodConstraints(
new BasicMethodConstraints.MethodDesc[] { md1, md3, md2 }),
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES, Delegation.YES },
new InvocationConstraint[] {
Integrity.YES, ServerAuthentication.YES }),
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES, Delegation.YES },
new InvocationConstraint[] {
Integrity.YES, Confidentiality.YES,
ServerAuthentication.YES }),
new InvocationConstraints(
new InvocationConstraint[] {
ClientAuthentication.YES, Confidentiality.YES,
Delegation.YES },
new InvocationConstraint[] {
Integrity.YES, ServerAuthentication.YES }),
new X500Principal("CN=Test, OU=JINI, O=Sun Microsystems, C=US"),
new KerberosPrincipal("Test@test.com"),
new TestPrincipal("TEST", true),
new TestConstraint()
};
TrustVerifier.Context[] testCtxs = new TrustVerifier.Context[] {
falseTvc, falseTvc, falseTvc, falseTvc, falseTvc, falseTvc,
falseTvc, falseTvc, falseTvc, falseTvc, falseTvc, falseTvc,