der[j] = tmp;
}
der += len;
+
if ( ptr == inend )
break;
rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
/* length(tag + length + contents) */
- rc += (int) len;
+ return rc + (int) len;
}
- return rc;
+ return -1;
}
int
rc = ber_write( ber, (char *) ptr, &header[sizeof(header)] - ptr, 0 );
if ( rc >= 0 && ber_write( ber, str, len, 0 ) >= 0 ) {
/* length(tag + length + unused bit count + bitstring) */
- rc += (int) len;
+ return rc + (int) len;
}
- return rc;
+ return -1;
}
int