Lines Matching refs:dh
29 DH *dh = ossl_dh_new_ex(libctx); in dh_param_init() local
31 if (dh == NULL) in dh_param_init()
34 ossl_ffc_named_group_set(&dh->params, group); in dh_param_init()
35 dh->params.nid = ossl_ffc_named_group_get_uid(group); in dh_param_init()
36 dh->dirty_cnt++; in dh_param_init()
37 return dh; in dh_param_init()
56 void ossl_dh_cache_named_group(DH *dh) in ossl_dh_cache_named_group() argument
60 if (dh == NULL) in ossl_dh_cache_named_group()
63 dh->params.nid = NID_undef; /* flush cached value */ in ossl_dh_cache_named_group()
66 if (dh->params.p == NULL in ossl_dh_cache_named_group()
67 || dh->params.g == NULL) in ossl_dh_cache_named_group()
70 if ((group = ossl_ffc_numbers_to_dh_named_group(dh->params.p, in ossl_dh_cache_named_group()
71 dh->params.q, in ossl_dh_cache_named_group()
72 dh->params.g)) != NULL) { in ossl_dh_cache_named_group()
73 if (dh->params.q == NULL) in ossl_dh_cache_named_group()
74 dh->params.q = (BIGNUM *)ossl_ffc_named_group_get_q(group); in ossl_dh_cache_named_group()
76 dh->params.nid = ossl_ffc_named_group_get_uid(group); in ossl_dh_cache_named_group()
77 dh->params.keylength = ossl_ffc_named_group_get_keylength(group); in ossl_dh_cache_named_group()
78 dh->dirty_cnt++; in ossl_dh_cache_named_group()
82 int ossl_dh_is_named_safe_prime_group(const DH *dh) in ossl_dh_is_named_safe_prime_group() argument
84 int id = DH_get_nid(dh); in ossl_dh_is_named_safe_prime_group()
93 int DH_get_nid(const DH *dh) in DH_get_nid() argument
95 if (dh == NULL) in DH_get_nid()
98 return dh->params.nid; in DH_get_nid()