summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatt Caswell <matt@openssl.org>2016-03-30 17:18:55 +0100
committerMatt Caswell <matt@openssl.org>2016-04-03 00:23:56 +0100
commit6e9fa57c6ddde7df49983251373a05cd663aac22 (patch)
tree1930de43f7e9ec5a9a9597f8d70965f4b1aa80b7 /test
parent1258396d73cf937e4daaf2c35377011b9366f956 (diff)
Make DSA_METHOD opaque
Move the dsa_method structure out of the public header file, and provide getter and setter functions for creating and modifying custom DSA_METHODs. Reviewed-by: Richard Levitte <levitte@openssl.org> Reviewed-by: Stephen Henson <steve@openssl.org>
Diffstat (limited to 'test')
-rw-r--r--test/dsatest.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/dsatest.c b/test/dsatest.c
index b8ab2a1bae..1945f35f5b 100644
--- a/test/dsatest.c
+++ b/test/dsatest.c
@@ -133,6 +133,7 @@ int main(int argc, char **argv)
unsigned long h;
unsigned char sig[256];
unsigned int siglen;
+ BIGNUM *p = NULL, *q = NULL, *g = NULL;
if (bio_err == NULL)
bio_err = BIO_new_fp(stderr, BIO_NOCLOSE | BIO_FP_TEXT);
@@ -172,21 +173,22 @@ int main(int argc, char **argv)
goto end;
}
- i = BN_bn2bin(DSA_get0_q(dsa), buf);
+ DSA_get0_pqg(dsa, &p, &q, &g);
+ i = BN_bn2bin(q, 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_get0_p(dsa), buf);
+ i = BN_bn2bin(p, 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_get0_g(dsa), buf);
+ i = BN_bn2bin(g, buf);
j = sizeof(out_g);
if ((i != j) || (memcmp(buf, out_g, i) != 0)) {
BIO_printf(bio_err, "g value is wrong\n");