diff options
author | Matt Caswell <matt@openssl.org> | 2016-03-30 15:21:39 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-04-03 00:23:56 +0100 |
commit | 1258396d73cf937e4daaf2c35377011b9366f956 (patch) | |
tree | 6448183bf775904be79b29786795ade508f7fe4d /apps/dsaparam.c | |
parent | 25c78440d21c814705e0e50c6e567300936aa02b (diff) | |
download | openssl-1258396d73cf937e4daaf2c35377011b9366f956.tar.gz |
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 'apps/dsaparam.c')
-rw-r--r-- | apps/dsaparam.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/dsaparam.c b/apps/dsaparam.c index 7b9ca631a7..5b0bb625c6 100644 --- a/apps/dsaparam.c +++ b/apps/dsaparam.c @@ -263,14 +263,14 @@ int dsaparam_main(int argc, char **argv) } if (C) { - int len = BN_num_bytes(dsa->p); - int bits_p = BN_num_bits(dsa->p); + int len = BN_num_bytes(DSA_get0_p(dsa)); + int bits_p = BN_num_bits(DSA_get0_p(dsa)); unsigned char *data = app_malloc(len + 20, "BN space"); BIO_printf(bio_out, "DSA *get_dsa%d()\n{\n", bits_p); - print_bignum_var(bio_out, dsa->p, "dsap", len, data); - print_bignum_var(bio_out, dsa->q, "dsaq", len, data); - print_bignum_var(bio_out, dsa->g, "dsag", len, data); + print_bignum_var(bio_out, DSA_get0_p(dsa), "dsap", len, data); + print_bignum_var(bio_out, DSA_get0_q(dsa), "dsaq", len, data); + print_bignum_var(bio_out, DSA_get0_g(dsa), "dsag", len, data); BIO_printf(bio_out, " DSA *dsa = DSA_new();\n" "\n"); BIO_printf(bio_out, " if (dsa == NULL)\n" |