]>
Commit | Line | Data |
---|---|---|
21dcbebc | 1 | /* |
8020d79b | 2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved. |
d02b48c6 | 3 | * |
48f4ad77 | 4 | * Licensed under the Apache License 2.0 (the "License"). You may not use |
21dcbebc RS |
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 | |
d02b48c6 RE |
8 | */ |
9 | ||
ae4186b0 DMSP |
10 | #ifndef OPENSSL_DH_H |
11 | # define OPENSSL_DH_H | |
d86167ec DMSP |
12 | # pragma once |
13 | ||
14 | # include <openssl/macros.h> | |
936c2b9e | 15 | # ifndef OPENSSL_NO_DEPRECATED_3_0 |
d86167ec DMSP |
16 | # define HEADER_DH_H |
17 | # endif | |
d02b48c6 | 18 | |
98186eb4 | 19 | # include <openssl/opensslconf.h> |
c829c23b RL |
20 | # include <openssl/types.h> |
21 | ||
22 | # ifdef __cplusplus | |
23 | extern "C" { | |
24 | # endif | |
25 | ||
26 | #include <stdlib.h> | |
27 | ||
28 | /* DH parameter generation types used by EVP_PKEY_CTX_set_dh_paramgen_type() */ | |
29 | # define DH_PARAMGEN_TYPE_GENERATOR 0 /* Use a safe prime generator */ | |
30 | # define DH_PARAMGEN_TYPE_FIPS_186_2 1 /* Use FIPS186-2 standard */ | |
31 | # define DH_PARAMGEN_TYPE_FIPS_186_4 2 /* Use FIPS186-4 standard */ | |
32 | # define DH_PARAMGEN_TYPE_GROUP 3 /* Use a named safe prime group */ | |
33 | ||
34 | int EVP_PKEY_CTX_set_dh_paramgen_type(EVP_PKEY_CTX *ctx, int typ); | |
35 | int EVP_PKEY_CTX_set_dh_paramgen_gindex(EVP_PKEY_CTX *ctx, int gindex); | |
36 | int EVP_PKEY_CTX_set_dh_paramgen_seed(EVP_PKEY_CTX *ctx, | |
37 | const unsigned char *seed, | |
38 | size_t seedlen); | |
39 | int EVP_PKEY_CTX_set_dh_paramgen_prime_len(EVP_PKEY_CTX *ctx, int pbits); | |
40 | int EVP_PKEY_CTX_set_dh_paramgen_subprime_len(EVP_PKEY_CTX *ctx, int qlen); | |
41 | int EVP_PKEY_CTX_set_dh_paramgen_generator(EVP_PKEY_CTX *ctx, int gen); | |
42 | int EVP_PKEY_CTX_set_dh_nid(EVP_PKEY_CTX *ctx, int nid); | |
43 | int EVP_PKEY_CTX_set_dh_rfc5114(EVP_PKEY_CTX *ctx, int gen); | |
44 | int EVP_PKEY_CTX_set_dhx_rfc5114(EVP_PKEY_CTX *ctx, int gen); | |
45 | int EVP_PKEY_CTX_set_dh_pad(EVP_PKEY_CTX *ctx, int pad); | |
46 | ||
47 | int EVP_PKEY_CTX_set_dh_kdf_type(EVP_PKEY_CTX *ctx, int kdf); | |
48 | int EVP_PKEY_CTX_get_dh_kdf_type(EVP_PKEY_CTX *ctx); | |
49 | int EVP_PKEY_CTX_set0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT *oid); | |
50 | int EVP_PKEY_CTX_get0_dh_kdf_oid(EVP_PKEY_CTX *ctx, ASN1_OBJECT **oid); | |
51 | int EVP_PKEY_CTX_set_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD *md); | |
52 | int EVP_PKEY_CTX_get_dh_kdf_md(EVP_PKEY_CTX *ctx, const EVP_MD **md); | |
53 | int EVP_PKEY_CTX_set_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int len); | |
54 | int EVP_PKEY_CTX_get_dh_kdf_outlen(EVP_PKEY_CTX *ctx, int *len); | |
55 | int EVP_PKEY_CTX_set0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char *ukm, int len); | |
76e48c9d TM |
56 | # ifndef OPENSSL_NO_DEPRECATED_3_0 |
57 | OSSL_DEPRECATEDIN_3_0 | |
c829c23b | 58 | int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm); |
76e48c9d | 59 | #endif |
c829c23b RL |
60 | |
61 | # define EVP_PKEY_CTRL_DH_PARAMGEN_PRIME_LEN (EVP_PKEY_ALG_CTRL + 1) | |
62 | # define EVP_PKEY_CTRL_DH_PARAMGEN_GENERATOR (EVP_PKEY_ALG_CTRL + 2) | |
63 | # define EVP_PKEY_CTRL_DH_RFC5114 (EVP_PKEY_ALG_CTRL + 3) | |
64 | # define EVP_PKEY_CTRL_DH_PARAMGEN_SUBPRIME_LEN (EVP_PKEY_ALG_CTRL + 4) | |
65 | # define EVP_PKEY_CTRL_DH_PARAMGEN_TYPE (EVP_PKEY_ALG_CTRL + 5) | |
66 | # define EVP_PKEY_CTRL_DH_KDF_TYPE (EVP_PKEY_ALG_CTRL + 6) | |
67 | # define EVP_PKEY_CTRL_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 7) | |
68 | # define EVP_PKEY_CTRL_GET_DH_KDF_MD (EVP_PKEY_ALG_CTRL + 8) | |
69 | # define EVP_PKEY_CTRL_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 9) | |
70 | # define EVP_PKEY_CTRL_GET_DH_KDF_OUTLEN (EVP_PKEY_ALG_CTRL + 10) | |
71 | # define EVP_PKEY_CTRL_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 11) | |
72 | # define EVP_PKEY_CTRL_GET_DH_KDF_UKM (EVP_PKEY_ALG_CTRL + 12) | |
73 | # define EVP_PKEY_CTRL_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 13) | |
74 | # define EVP_PKEY_CTRL_GET_DH_KDF_OID (EVP_PKEY_ALG_CTRL + 14) | |
75 | # define EVP_PKEY_CTRL_DH_NID (EVP_PKEY_ALG_CTRL + 15) | |
76 | # define EVP_PKEY_CTRL_DH_PAD (EVP_PKEY_ALG_CTRL + 16) | |
77 | ||
78 | /* KDF types */ | |
79 | # define EVP_PKEY_DH_KDF_NONE 1 | |
80 | # define EVP_PKEY_DH_KDF_X9_42 2 | |
d3ae5b1c | 81 | |
eab9dbbd NS |
82 | # ifndef OPENSSL_NO_STDIO |
83 | # include <stdio.h> | |
84 | # endif | |
3c27208f | 85 | # ifndef OPENSSL_NO_DH |
2c64df66 P |
86 | # include <openssl/e_os2.h> |
87 | # include <openssl/bio.h> | |
88 | # include <openssl/asn1.h> | |
2c64df66 P |
89 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 |
90 | # include <openssl/bn.h> | |
91 | # endif | |
92 | # include <openssl/dherr.h> | |
5e3225cc | 93 | |
2c64df66 P |
94 | # ifndef OPENSSL_DH_MAX_MODULUS_BITS |
95 | # define OPENSSL_DH_MAX_MODULUS_BITS 10000 | |
96 | # endif | |
83c3410b | 97 | |
2c64df66 | 98 | # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024 |
0f113f3e | 99 | |
2c64df66 | 100 | # define DH_FLAG_CACHE_MONT_P 0x01 |
5584f65a | 101 | |
627c2203 SL |
102 | # define DH_FLAG_TYPE_MASK 0xF000 |
103 | # define DH_FLAG_TYPE_DH 0x0000 | |
104 | # define DH_FLAG_TYPE_DHX 0x1000 | |
105 | ||
2c64df66 | 106 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0 |
5584f65a MC |
107 | /* |
108 | * Does nothing. Previously this switched off constant time behaviour. | |
109 | */ | |
2c64df66 P |
110 | # define DH_FLAG_NO_EXP_CONSTTIME 0x00 |
111 | # endif | |
dfeab068 | 112 | |
ada66e78 | 113 | # ifndef OPENSSL_NO_DEPRECATED_3_0 |
0f113f3e MC |
114 | /* |
115 | * If this flag is set the DH method is FIPS compliant and can be used in | |
116 | * FIPS mode. This is set in the validated module method. If an application | |
8483a003 | 117 | * sets this flag in its own methods it is its responsibility to ensure the |
0f113f3e | 118 | * result is compliant. |
4960411e DSH |
119 | */ |
120 | ||
ada66e78 | 121 | # define DH_FLAG_FIPS_METHOD 0x0400 |
4960411e | 122 | |
0f113f3e MC |
123 | /* |
124 | * If this flag is set the operations normally disabled in FIPS mode are | |
4960411e DSH |
125 | * permitted it is then the applications responsibility to ensure that the |
126 | * usage is compliant. | |
127 | */ | |
128 | ||
ada66e78 P |
129 | # define DH_FLAG_NON_FIPS_ALLOW 0x0400 |
130 | # endif | |
4960411e | 131 | |
3a87a9b9 GT |
132 | /* Already defined in ossl_typ.h */ |
133 | /* typedef struct dh_st DH; */ | |
134 | /* typedef struct dh_method DH_METHOD; */ | |
13066cee | 135 | |
599eccfc RS |
136 | DECLARE_ASN1_ITEM(DHparams) |
137 | ||
ada66e78 P |
138 | # ifndef OPENSSL_NO_DEPRECATED_3_0 |
139 | # define DH_GENERATOR_2 2 | |
140 | # define DH_GENERATOR_3 3 | |
141 | # define DH_GENERATOR_5 5 | |
d02b48c6 RE |
142 | |
143 | /* DH_check error codes */ | |
92dcfb79 MC |
144 | /* |
145 | * NB: These values must align with the equivalently named macros in | |
146 | * internal/ffc.h. | |
147 | */ | |
ada66e78 P |
148 | # define DH_CHECK_P_NOT_PRIME 0x01 |
149 | # define DH_CHECK_P_NOT_SAFE_PRIME 0x02 | |
150 | # define DH_UNABLE_TO_CHECK_GENERATOR 0x04 | |
151 | # define DH_NOT_SUITABLE_GENERATOR 0x08 | |
152 | # define DH_CHECK_Q_NOT_PRIME 0x10 | |
153 | # define DH_CHECK_INVALID_Q_VALUE 0x20 | |
154 | # define DH_CHECK_INVALID_J_VALUE 0x40 | |
155 | # define DH_MODULUS_TOO_SMALL 0x80 | |
156 | # define DH_MODULUS_TOO_LARGE 0x100 | |
d02b48c6 | 157 | |
bf3d6c0c | 158 | /* DH_check_pub_key error codes */ |
ada66e78 P |
159 | # define DH_CHECK_PUBKEY_TOO_SMALL 0x01 |
160 | # define DH_CHECK_PUBKEY_TOO_LARGE 0x02 | |
161 | # define DH_CHECK_PUBKEY_INVALID 0x04 | |
bf3d6c0c | 162 | |
0f113f3e MC |
163 | /* |
164 | * primes p where (p-1)/2 is prime too are called "safe"; we define this for | |
165 | * backward compatibility: | |
166 | */ | |
c9f71df3 | 167 | # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME |
4486d0cd | 168 | |
ada66e78 P |
169 | # define d2i_DHparams_fp(fp, x) \ |
170 | (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ | |
171 | (char *(*)())d2i_DHparams, \ | |
172 | (fp), \ | |
173 | (unsigned char **)(x)) | |
174 | # define i2d_DHparams_fp(fp, x) \ | |
175 | ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x)) | |
176 | # define d2i_DHparams_bio(bp, x) \ | |
177 | ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x) | |
178 | # define i2d_DHparams_bio(bp, x) \ | |
179 | ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x) | |
180 | ||
181 | # define d2i_DHxparams_fp(fp,x) \ | |
182 | (DH *)ASN1_d2i_fp((char *(*)())DH_new, \ | |
183 | (char *(*)())d2i_DHxparams, \ | |
184 | (fp), \ | |
185 | (unsigned char **)(x)) | |
186 | # define i2d_DHxparams_fp(fp, x) \ | |
187 | ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x)) | |
188 | # define d2i_DHxparams_bio(bp, x) \ | |
189 | ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x) | |
190 | # define i2d_DHxparams_bio(bp, x) \ | |
191 | ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x) | |
d02b48c6 | 192 | |
25e49af9 | 193 | DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams) |
f4274da1 | 194 | |
c9f71df3 | 195 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_OpenSSL(void); |
13066cee | 196 | |
c9f71df3 MC |
197 | OSSL_DEPRECATEDIN_3_0 void DH_set_default_method(const DH_METHOD *meth); |
198 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void); | |
199 | OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth); | |
200 | OSSL_DEPRECATEDIN_3_0 DH *DH_new_method(ENGINE *engine); | |
201 | ||
202 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void); | |
203 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh); | |
204 | OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh); | |
205 | OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh); | |
206 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh); | |
207 | OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh); | |
13066cee | 208 | |
ada66e78 P |
209 | # define DH_get_ex_new_index(l, p, newf, dupf, freef) \ |
210 | CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef) | |
0f113f3e | 211 | |
c9f71df3 MC |
212 | OSSL_DEPRECATEDIN_3_0 int DH_set_ex_data(DH *d, int idx, void *arg); |
213 | OSSL_DEPRECATEDIN_3_0 void *DH_get_ex_data(const DH *d, int idx); | |
214 | ||
215 | OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len, | |
216 | int generator, | |
217 | BN_GENCB *cb); | |
218 | ||
219 | OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh); | |
220 | OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh); | |
221 | OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key); | |
222 | OSSL_DEPRECATEDIN_3_0 int DH_check_params(const DH *dh, int *ret); | |
223 | OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes); | |
224 | OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key, | |
225 | int *codes); | |
226 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh); | |
227 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key, | |
228 | const BIGNUM *pub_key, DH *dh); | |
229 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key_padded(unsigned char *key, | |
230 | const BIGNUM *pub_key, DH *dh); | |
752419d8 | 231 | |
752419d8 MC |
232 | DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams) |
233 | DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams) | |
752419d8 | 234 | |
c9f71df3 MC |
235 | # ifndef OPENSSL_NO_STDIO |
236 | OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x); | |
237 | # endif | |
238 | OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x); | |
d02b48c6 | 239 | |
20bee968 | 240 | /* RFC 5114 parameters */ |
c9f71df3 MC |
241 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_1024_160(void); |
242 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_224(void); | |
243 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_256(void); | |
20bee968 | 244 | |
ca2bf555 | 245 | /* Named parameters, currently RFC7919 and RFC3526 */ |
c9f71df3 MC |
246 | OSSL_DEPRECATEDIN_3_0 DH *DH_new_by_nid(int nid); |
247 | OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh); | |
7806a782 | 248 | |
dc1ce3bc | 249 | /* RFC2631 KDF */ |
c9f71df3 MC |
250 | OSSL_DEPRECATEDIN_3_0 int DH_KDF_X9_42(unsigned char *out, size_t outlen, |
251 | const unsigned char *Z, size_t Zlen, | |
252 | ASN1_OBJECT *key_oid, | |
253 | const unsigned char *ukm, | |
254 | size_t ukmlen, const EVP_MD *md); | |
255 | ||
256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p, | |
257 | const BIGNUM **q, const BIGNUM **g); | |
258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g); | |
259 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key, | |
260 | const BIGNUM **priv_key); | |
261 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key); | |
262 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_p(const DH *dh); | |
263 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_q(const DH *dh); | |
264 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_g(const DH *dh); | |
265 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_priv_key(const DH *dh); | |
266 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh); | |
267 | OSSL_DEPRECATEDIN_3_0 void DH_clear_flags(DH *dh, int flags); | |
268 | OSSL_DEPRECATEDIN_3_0 int DH_test_flags(const DH *dh, int flags); | |
269 | OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags); | |
270 | OSSL_DEPRECATEDIN_3_0 ENGINE *DH_get0_engine(DH *d); | |
271 | OSSL_DEPRECATEDIN_3_0 long DH_get_length(const DH *dh); | |
272 | OSSL_DEPRECATEDIN_3_0 int DH_set_length(DH *dh, long length); | |
273 | ||
274 | OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_new(const char *name, int flags); | |
275 | OSSL_DEPRECATEDIN_3_0 void DH_meth_free(DH_METHOD *dhm); | |
276 | OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm); | |
277 | OSSL_DEPRECATEDIN_3_0 const char *DH_meth_get0_name(const DH_METHOD *dhm); | |
278 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set1_name(DH_METHOD *dhm, const char *name); | |
279 | OSSL_DEPRECATEDIN_3_0 int DH_meth_get_flags(const DH_METHOD *dhm); | |
280 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_flags(DH_METHOD *dhm, int flags); | |
281 | OSSL_DEPRECATEDIN_3_0 void *DH_meth_get0_app_data(const DH_METHOD *dhm); | |
282 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data); | |
283 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *); | |
284 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_key(DH_METHOD *dhm, | |
285 | int (*generate_key) (DH *)); | |
286 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_compute_key(const DH_METHOD *dhm)) | |
287 | (unsigned char *key, | |
288 | const BIGNUM *pub_key, | |
289 | DH *dh); | |
290 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_compute_key(DH_METHOD *dhm, | |
291 | int (*compute_key) | |
292 | (unsigned char *key, | |
293 | const BIGNUM *pub_key, | |
294 | DH *dh)); | |
295 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm)) | |
296 | (const DH *, BIGNUM *, | |
297 | const BIGNUM *, | |
298 | const BIGNUM *, | |
299 | const BIGNUM *, BN_CTX *, | |
300 | BN_MONT_CTX *); | |
301 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm, | |
302 | int (*bn_mod_exp) | |
303 | (const DH *, BIGNUM *, | |
304 | const BIGNUM *, const BIGNUM *, | |
305 | const BIGNUM *, BN_CTX *, | |
306 | BN_MONT_CTX *)); | |
307 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *); | |
308 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *)); | |
309 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *); | |
310 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *)); | |
311 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_params(const DH_METHOD *dhm)) | |
312 | (DH *, int, int, | |
313 | BN_GENCB *); | |
314 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_params(DH_METHOD *dhm, | |
315 | int (*generate_params) | |
316 | (DH *, int, int, | |
317 | BN_GENCB *)); | |
318 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */ | |
319 | ||
320 | # ifndef OPENSSL_NO_DEPRECATED_0_9_8 | |
321 | OSSL_DEPRECATEDIN_0_9_8 DH *DH_generate_parameters(int prime_len, int generator, | |
322 | void (*callback) (int, int, | |
323 | void *), | |
324 | void *cb_arg); | |
325 | # endif | |
0aeddcfa | 326 | |
c829c23b RL |
327 | # endif |
328 | # ifdef __cplusplus | |
d02b48c6 | 329 | } |
3c27208f | 330 | # endif |
d02b48c6 | 331 | #endif |