UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY, UBSEC_R_UNIT_FAILURE);
static int ubsec_dsa_verify(const unsigned char *dgst, int dgst_len,                                DSA_SIG *sig, DSA *dsa)	{	int v_len, d_len;	int to_return = 0;	int fd;	BIGNUM v;	BN_init(&v);	if(!bn_wexpand(&v, dsa->p->top)) {		UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY ,UBSEC_R_BN_EXPAND_FAIL);		goto err;	}	v_len = BN_num_bits(dsa->p);	d_len = p_UBSEC_ubsec_bytes_to_bits((unsigned char *)dgst, dgst_len);	if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0) {                const DSA_METHOD *meth;		fd = 0;		UBSECerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);                meth = DSA_OpenSSL();                to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);		goto err;	}	if (p_UBSEC_dsa_verify_ioctl(fd, 0, /* compute hash before signing */		(unsigned char *)dgst, d_len,		(unsigned char *)dsa->p->d, BN_num_bits(dsa->p), 		(unsigned char *)dsa->q->d, BN_num_bits(dsa->q),		(unsigned char *)dsa->g->d, BN_num_bits(dsa->g),		(unsigned char *)dsa->pub_key->d, BN_num_bits(dsa->pub_key),		(unsigned char *)sig->r->d, BN_num_bits(sig->r),		(unsigned char *)sig->s->d, BN_num_bits(sig->s),		(unsigned char *)v.d, &v_len) != 0) {                const DSA_METHOD *meth;		UBSECerr(UBSEC_F_UBSEC_DSA_VERIFY , UBSEC_R_REQUEST_FAILED);                p_UBSEC_ubsec_close(fd);                meth = DSA_OpenSSL();                to_return = meth->dsa_do_verify(dgst, dgst_len, sig, dsa);		goto err;	}	p_UBSEC_ubsec_close(fd);	to_return = 1;err:	BN_clear_free(&v);	return to_return;	}