ber_len_t i, noctets;
unsigned char netlen[sizeof(ber_len_t)];
- assert( ber != NULL );
assert( len != NULL );
- assert( LBER_VALID( ber ) );
/*
* Any ber element looks like this: tag length contents.
{
unsigned char buf[sizeof(ber_int_t)];
- assert( ber != NULL );
assert( num != NULL );
- assert( LBER_VALID( ber ) );
/*
* The tag and length have already been stripped off. We should
ber_tag_t tag;
ber_len_t len;
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) {
return LBER_DEFAULT;
}
ber_len_t datalen;
ber_tag_t tag;
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) {
return LBER_DEFAULT;
}
{
ber_tag_t tag;
- assert( ber != NULL );
assert( bv != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &bv->bv_len )) == LBER_DEFAULT ) {
bv->bv_val = NULL;
return LBER_DEFAULT;
{
ber_tag_t tag;
- assert( ber != NULL );
assert( bv != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &bv->bv_len )) == LBER_DEFAULT ) {
bv->bv_val = NULL;
return LBER_DEFAULT;
ber_tag_t tag;
unsigned char unusedbits;
- assert( ber != NULL );
assert( buf != NULL );
assert( blen != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &datalen )) == LBER_DEFAULT ) {
*buf = NULL;
return LBER_DEFAULT;
ber_len_t len;
ber_tag_t tag;
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( (tag = ber_skip_tag( ber, &len )) == LBER_DEFAULT ) {
return LBER_DEFAULT;
}
ber_int_t longbool;
ber_tag_t rc;
- assert( ber != NULL );
assert( boolval != NULL );
- assert( LBER_VALID( ber ) );
-
rc = ber_get_int( ber, &longbool );
*boolval = longbool;
ber_len_t *len,
char **last )
{
- assert( ber != NULL );
- assert( len != NULL );
assert( last != NULL );
/* skip the sequence header, use the len to mark where to stop */
assert( ber != NULL );
assert( len != NULL );
assert( last != NULL );
-
assert( LBER_VALID( ber ) );
if ( ber->ber_ptr >= last ) {
assert( ber != NULL );
assert( fmt != NULL );
-
assert( LBER_VALID( ber ) );
fmt_reset = fmt;
}
va_end( ap );
+
if ( rc == LBER_DEFAULT ) {
/*
* Error. Reclaim malloced memory that was given to the caller.
ber_uint_t unum, mask;
unsigned char netnum[sizeof(ber_uint_t)];
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
sign = (num < 0);
unum = num; /* Bit fiddling should be done with unsigned values */
ber_int_t num,
ber_tag_t tag )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_ENUMERATED;
}
ber_int_t num,
ber_tag_t tag )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_INTEGER;
}
{
int taglen, lenlen, rc;
- assert( ber != NULL );
- assert( str != NULL );
-
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_OCTETSTRING;
}
struct berval *bv,
ber_tag_t tag )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if( bv == NULL || bv->bv_len == 0 ) {
return ber_put_ostring( ber, "", (ber_len_t) 0, tag );
}
LDAP_CONST char *str,
ber_tag_t tag )
{
- assert( ber != NULL );
assert( str != NULL );
- assert( LBER_VALID( ber ) );
-
return ber_put_ostring( ber, str, strlen( str ), tag );
}
ber_len_t len;
unsigned char unusedbits;
- assert( ber != NULL );
- assert( str != NULL );
-
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_BITSTRING;
}
{
int taglen;
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_NULL;
}
int taglen;
unsigned char c;
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT )
tag = LBER_BOOLEAN;
int
ber_start_seq( BerElement *ber, ber_tag_t tag )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_SEQUENCE;
}
int
ber_start_set( BerElement *ber, ber_tag_t tag )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
if ( tag == LBER_DEFAULT ) {
tag = LBER_SET;
}
int
ber_put_seq( BerElement *ber )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
return ber_put_seqorset( ber );
}
int
ber_put_set( BerElement *ber )
{
- assert( ber != NULL );
- assert( LBER_VALID( ber ) );
-
return ber_put_seqorset( ber );
}
assert( ber != NULL );
assert( fmt != NULL );
-
assert( LBER_VALID( ber ) );
va_start( ap, fmt );