summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-30 15:21:39 +0100
committerMatt Caswell <matt@openssl.org>2016-04-03 00:23:56 +0100
commit1258396d73cf937e4daaf2c35377011b9366f956 (patch)
tree6448183bf775904be79b29786795ade508f7fe4d /test
parent25c78440d21c814705e0e50c6e567300936aa02b (diff)
Make the DSA structure opaque
Move the dsa_st structure out of the public header file. Add some accessor functions to enable access to the internal fields, and update all internal usage to use the new functions. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'test')
-rw-r--r--test/dsatest.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/dsatest.c b/test/dsatest.c
index 27996ac85e..b8ab2a1bae 100644
--- a/test/dsatest.c
+++ b/test/dsatest.c
@@ -172,34 +172,34 @@ int main(int argc, char **argv)
goto end;
}
- i = BN_bn2bin(dsa->q, buf);
+ i = BN_bn2bin(DSA_get0_q(dsa), buf);
j = sizeof(out_q);
if ((i != j) || (memcmp(buf, out_q, i) != 0)) {
BIO_printf(bio_err, "q value is wrong\n");
goto end;
}
- i = BN_bn2bin(dsa->p, buf);
+ i = BN_bn2bin(DSA_get0_p(dsa), buf);
j = sizeof(out_p);
if ((i != j) || (memcmp(buf, out_p, i) != 0)) {
BIO_printf(bio_err, "p value is wrong\n");
goto end;
}
- i = BN_bn2bin(dsa->g, buf);
+ i = BN_bn2bin(DSA_get0_g(dsa), buf);
j = sizeof(out_g);
if ((i != j) || (memcmp(buf, out_g, i) != 0)) {
BIO_printf(bio_err, "g value is wrong\n");
goto end;
}
- dsa->flags |= DSA_FLAG_NO_EXP_CONSTTIME;
+ DSA_set_flags(dsa, DSA_FLAG_NO_EXP_CONSTTIME);
DSA_generate_key(dsa);
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)
ret = 1;
- dsa->flags &= ~DSA_FLAG_NO_EXP_CONSTTIME;
+ DSA_clear_flags(dsa, DSA_FLAG_NO_EXP_CONSTTIME);
DSA_generate_key(dsa);
DSA_sign(0, str1, 20, sig, &siglen, dsa);
if (DSA_verify(0, str1, 20, sig, siglen, dsa) == 1)