Home | History | Annotate | Download | only in racoon

Lines Matching refs:DH

57 #include <openssl/dh.h>
2424 /* DH */
2432 DH *dh = NULL;
2440 if ((dh = DH_new()) == NULL)
2442 dh->p = p;
2443 p = NULL; /* p is now part of dh structure */
2444 dh->g = NULL;
2445 if ((dh->g = BN_new()) == NULL)
2447 if (!BN_set_word(dh->g, g))
2451 dh->length = publen;
2454 if (!DH_generate_key(dh))
2458 if (eay_bn2v(pub, dh->pub_key) < 0)
2460 if (eay_bn2v(priv, dh->priv_key) < 0) {
2468 if (dh != NULL)
2469 DH_free(dh);
2481 DH *dh = NULL;
2490 /* make DH structure */
2491 if ((dh = DH_new()) == NULL)
2493 if (eay_v2bn(&dh->p, prime) < 0)
2495 if (eay_v2bn(&dh->pub_key, pub) < 0)
2497 if (eay_v2bn(&dh->priv_key, priv) < 0)
2499 dh->length = pub2->l * 8;
2501 dh->g = NULL;
2502 if ((dh->g = BN_new()) == NULL)
2504 if (!BN_set_word(dh->g, g))
2509 if ((l = DH_compute_key(v, dh_pub, dh)) == -1)
2518 if (dh != NULL)
2519 DH_free(dh);