security_setup_startTLS.xml revision d25372dc8e65a9ed019a88fdf659ca61313f1b31
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
<!--
! CDDL HEADER START
!
! The contents of this file are subject to the terms of the
! Common Development and Distribution License, Version 1.0 only
! (the "License"). You may not use this file except in compliance
! with the License.
!
! You can obtain a copy of the license at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE
! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! When distributing Covered Code, include this CDDL HEADER in each
! file and include the License file at
! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
! add the following below this CDDL HEADER, with the fields enclosed
! by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CDDL HEADER END
!
! Copyright 2006-2008 Sun Microsystems, Inc.
! -->
<stax>
<defaultcall function="setup_startTLS"/>
<function name="setup_startTLS">
<sequence>
<!--- Test Case : startTLS Setup -->
<!--- Generate Server Cert -->
<testcase name="getTestCaseName('Preamble Setup')">
<sequence>
<call function="'testCase_Preamble'"/>
<message>
'Security: TLS: Preamble Step 1. Generating Server Certicate'
</message>
<call function="'genCertificate'">
{ 'certAlias' : 'server-cert' ,
'dname' : "cn=client,O=Sun Microsystems,C=US",
'keystore' : 'keystore',
'storepass' : 'servercert',
'keypass' : 'servercert',
'storetype' : 'JKS' }
</call>
<!--- Self-Sign Server Cert -->
<message>
'Security: TLS: Preamble Step 2. Self-Signing Server Certicate'
</message>
<call function="'SelfSignCertificate'">
{ 'certAlias' : 'server-cert' ,
'storepass' : 'servercert',
'keypass' : 'servercert',
'keystore' : 'keystore',
'storetype' : 'JKS' }
</call>
<!--- Configure JKS Keystore -->
<message>
'Security: TLS: Preamble Step 3. Configuring JKS Keystore'
</message>
<call function="'configureTLS'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD }
</call>
<!--- Initial Search With StartTLS -->
<message>
'Security: TLS: Preamble Step 4. Searching with StartTLS Connection'
</message>
<call function="'SearchObject'">
{ 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
'dsInstanceDn' : DIRECTORY_INSTANCE_DN ,
'dsInstancePswd' : DIRECTORY_INSTANCE_PSWD ,
'dsBaseDN' : 'dc=example,dc=com' ,
'dsFilter' : 'objectclass=*' ,
'extraParams' : '-q -X -s base' }
</call>
<call function="'testCase_Postamble'"/>
</sequence>
</testcase>
</sequence>
</function>
</stax>