5789N/A<?xml version="1.0" encoding="UTF-8" standalone="no"?>
5789N/A<!DOCTYPE stax SYSTEM "/shared/stax.dtd">
5789N/A<!--
5789N/A ! CDDL HEADER START
5789N/A !
5789N/A ! The contents of this file are subject to the terms of the
5789N/A ! Common Development and Distribution License, Version 1.0 only
5789N/A ! (the "License"). You may not use this file except in compliance
5789N/A ! with the License.
5789N/A !
5789N/A ! You can obtain a copy of the license at
5789N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE
5789N/A ! or https://OpenDS.dev.java.net/OpenDS.LICENSE.
5789N/A ! See the License for the specific language governing permissions
5789N/A ! and limitations under the License.
5789N/A !
5789N/A ! When distributing Covered Code, include this CDDL HEADER in each
5789N/A ! file and include the License file at
5789N/A ! trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable,
5789N/A ! add the following below this CDDL HEADER, with the fields enclosed
5789N/A ! by brackets "[]" replaced with your own identifying information:
5789N/A ! Portions Copyright [yyyy] [name of copyright owner]
5789N/A !
5789N/A ! CDDL HEADER END
5789N/A !
5789N/A ! Copyright 2010 Sun Microsystems, Inc.
5789N/A ! -->
5789N/A<stax>
5789N/A
5789N/A <defaultcall function="clus_starttls_ldapcompare"/>
5789N/A
5789N/A <function name="clus_starttls_ldapcompare" scope="local">
5789N/A
5789N/A <sequence>
5789N/A
5789N/A <block name="'clus_starttls_ldapcompare'">
5789N/A
5789N/A <sequence>
5789N/A
5789N/A <!--- Test Suite information
5789N/A #@TestSuiteName StartTLS ldapcompare check behaviors
5789N/A #@TestSuitePurpose Test the results of StartTLS ldapcompare command.
5789N/A #@TestSuiteGroup ldapcompare check behavior tests
5789N/A #@TestScript clus_startTLS_ldapcompare.xml
5789N/A -->
5789N/A <script>
5789N/A if not CurrentTestPath.has_key('group'):
5789N/A CurrentTestPath['group'] = 'clu_secure'
5789N/A CurrentTestPath['suite'] = STAXCurrentBlock
5789N/A </script>
5789N/A
5789N/A <call function="'testSuite_Preamble'"/>
5789N/A
5789N/A <!--- Test Case information
5789N/A #@TestMarker StartTLS ldapcompare check behavior tests
5789N/A #@TestName Client use blind trust : ldapcompare successful
5789N/A #@TestPurpose Verify that the operation is successful and
5789N/A that the comparison is successful when client
5789N/A trust all server certificates.
5789N/A #@TestPreamble none
5789N/A #@TestStep Do an ldapcompare with correct options.
5789N/A #@TestPostamble none
5881N/A #@TestResult Success if ldapcompare return true
5789N/A -->
5789N/A <testcase name="getTestCaseName ('Client use blind trust : ldapcompare successful')">
5789N/A
5789N/A <sequence>
5789N/A
5789N/A <call function="'testCase_Preamble'"/>
5789N/A
5789N/A <message>
5789N/A 'Security: StartTLS Check behaviors : ldapcompare, client trustall\
5789N/A server cert'
5789N/A </message>
5789N/A
5789N/A <script>
5789N/A dncompare = 'uid=user.310,ou=people,dc=com'
5789N/A </script>
5789N/A <call function="'ldapCompareWithScript'">
5789N/A {
5789N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5789N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5789N/A 'dsUseStartTLS' : ' ' ,
5789N/A 'dsTrustAll' : ' ' ,
5789N/A 'dsDn' : ['postalCode:6728' ,'%s' %dncompare],
5789N/A 'expectedRC' : 'noCheck'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <script>
5789N/A returnString = STAXResult[0][1]
5789N/A </script>
5789N/A <call function="'checktestString'">
5789N/A {
5789N/A 'returnString' : returnString ,
5789N/A 'expectedString' : 'Compare operation returned false'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <call function="'ldapCompareWithScript'">
5789N/A {
5789N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5789N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5789N/A 'dsUseStartTLS' : ' ' ,
5789N/A 'dsTrustAll' : ' ' ,
5789N/A 'dsDn' : ['postalCode:67258' ,'%s' %dncompare],
5789N/A 'expectedRC' : 'noCheck'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <script>
5789N/A returnString = STAXResult[0][1]
5789N/A </script>
5789N/A <call function="'checktestString'">
5789N/A {
5789N/A 'returnString' : returnString ,
5789N/A 'expectedString' : 'Compare operation returned true'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <call function="'testCase_Postamble'"/>
5789N/A
5789N/A </sequence>
5789N/A
5789N/A </testcase>
5789N/A
5789N/A <!--- Test Case information
5789N/A #@TestMarker StartTLS ldapcompare check behaviors
5789N/A #@TestName Client use TrustStore file :
5789N/A ldapcompare successful
5789N/A #@TestPurpose Verify that the operation is successful and
5789N/A that the comparison is successful when client
5789N/A uses TrustStore file.
5789N/A #@TestPreamble none
5789N/A #@TestStep Do an ldapcompare with correct options.
5789N/A #@TestPostamble none
5789N/A #@TestResult Success if ldapcompare return true
5789N/A -->
5789N/A <testcase name="getTestCaseName ('Client use TrustStore file : ldapcompare successful')">
5789N/A
5789N/A <sequence>
5789N/A
5789N/A <call function="'testCase_Preamble'"/>
5789N/A
5789N/A <message>
5789N/A 'Security:startTLS Check behaviors: ldapcompare, client trust \
5789N/A store file'
5789N/A </message>
5789N/A
5789N/A <script>
5789N/A dncompare2 = 'uid=user.311,ou=people,dc=com'
5789N/A </script>
5789N/A <call function="'ldapCompareWithScript'">
5789N/A {
5789N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5789N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5789N/A 'dsUseStartTLS' : ' ' ,
5789N/A 'dsTrustStorePath' : '%s/client_cert/clientruststore' \
5789N/A % InstanceInstallDir,
5789N/A 'dsTrustStorePassword': 'clientruststorepass',
5789N/A 'dsDn' : ['description: This is for Amber Arbuckle.',\
5789N/A '%s' %dncompare2] ,
5789N/A 'expectedRC' : 'noCheck'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <script>
5789N/A returnString = STAXResult[0][1]
5789N/A </script>
5789N/A <call function="'checktestString'">
5789N/A {
5789N/A 'returnString' : returnString ,
5789N/A 'expectedString' : 'Compare operation returned false'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <call function="'ldapCompareWithScript'">
5789N/A {
5789N/A 'dsInstanceHost' : DIRECTORY_INSTANCE_HOST ,
5789N/A 'dsInstancePort' : DIRECTORY_INSTANCE_PORT ,
5789N/A 'dsUseStartTLS' : ' ' ,
5789N/A 'dsTrustStorePath': '%s/client_cert/clientruststore' \
5789N/A % InstanceInstallDir,
5789N/A 'dsTrustStorePassword': 'clientruststorepass',
5789N/A 'dsDn' : ['description: This is the description for \
5789N/A Amber Arbuckle.' ,'%s' %dncompare2] ,
5789N/A 'expectedRC' : 'noCheck'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <script>
5789N/A returnString = STAXResult[0][1]
5789N/A </script>
5789N/A <call function="'checktestString'">
5789N/A {
5789N/A 'returnString' : returnString ,
5789N/A 'expectedString' : 'Compare operation returned true'
5789N/A }
5789N/A </call>
5789N/A
5789N/A <call function="'testCase_Postamble'"/>
5789N/A
5789N/A </sequence>
5789N/A
5789N/A </testcase>
5789N/A
5789N/A <call function="'testSuite_Postamble'"/>
5789N/A
5789N/A </sequence>
5789N/A
5789N/A </block>
5789N/A
5789N/A </sequence>
5789N/A
5789N/A </function>
5789N/A
5789N/A</stax>
5789N/A
5789N/A
5789N/A