Lines Matching refs:dsa

169   DSA *dsa = DSA_new();  in get_fips_dsa()  local
170 if (!dsa) { in get_fips_dsa()
173 dsa->p = BN_bin2bn(fips_p, sizeof(fips_p), NULL); in get_fips_dsa()
174 dsa->q = BN_bin2bn(fips_q, sizeof(fips_q), NULL); in get_fips_dsa()
175 dsa->g = BN_bin2bn(fips_g, sizeof(fips_g), NULL); in get_fips_dsa()
176 dsa->pub_key = BN_bin2bn(fips_y, sizeof(fips_y), NULL); in get_fips_dsa()
177 dsa->priv_key = BN_bin2bn(fips_x, sizeof(fips_x), NULL); in get_fips_dsa()
178 if (dsa->p == NULL || dsa->q == NULL || dsa->g == NULL || in get_fips_dsa()
179 dsa->pub_key == NULL || dsa->priv_key == NULL) { in get_fips_dsa()
180 DSA_free(dsa); in get_fips_dsa()
183 return dsa; in get_fips_dsa()
188 DSA *dsa = NULL; in test_generate() local
198 dsa = DSA_new(); in test_generate()
199 if (dsa == NULL || in test_generate()
200 !DSA_generate_parameters_ex(dsa, 512, seed, 20, &counter, &h, &cb)) { in test_generate()
220 i = BN_bn2bin(dsa->q, buf); in test_generate()
227 i = BN_bn2bin(dsa->p, buf); in test_generate()
234 i = BN_bn2bin(dsa->g, buf); in test_generate()
241 if (!DSA_generate_key(dsa) || in test_generate()
242 !DSA_sign(0, fips_digest, sizeof(fips_digest), sig, &siglen, dsa)) { in test_generate()
245 if (DSA_verify(0, fips_digest, sizeof(fips_digest), sig, siglen, dsa) == 1) { in test_generate()
252 DSA_free(dsa); in test_generate()
259 DSA *dsa = get_fips_dsa(); in test_verify() local
260 if (dsa == NULL) { in test_verify()
264 int ret = DSA_verify(0, fips_digest, sizeof(fips_digest), sig, sig_len, dsa); in test_verify()
274 DSA_free(dsa); in test_verify()