unsigned char *hash, int hlen)
unsigned char *data, int datalen)
dsa_verify(    Key *key,    unsigned char *signature, int signaturelen,    unsigned char *hash, int hlen){	Buffer b;	unsigned char *digest;	DSA_SIG *sig;	EVP_MD *evp_md = EVP_sha1();	EVP_MD_CTX md;	char *ktype;	unsigned char *sigblob;	char *txt;	unsigned int len;	int rlen;	int ret;	if (key == NULL || key->type != KEY_DSA || key->dsa == NULL) {		error("dsa_verify: no DSA key");		return -1;	}	if (datafellows && signaturelen != SIGBLOB_LEN) {		log("heh? datafellows ssh2 complies with ietf-drafts????");		datafellows = 0;	}	debug("len %d datafellows %d", signaturelen, datafellows);	/* fetch signature */	if (datafellows) {		sigblob = signature;		len = signaturelen;	} else {		/* ietf-drafts */		buffer_init(&b);		buffer_append(&b, (char *) signature, signaturelen);		ktype = buffer_get_string(&b, NULL);		sigblob = (unsigned char *)buffer_get_string(&b, &len);		rlen = buffer_len(&b);		if(rlen != 0)			error("remaining bytes in signature %d", rlen);		buffer_free(&b);	}	if (len != SIGBLOB_LEN) {		fatal("bad sigbloblen %d != SIGBLOB_LEN", len);	}	/* parse signature */	sig = DSA_SIG_new();	sig->r = BN_new();	sig->s = BN_new();	BN_bin2bn(sigblob, INTBLOB_LEN, sig->r);	BN_bin2bn(sigblob+ INTBLOB_LEN, INTBLOB_LEN, sig->s);	if (!datafellows) {		memset(sigblob, 0, len);		xfree(sigblob);	}		/* sha1 the signed data (== session_id == hash) */	digest = xmalloc(evp_md->md_size);	EVP_DigestInit(&md, evp_md);	EVP_DigestUpdate(&md, hash, hlen);	EVP_DigestFinal(&md, digest, NULL);	ret = DSA_do_verify(digest, evp_md->md_size, sig, key->dsa);	memset(digest, 0, evp_md->md_size);	xfree(digest);	DSA_SIG_free(sig);	switch (ret) {	case 1:		txt = "correct";		break;	case 0:		txt = "incorrect";		break;	case -1:	default:		txt = "error";		break;	}	debug("dsa_verify: signature %s", txt);	return ret;}