match, value->bv_val, asserted->bv_val );
#endif
-
if( rc == LDAP_SUCCESS ) *matchp = match;
return rc;
}
/* safe to assume integers are NUL terminated? */
lValue = strtoul(value->bv_val, NULL, 10);
- if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE )
+ if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE ) {
return LDAP_CONSTRAINT_VIOLATION;
+ }
lAssertedValue = strtol(((struct berval *)assertedValue)->bv_val, NULL, 10);
- if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
+ if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX)
+ && errno == ERANGE )
+ {
return LDAP_CONSTRAINT_VIOLATION;
+ }
*matchp = (lValue & lAssertedValue) ? 0 : 1;
return LDAP_SUCCESS;
/* safe to assume integers are NUL terminated? */
lValue = strtoul(value->bv_val, NULL, 10);
- if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE )
+ if(( lValue == LONG_MIN || lValue == LONG_MAX) && errno == ERANGE ) {
return LDAP_CONSTRAINT_VIOLATION;
+ }
lAssertedValue = strtol(((struct berval *)assertedValue)->bv_val, NULL, 10);
- if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX) && errno == ERANGE )
+ if(( lAssertedValue == LONG_MIN || lAssertedValue == LONG_MAX)
+ && errno == ERANGE )
+ {
return LDAP_CONSTRAINT_VIOLATION;
+ }
*matchp = (lValue | lAssertedValue) ? 0 : -1;
return LDAP_SUCCESS;
return NULL;
}
*--p = digit[carry];
- if (copy[base] == 0)
- base++;
+
+ if (copy[base] == 0) base++;
}
free(copy);
}
X509_free(xcert);
return LDAP_INVALID_SYNTAX;
}
- if ( dnX509normalize(X509_get_issuer_name(xcert), &issuer_dn ) != LDAP_SUCCESS ) {
+ if ( dnX509normalize(X509_get_issuer_name(xcert), &issuer_dn )
+ != LDAP_SUCCESS )
+ {
X509_free(xcert);
ber_memfree(serial.bv_val);
return LDAP_INVALID_SYNTAX;
begin = assertion->bv_val;
end = assertion->bv_val+assertion->bv_len-1;
- for (p=begin; p<=end && *p != '$'; p++)
- ;
- if ( p > end )
- return LDAP_INVALID_SYNTAX;
+ for (p=begin; p<=end && *p != '$'; p++) /* empty */ ;
+ if ( p > end ) return LDAP_INVALID_SYNTAX;
/* p now points at the $ sign, now use begin and end to delimit the
serial number */
- while (ASCII_SPACE(*begin))
- begin++;
+ while (ASCII_SPACE(*begin)) begin++;
end = p-1;
- while (ASCII_SPACE(*end))
- end--;
+ while (ASCII_SPACE(*end)) end--;
bv.bv_len = end-begin+1;
bv.bv_val = begin;
if ( issuer_dn ) {
begin = p+1;
end = assertion->bv_val+assertion->bv_len-1;
- while (ASCII_SPACE(*begin))
- begin++;
+ while (ASCII_SPACE(*begin)) begin++;
/* should we trim spaces at the end too? is it safe always? */
bv.bv_len = end-begin+1;
X509_free(xcert);
serial_and_issuer_parse(assertedValue,
- &asserted_serial,
- &asserted_issuer_dn);
+ &asserted_serial, &asserted_issuer_dn);
ret = integerMatch(
matchp,
asn1_integer2str(xcert->cert_info->serialNumber, &serial);
X509_free(xcert);
integerNormalize( slap_schema.si_syn_integer,
- &serial,
- &keys[i] );
+ &serial, &keys[i] );
ber_memfree(serial.bv_val);
#ifdef NEW_LOGGING
LDAP_LOG( CONFIG, ENTRY,
struct berval asserted_serial;
serial_and_issuer_parse(assertedValue,
- &asserted_serial,
- NULL);
+ &asserted_serial, NULL);
keys = ch_malloc( sizeof( struct berval ) * 2 );
integerNormalize( syntax, &asserted_serial, &keys[0] );