ENGINEerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);
UBSECerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_UNIT_FAILURE);
static int ubsec_dh_compute_key (unsigned char *key,const BIGNUM *pub_key,DH *dh)        {        int      ret      = -1,                 k_len,                 fd;        k_len = BN_num_bits(dh->p);        if ((fd = p_UBSEC_ubsec_open(UBSEC_KEY_DEVICE_NAME)) <= 0)                {                const DH_METHOD *meth;                ENGINEerr(UBSEC_F_UBSEC_INIT, UBSEC_R_UNIT_FAILURE);                meth = DH_OpenSSL();                ret = meth->compute_key(key, pub_key, dh);                goto err;                }        if (p_UBSEC_diffie_hellman_agree_ioctl(fd,                                               (unsigned char *)dh->priv_key->d, BN_num_bits(dh->priv_key),                                               (unsigned char *)pub_key->d, BN_num_bits(pub_key),                                               (unsigned char *)dh->p->d, BN_num_bits(dh->p),                                               key, &k_len) != 0)                {                /* Hardware's a no go, failover to software */                const DH_METHOD *meth;                ENGINEerr(UBSEC_F_UBSEC_DH_COMPUTE_KEY, UBSEC_R_REQUEST_FAILED);                p_UBSEC_ubsec_close(fd);                meth = DH_OpenSSL();                ret = meth->compute_key(key, pub_key, dh);                goto err;                }        p_UBSEC_ubsec_close(fd);        ret = p_UBSEC_ubsec_bits_to_bytes(k_len);err:        return ret;        }