2 * Copyright 2002-2020 The OpenSSL Project Authors. All Rights Reserved.
4 * Licensed under the Apache License 2.0 (the "License"). You may not use
5 * this file except in compliance with the License. You can obtain a copy
6 * in the file LICENSE in the source distribution or at
7 * https://www.openssl.org/source/license.html
11 * This file contains deprecated function(s) that are now wrappers to the new
16 * DSA low level APIs are deprecated for public use, but still ok for
19 #include "internal/deprecated.h"
22 * Parameter generation follows the updated Appendix 2.2 for FIPS PUB 186,
23 * also Appendix 2.2 of FIPS PUB 186-1 (i.e. use SHA as defined in FIPS PUB
26 #define xxxHASH EVP_sha1()
28 #include <openssl/opensslconf.h>
32 #include "internal/cryptlib.h"
33 #include <openssl/evp.h>
34 #include <openssl/bn.h>
35 #include <openssl/dsa.h>
36 #include <openssl/sha.h>
38 DSA *DSA_generate_parameters(int bits,
39 unsigned char *seed_in, int seed_len,
40 int *counter_ret, unsigned long *h_ret,
41 void (*callback) (int, int, void *),
47 if ((ret = DSA_new()) == NULL)
53 BN_GENCB_set_old(cb, callback, cb_arg);
55 if (DSA_generate_parameters_ex(ret, bits, seed_in, seed_len,
56 counter_ret, h_ret, cb)) {