Lines Matching refs:dh
45 - write(request, state.dh->pub_key);
46 - write(request, state.dh->p);
47 - write(request, state.dh->g);
48 + DH_get0_pqg(state.dh, &p, NULL, &g);
49 + DH_get0_key(state.dh, &pub_key, NULL);
74 state.dh = DH_new();
77 - read(data, &state.dh->p);
78 - read(data, &state.dh->g);
82 + if (DH_set0_pqg(state.dh, p, NULL, g))
91 if (!DH_check(state.dh, &codes))
96 - write(response, state.dh->pub_key);
98 + DH_get0_key(state.dh, &state_dh_pub_key, NULL);
135 +void DH_get0_pqg(const DH *dh,
139 + *p = dh->p;
141 + *q = dh->q;
143 + *g = dh->g;
146 +int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
151 + if ((dh->p == NULL && p == NULL)
152 + || (dh->g == NULL && g == NULL))
156 + BN_free(dh->p);
157 + dh->p = p;
160 + BN_free(dh->q);
161 + dh->q = q;
164 + BN_free(dh->g);
165 + dh->g = g;
169 + dh->length = BN_num_bits(q);
175 +void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
178 + *pub_key = dh->pub_key;
180 + *priv_key = dh->priv_key;
195 +#include <openssl/dh.h>
197 +void DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g);
198 +int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
199 +void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key);