Lines Matching defs:dh
62 #include <openssl/dh.h>
2090 DH *dh = NULL;
2098 if ((dh = DH_new()) == NULL)
2100 dh->p = p;
2101 p = NULL; /* p is now part of dh structure */
2102 dh->g = NULL;
2103 if ((dh->g = BN_new()) == NULL)
2105 if (!BN_set_word(dh->g, g))
2109 dh->length = publen;
2112 if (!DH_generate_key(dh))
2116 if (eay_bn2v(pub, dh->pub_key) < 0)
2118 if (eay_bn2v(priv, dh->priv_key) < 0) {
2126 if (dh != NULL)
2127 DH_free(dh);
2139 DH *dh = NULL;
2149 if ((dh = DH_new()) == NULL)
2151 if (eay_v2bn(&dh->p, prime) < 0)
2153 if (eay_v2bn(&dh->pub_key, pub) < 0)
2155 if (eay_v2bn(&dh->priv_key, priv) < 0)
2157 dh->length = pub2->l * 8;
2159 dh->g = NULL;
2160 if ((dh->g = BN_new()) == NULL)
2162 if (!BN_set_word(dh->g, g))
2167 if ((l = DH_compute_key(v, dh_pub, dh)) == -1)
2176 if (dh != NULL)
2177 DH_free(dh);