306N/A * The contents of this file are subject to the terms of the 306N/A * Common Development and Distribution License, Version 1.0 only 306N/A * (the "License"). You may not use this file except in compliance 306N/A * See the License for the specific language governing permissions 306N/A * and limitations under the License. 306N/A * When distributing Covered Code, include this CDDL HEADER in each 6982N/A * If applicable, add the following below this CDDL HEADER, with the 6982N/A * fields enclosed by brackets "[]" replaced with your own identifying 306N/A * Portions Copyright [yyyy] [name of copyright owner] 4495N/A * Copyright 2006-2009 Sun Microsystems, Inc. 6442N/A * Portions copyright 2012-2013 ForgeRock AS. 1031N/A * Once-only initialization. 1031N/A * If an unexpected error occurred. 1031N/A // This test suite depends on having the schema available, so we'll 1031N/A * Creates two handlers, one which is SSL type. Then change some values via the setter 1031N/A * @throws Exception if the handler cannot be instantiated. 1031N/A "dn: cn=LDAP Connection Handler,cn=Connection Handlers,cn=config",
1031N/A "objectClass: ds-cfg-connection-handler",
1031N/A "objectClass: ds-cfg-ldap-connection-handler",
1031N/A "cn: LDAP Connection Handler",
2624N/A "ds-cfg-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
1031N/A "ds-cfg-listen-address: 0.0.0.0",
1031N/A "ds-cfg-accept-backlog: 128",
2624N/A "ds-cfg-allow-ldap-v2: false",
1031N/A "ds-cfg-keep-stats: false",
2624N/A "ds-cfg-use-tcp-keep-alive: true",
2624N/A "ds-cfg-use-tcp-no-delay: true",
1031N/A "ds-cfg-allow-tcp-reuse-address: true",
1031N/A "ds-cfg-send-rejection-notice: true",
1031N/A "ds-cfg-max-request-size: 5 megabytes",
1031N/A "ds-cfg-num-request-handlers: 2",
1031N/A "ds-cfg-allow-start-tls: false",
1031N/A "ds-cfg-ssl-client-auth-policy: optional",
1031N/A "ds-cfg-ssl-cert-nickname: server-cert",
2624N/A "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config",
2624N/A "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
1031N/A //Reset some things for the SSL handler 1031N/A * Start a handler an then give its hasAcceptableConfiguration a ConfigEntry with 1031N/A * numerous invalid cases and single-valued attrs with duplicate values. 1031N/A * @throws Exception if handler cannot be instantiated or the configuration is 1031N/A "dn: cn=LDAP Connection Handler,cn=Connection Handlers,cn=config",
1031N/A "objectClass: ds-cfg-connection-handler",
1031N/A "objectClass: ds-cfg-ldap-connection-handler",
1031N/A "cn: LDAP Connection Handler",
2624N/A "ds-cfg-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
1031N/A "ds-cfg-listen-address: 0.0.0.0",
1031N/A "ds-cfg-accept-backlog: 128",
2624N/A "ds-cfg-allow-ldap-v2: false",
1031N/A "ds-cfg-keep-stats: false",
2624N/A "ds-cfg-use-tcp-keep-alive: true",
2624N/A "ds-cfg-use-tcp-no-delay: true",
1031N/A "ds-cfg-allow-tcp-reuse-address: true",
1031N/A "ds-cfg-send-rejection-notice: true",
1031N/A "ds-cfg-max-request-size: 5 megabytes",
1031N/A "ds-cfg-num-request-handlers: 2",
1031N/A "ds-cfg-allow-start-tls: false",
1031N/A "ds-cfg-ssl-client-auth-policy: optional",
1031N/A "ds-cfg-ssl-cert-nickname: server-cert",
2624N/A "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config",
2624N/A "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
1031N/A // Add some invalid attrs and some duplicate attrs 1031N/A * Create handler and then change most of its values and see if 1031N/A * it is acceptable and applied. 1031N/A * @throws Exception if handler cannot be instantiated. 1031N/A "dn: cn=LDAP Connection Handler,cn=Connection Handlers,cn=config",
1031N/A "objectClass: ds-cfg-connection-handler",
1031N/A "objectClass: ds-cfg-ldap-connection-handler",
1031N/A "cn: LDAP Connection Handler",
2624N/A "ds-cfg-java-class: org.opends.server.protocols.ldap.LDAPConnectionHandler",
1031N/A "ds-cfg-listen-address: 0.0.0.0",
1031N/A "ds-cfg-accept-backlog: 128",
2624N/A "ds-cfg-allow-ldap-v2: false",
1031N/A "ds-cfg-keep-stats: false",
2624N/A "ds-cfg-use-tcp-keep-alive: true",
2624N/A "ds-cfg-use-tcp-no-delay: true",
1031N/A "ds-cfg-allow-tcp-reuse-address: true",
1031N/A "ds-cfg-send-rejection-notice: true",
1031N/A "ds-cfg-max-request-size: 5 megabytes",
1031N/A "ds-cfg-num-request-handlers: 2",
1031N/A "ds-cfg-allow-start-tls: false",
1031N/A "ds-cfg-ssl-client-auth-policy: optional",
1031N/A "ds-cfg-ssl-cert-nickname: server-cert",
2624N/A "ds-cfg-key-manager-provider: cn=JKS,cn=Key Manager Providers,cn=config",
2624N/A "ds-cfg-trust-manager-provider: cn=JKS,cn=Trust Manager Providers,cn=config");
1031N/A// AttributeType at1=DirectoryServer.getAttributeType(ATTR_LISTEN_ADDRESS, true); 1031N/A// Attribute rAttr1=new Attribute(at1); 1031N/A// GoodHandlerEntry.removeAttribute(rAttr1, null); 1031N/A //Make new AttrTypes with different values 1031N/A //uncomment if want to test listen address 1031N/A// Attribute a3=new Attribute(ATTR_LISTEN_ADDRESS, "localhost"); 1031N/A// GoodHandlerEntry.addAttribute(a3, null);