static void block_out(BIO* b)
	{
	BIO_OK_CTX *ctx;
	EVP_MD_CTX *md;
	unsigned long tl;

	ctx=(BIO_OK_CTX *)b->ptr;
	md= &(ctx->md);

	tl= ctx->buf_len- OK_BLOCK_BLOCK;
	tl= swapem(tl);
	memcpy(ctx->buf, &tl, OK_BLOCK_BLOCK);
	tl= swapem(tl);
	EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl);
	md->digest->final(&(ctx->buf[ctx->buf_len]), &(md->md.base[0]));
	ctx->buf_len+= md->digest->md_size;
	ctx->blockout= 1;
	}