PORT_Assert (buf != NULL && len != 0);
SEC_ASN1EncoderUpdate (SEC_ASN1EncoderContext *cx,		       const char *buf, unsigned long len){    sec_asn1e_state *state;    if (cx->status == needBytes) {	PORT_Assert (buf != NULL && len != 0);	cx->status = keepGoing;    }    while (cx->status == keepGoing) {	state = cx->current;	switch (state->place) {	  case beforeHeader:	    sec_asn1e_write_header (state);	    break;	  case duringContents:	    if (cx->from_buf)		sec_asn1e_write_contents_from_buf (state, buf, len);	    else		sec_asn1e_write_contents (state);	    break;	  case duringGroup:	    sec_asn1e_next_in_group (state);	    break;	  case duringSequence:	    sec_asn1e_next_in_sequence (state);	    break;	  case afterContents:	    sec_asn1e_after_contents (state);	    break;	  case afterImplicit:	  case afterInline:	  case afterPointer:	  case afterChoice:	    /*	     * These states are more documentation than anything.	     * They just need to force a pop.	     */	    PORT_Assert (!state->indefinite);	    state->place = afterContents;	    break;	  case notInUse:	  default:	    /* This is not an error, but rather a plain old BUG! */	    PORT_Assert (0);	    cx->status = encodeError;	    break;	}	if (cx->status == encodeError)	    break;	/* It might have changed, so we have to update our local copy.  */	state = cx->current;	/* If it is NULL, we have popped all the way to the top.  */	if (state == NULL) {	    cx->status = allDone;	    break;	}    }    if (cx->status == encodeError) {	return SECFailure;    }    return SECSuccess;}