#define objectIdentifierNormalize NULL
#define objectIdentifierFirstComponentNormalize NULL
#define generalizedTimeNormalize NULL
-#define uniqueMemberNormalize NULL
#define bitStringNormalize NULL
#define telephoneNumberNormalize NULL
#define distinguishedNameIndexer octetStringIndexer
#define distinguishedNameFilter octetStringFilter
-#define uniqueMemberMatch dnMatch
+#define uniqueMemberMatch dnMatch
#define objectIdentifierMatch octetStringMatch
#define objectIdentifierIndexer octetStringIndexer
#define caseIgnoreIndexer octetStringIndexer
#define caseIgnoreFilter octetStringFilter
-#define caseIgnoreSubstringsMatch SubstringsMatch
+#define caseIgnoreSubstringsMatch octetStringSubstringsMatch
#define caseIgnoreSubstringsIndexer NULL
#define caseIgnoreSubstringsFilter NULL
#define caseExactIndexer octetStringIndexer
#define caseExactFilter octetStringFilter
-#define caseExactSubstringsMatch NULL
+#define caseExactSubstringsMatch octetStringSubstringsMatch
#define caseExactSubstringsIndexer NULL
#define caseExactSubstringsFilter NULL
#define caseExactIA5Indexer octetStringIndexer
#define caseExactIA5Filter octetStringFilter
-#define caseExactIA5SubstringsMatch NULL
+#define caseExactIA5SubstringsMatch octetStringSubstringsMatch
#define caseExactIA5SubstringsIndexer NULL
#define caseExactIA5SubstringsFilter NULL
#define objectIdentifierIndexer caseIgnoreIA5Indexer
#define objectIdentifierFilter caseIgnoreIA5Filter
-#define OpenLDAPaciMatch NULL
+#define octetStringSubstringsMatch NULL
+#define OpenLDAPaciMatch NULL
#define generalizedTimeMatch caseIgnoreIA5Match
#define generalizedTimeOrderingMatch caseIgnoreIA5Match
return rc;
}
-#ifndef SLAP_NVALUES
-
+#ifdef SLAP_NVALUES
+static int
+uniqueMemberNormalize(
+ slap_mask_t usage,
+ Syntax *syntax,
+ MatchingRule *mr,
+ struct berval *val,
+ struct berval *normalized )
+#else
static int
xnameUIDNormalize(
Syntax *syntax,
struct berval *val,
struct berval *normalized )
+#endif
{
struct berval out;
int rc;
return LDAP_SUCCESS;
}
-#endif
/*
* Handling boolean syntax and matching is quite rigid.
* A more flexible approach would be to allow a variety
caseExactIA5SubstringsMatch
#else
static int
-SubstringsMatch
+octetStringSubstringsMatch
#endif
(
int *matchp,
goto done;
}
- match = strncmp( sub->sa_initial.bv_val, left.bv_val,
+ match = memcmp( sub->sa_initial.bv_val, left.bv_val,
sub->sa_initial.bv_len );
if( match != 0 ) {
goto done;
}
- match = strncmp( sub->sa_final.bv_val,
+ match = memcmp( sub->sa_final.bv_val,
&left.bv_val[left.bv_len - sub->sa_final.bv_len],
sub->sa_final.bv_len );
continue;
}
- p = strchr( left.bv_val, *sub->sa_any[i].bv_val );
+ p = memchr( left.bv_val, *sub->sa_any[i].bv_val, left.bv_len );
if( p == NULL ) {
match = 1;
goto done;
}
- match = strncmp( left.bv_val,
+ match = memcmp( left.bv_val,
sub->sa_any[i].bv_val,
sub->sa_any[i].bv_len );
* Other matching rules in X.520 that we do not use (yet):
*
* 2.5.13.9 numericStringOrderingMatch
- * 2.5.13.19 octetStringSubstringsMatch
* 2.5.13.25 uTCTimeMatch
* 2.5.13.26 uTCTimeOrderingMatch
* 2.5.13.31 directoryStringFirstComponentMatch
octetStringOrderingMatch, NULL, NULL,
NULL},
+ {"( 2.5.13.19 NAME 'octetStringSubstringsMatch' "
+ "SYNTAX 1.3.6.1.4.1.1466.115.121.1.40 )",
+ SLAP_MR_SUBSTR, NULL,
+ NULL, NULL,
+ octetStringSubstringsMatch, NULL, NULL,
+ NULL},
+
{"( 2.5.13.20 NAME 'telephoneNumberMatch' "
"SYNTAX 1.3.6.1.4.1.1466.115.121.1.50 )",
SLAP_MR_EQUALITY | SLAP_MR_EXT | SLAP_MR_DN_FOLD, NULL,