X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=tests%2Fscripts%2Ftest031-component-filter;h=7bf799570bfefe87ca66db23107cb24b32d0bbbc;hb=a2405e0a7e31a128774b3e4077c1199d3a3cdf5e;hp=cda58d406a478d1124bb90362f6b00423f783e4c;hpb=bc729ea9ba68d31b85e598a822c3b65b9136f648;p=openldap diff --git a/tests/scripts/test031-component-filter b/tests/scripts/test031-component-filter index cda58d406a..7bf799570b 100755 --- a/tests/scripts/test031-component-filter +++ b/tests/scripts/test031-component-filter @@ -2,7 +2,7 @@ # $OpenLDAP$ ## This work is part of OpenLDAP Software . ## -## Copyright 1998-2005 The OpenLDAP Foundation. +## Copyright 1998-2007 The OpenLDAP Foundation. ## All rights reserved. ## ## Redistribution and use in source and binary forms, with or without @@ -18,7 +18,7 @@ echo "running defines.sh" ## If you use this script then ## Make sure that you turn on LDAP_COMP_MATCH in slapd source codes -## and --enable-modules is configured yes +## and --enable-modules is configured yes if test "$AC_WITH_MODULES_ENABLED" != "yes" ; then echo "dynamic module disabled, test skipped" exit 0 @@ -60,6 +60,8 @@ if test $WAIT != 0 ; then fi KILLPIDS="$PID" +sleep 1 + echo "Testing slapd searching..." for i in 0 1 2 3 4 5; do $LDAPSEARCH -s base -b "$MONITOR" -h $LOCALHOST -p $PORT1 \ @@ -161,7 +163,7 @@ if test $RC != 0 ; then exit $RC fi -FILTER="(userCertificate:componentFilterMatch:=item:{component \"toBeSigned.extensions.\2a.extnID\",rule allComponentsMatch, value 2.5.29.14 })" +FILTER="(userCertificate:componentFilterMatch:=item:{ component \"toBeSigned.extensions.\2a.extnID\", rule allComponentsMatch, value 2.5.29.14 })" echo " f=$FILTER ..." echo "# f=$FILTER ..." >> $SEARCHOUT $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ @@ -174,7 +176,7 @@ if test $RC != 0 ; then exit $RC fi -FILTER="(userCertificate:componentFilterMatch:=not:item:{component \"toBeSigned.extensions.\2a\",rule allComponentsMatch, value { extnID 2.5.29.19 , extnValue '30030101FF'H })" +FILTER="(userCertificate:componentFilterMatch:=not:item:{ component \"toBeSigned.extensions.\2a\", rule allComponentsMatch, value { extnID 2.5.29.19 , extnValue '30030101FF'H })" echo " f=$FILTER ..." echo "# f=$FILTER ..." >> $SEARCHOUT $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \ @@ -253,6 +255,7 @@ if test $RC != 0 ; then exit $RC fi +# extraction filter FILTER="(x509CertificateIssuer=c=US)" echo " f=$FILTER ..." echo "# f=$FILTER ..." >> $SEARCHOUT @@ -266,6 +269,7 @@ if test $RC != 0 ; then exit $RC fi +# extraction filter FILTER="(x509CertificateSerial=0)" echo " f=$FILTER ..." echo "# f=$FILTER ..." >> $SEARCHOUT @@ -279,6 +283,7 @@ if test $RC != 0 ; then exit $RC fi +# extraction filter FILTER="(x509CertificateSerialAndIssuer:certificateExactMatch:=0\$c=US)" echo " f=$FILTER ..." echo "# f=$FILTER ..." >> $SEARCHOUT @@ -319,4 +324,7 @@ if test $? != 0 ; then fi echo ">>>>> Test succeeded" + +test $KILLSERVERS != no && wait + exit 0