static void block_in(BIO* b)
	{
	BIO_OK_CTX *ctx;
	EVP_MD_CTX *md;
	long tl= 0;
	unsigned char tmp[EVP_MAX_MD_SIZE];

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

	memcpy(&tl, ctx->buf, OK_BLOCK_BLOCK);
	tl= swapem(tl);
	if (ctx->buf_len < tl+ OK_BLOCK_BLOCK+ md->digest->md_size) return;
 
	EVP_DigestUpdate(md, (unsigned char*) &(ctx->buf[OK_BLOCK_BLOCK]), tl);
	md->digest->final(tmp, &(md->md.base[0]));
	if(memcmp(&(ctx->buf[tl+ OK_BLOCK_BLOCK]), tmp, md->digest->md_size) == 0)
		{
		/* there might be parts from next block lurking around ! */
		ctx->buf_off_save= tl+ OK_BLOCK_BLOCK+ md->digest->md_size;
		ctx->buf_len_save= ctx->buf_len;
		ctx->buf_off= OK_BLOCK_BLOCK;
		ctx->buf_len= tl+ OK_BLOCK_BLOCK;
		ctx->blockout= 1;
		}
	else
		{
		ctx->cont= 0;
		}
	}