]> git.sur5r.net Git - openldap/blobdiff - tests/scripts/test031-component-filter
regression for ITS#3506
[openldap] / tests / scripts / test031-component-filter
index 5698e02cd2ee42f182bb2bc97a7bebb130352730..f4e0a97f09470b0d0e49cbf98db9107c68696352 100755 (executable)
@@ -2,7 +2,7 @@
 # $OpenLDAP$
 ## This work is part of OpenLDAP Software <http://www.openldap.org/>.
 ##
-## Copyright 1998-2004 The OpenLDAP Foundation.
+## Copyright 1998-2005 The OpenLDAP Foundation.
 ## All rights reserved.
 ##
 ## Redistribution and use in source and binary forms, with or without
@@ -252,7 +252,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-FILTER="(x509CertificateIssuer:distinguishedNameMatch:=c=US)"
+FILTER="(x509CertificateIssuer=c=US)"
 echo "        f=$FILTER ..."
 echo "#         f=$FILTER ..." >> $SEARCHOUT
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -265,7 +265,7 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
-FILTER="(x509CertificateSerial:integerMatch:=0)"
+FILTER="(x509CertificateSerial=0)"
 echo "        f=$FILTER ..."
 echo "#         f=$FILTER ..." >> $SEARCHOUT
 $LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
@@ -291,6 +291,20 @@ if test $RC != 0 ; then
        exit $RC
 fi
 
+FILTER="(certificateRevocationList:componentFilterMatch:=item:{ component \"tbsCertList.revokedCertificates.\2a.userCertificate\", rule integerMatch, value 952069669 })"
+echo "        f=$FILTER ..."
+echo "#         f=$FILTER ..." >> $SEARCHOUT
+$LDAPSEARCH -S "" -b "$BASEDN" -h $LOCALHOST -p $PORT1 \
+       "$FILTER" >> $SEARCHOUT 2>&1
+
+RC=$?
+if test $RC != 0 ; then
+       echo "ldapsearch failed ($RC)!"
+       test $KILLSERVERS != no && kill -HUP $KILLPIDS
+       exit $RC
+fi
+
+
 test $KILLSERVERS != no && kill -HUP $KILLPIDS
 
 echo "Filtering ldapsearch results..."