1 | /*
|
---|
2 | * Copyright 1995-2021 The OpenSSL Project Authors. All Rights Reserved.
|
---|
3 | *
|
---|
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
|
---|
8 | */
|
---|
9 |
|
---|
10 | #ifndef OPENSSL_DH_H
|
---|
11 | # define OPENSSL_DH_H
|
---|
12 | # pragma once
|
---|
13 |
|
---|
14 | # include <openssl/macros.h>
|
---|
15 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
16 | # define HEADER_DH_H
|
---|
17 | # endif
|
---|
18 |
|
---|
19 | # include <openssl/opensslconf.h>
|
---|
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);
|
---|
56 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
57 | OSSL_DEPRECATEDIN_3_0
|
---|
58 | int EVP_PKEY_CTX_get0_dh_kdf_ukm(EVP_PKEY_CTX *ctx, unsigned char **ukm);
|
---|
59 | #endif
|
---|
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
|
---|
81 |
|
---|
82 | # ifndef OPENSSL_NO_DH
|
---|
83 | # include <openssl/e_os2.h>
|
---|
84 | # include <openssl/bio.h>
|
---|
85 | # include <openssl/asn1.h>
|
---|
86 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
---|
87 | # include <openssl/bn.h>
|
---|
88 | # endif
|
---|
89 | # include <openssl/dherr.h>
|
---|
90 |
|
---|
91 | # ifndef OPENSSL_DH_MAX_MODULUS_BITS
|
---|
92 | # define OPENSSL_DH_MAX_MODULUS_BITS 10000
|
---|
93 | # endif
|
---|
94 |
|
---|
95 | # define OPENSSL_DH_FIPS_MIN_MODULUS_BITS 1024
|
---|
96 |
|
---|
97 | # define DH_FLAG_CACHE_MONT_P 0x01
|
---|
98 |
|
---|
99 | # define DH_FLAG_TYPE_MASK 0xF000
|
---|
100 | # define DH_FLAG_TYPE_DH 0x0000
|
---|
101 | # define DH_FLAG_TYPE_DHX 0x1000
|
---|
102 |
|
---|
103 | # ifndef OPENSSL_NO_DEPRECATED_1_1_0
|
---|
104 | /*
|
---|
105 | * Does nothing. Previously this switched off constant time behaviour.
|
---|
106 | */
|
---|
107 | # define DH_FLAG_NO_EXP_CONSTTIME 0x00
|
---|
108 | # endif
|
---|
109 |
|
---|
110 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
111 | /*
|
---|
112 | * If this flag is set the DH method is FIPS compliant and can be used in
|
---|
113 | * FIPS mode. This is set in the validated module method. If an application
|
---|
114 | * sets this flag in its own methods it is its responsibility to ensure the
|
---|
115 | * result is compliant.
|
---|
116 | */
|
---|
117 |
|
---|
118 | # define DH_FLAG_FIPS_METHOD 0x0400
|
---|
119 |
|
---|
120 | /*
|
---|
121 | * If this flag is set the operations normally disabled in FIPS mode are
|
---|
122 | * permitted it is then the applications responsibility to ensure that the
|
---|
123 | * usage is compliant.
|
---|
124 | */
|
---|
125 |
|
---|
126 | # define DH_FLAG_NON_FIPS_ALLOW 0x0400
|
---|
127 | # endif
|
---|
128 |
|
---|
129 | /* Already defined in ossl_typ.h */
|
---|
130 | /* typedef struct dh_st DH; */
|
---|
131 | /* typedef struct dh_method DH_METHOD; */
|
---|
132 |
|
---|
133 | DECLARE_ASN1_ITEM(DHparams)
|
---|
134 |
|
---|
135 | # ifndef OPENSSL_NO_DEPRECATED_3_0
|
---|
136 | # define DH_GENERATOR_2 2
|
---|
137 | # define DH_GENERATOR_3 3
|
---|
138 | # define DH_GENERATOR_5 5
|
---|
139 |
|
---|
140 | /* DH_check error codes */
|
---|
141 | /*
|
---|
142 | * NB: These values must align with the equivalently named macros in
|
---|
143 | * internal/ffc.h.
|
---|
144 | */
|
---|
145 | # define DH_CHECK_P_NOT_PRIME 0x01
|
---|
146 | # define DH_CHECK_P_NOT_SAFE_PRIME 0x02
|
---|
147 | # define DH_UNABLE_TO_CHECK_GENERATOR 0x04
|
---|
148 | # define DH_NOT_SUITABLE_GENERATOR 0x08
|
---|
149 | # define DH_CHECK_Q_NOT_PRIME 0x10
|
---|
150 | # define DH_CHECK_INVALID_Q_VALUE 0x20
|
---|
151 | # define DH_CHECK_INVALID_J_VALUE 0x40
|
---|
152 | # define DH_MODULUS_TOO_SMALL 0x80
|
---|
153 | # define DH_MODULUS_TOO_LARGE 0x100
|
---|
154 |
|
---|
155 | /* DH_check_pub_key error codes */
|
---|
156 | # define DH_CHECK_PUBKEY_TOO_SMALL 0x01
|
---|
157 | # define DH_CHECK_PUBKEY_TOO_LARGE 0x02
|
---|
158 | # define DH_CHECK_PUBKEY_INVALID 0x04
|
---|
159 |
|
---|
160 | /*
|
---|
161 | * primes p where (p-1)/2 is prime too are called "safe"; we define this for
|
---|
162 | * backward compatibility:
|
---|
163 | */
|
---|
164 | # define DH_CHECK_P_NOT_STRONG_PRIME DH_CHECK_P_NOT_SAFE_PRIME
|
---|
165 |
|
---|
166 | # define d2i_DHparams_fp(fp, x) \
|
---|
167 | (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
|
---|
168 | (char *(*)())d2i_DHparams, \
|
---|
169 | (fp), \
|
---|
170 | (unsigned char **)(x))
|
---|
171 | # define i2d_DHparams_fp(fp, x) \
|
---|
172 | ASN1_i2d_fp(i2d_DHparams,(fp), (unsigned char *)(x))
|
---|
173 | # define d2i_DHparams_bio(bp, x) \
|
---|
174 | ASN1_d2i_bio_of(DH, DH_new, d2i_DHparams, bp, x)
|
---|
175 | # define i2d_DHparams_bio(bp, x) \
|
---|
176 | ASN1_i2d_bio_of(DH, i2d_DHparams, bp, x)
|
---|
177 |
|
---|
178 | # define d2i_DHxparams_fp(fp,x) \
|
---|
179 | (DH *)ASN1_d2i_fp((char *(*)())DH_new, \
|
---|
180 | (char *(*)())d2i_DHxparams, \
|
---|
181 | (fp), \
|
---|
182 | (unsigned char **)(x))
|
---|
183 | # define i2d_DHxparams_fp(fp, x) \
|
---|
184 | ASN1_i2d_fp(i2d_DHxparams,(fp), (unsigned char *)(x))
|
---|
185 | # define d2i_DHxparams_bio(bp, x) \
|
---|
186 | ASN1_d2i_bio_of(DH, DH_new, d2i_DHxparams, bp, x)
|
---|
187 | # define i2d_DHxparams_bio(bp, x) \
|
---|
188 | ASN1_i2d_bio_of(DH, i2d_DHxparams, bp, x)
|
---|
189 |
|
---|
190 | DECLARE_ASN1_DUP_FUNCTION_name_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
|
---|
191 |
|
---|
192 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_OpenSSL(void);
|
---|
193 |
|
---|
194 | OSSL_DEPRECATEDIN_3_0 void DH_set_default_method(const DH_METHOD *meth);
|
---|
195 | OSSL_DEPRECATEDIN_3_0 const DH_METHOD *DH_get_default_method(void);
|
---|
196 | OSSL_DEPRECATEDIN_3_0 int DH_set_method(DH *dh, const DH_METHOD *meth);
|
---|
197 | OSSL_DEPRECATEDIN_3_0 DH *DH_new_method(ENGINE *engine);
|
---|
198 |
|
---|
199 | OSSL_DEPRECATEDIN_3_0 DH *DH_new(void);
|
---|
200 | OSSL_DEPRECATEDIN_3_0 void DH_free(DH *dh);
|
---|
201 | OSSL_DEPRECATEDIN_3_0 int DH_up_ref(DH *dh);
|
---|
202 | OSSL_DEPRECATEDIN_3_0 int DH_bits(const DH *dh);
|
---|
203 | OSSL_DEPRECATEDIN_3_0 int DH_size(const DH *dh);
|
---|
204 | OSSL_DEPRECATEDIN_3_0 int DH_security_bits(const DH *dh);
|
---|
205 |
|
---|
206 | # define DH_get_ex_new_index(l, p, newf, dupf, freef) \
|
---|
207 | CRYPTO_get_ex_new_index(CRYPTO_EX_INDEX_DH, l, p, newf, dupf, freef)
|
---|
208 |
|
---|
209 | OSSL_DEPRECATEDIN_3_0 int DH_set_ex_data(DH *d, int idx, void *arg);
|
---|
210 | OSSL_DEPRECATEDIN_3_0 void *DH_get_ex_data(const DH *d, int idx);
|
---|
211 |
|
---|
212 | OSSL_DEPRECATEDIN_3_0 int DH_generate_parameters_ex(DH *dh, int prime_len,
|
---|
213 | int generator,
|
---|
214 | BN_GENCB *cb);
|
---|
215 |
|
---|
216 | OSSL_DEPRECATEDIN_3_0 int DH_check_params_ex(const DH *dh);
|
---|
217 | OSSL_DEPRECATEDIN_3_0 int DH_check_ex(const DH *dh);
|
---|
218 | OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key_ex(const DH *dh, const BIGNUM *pub_key);
|
---|
219 | OSSL_DEPRECATEDIN_3_0 int DH_check_params(const DH *dh, int *ret);
|
---|
220 | OSSL_DEPRECATEDIN_3_0 int DH_check(const DH *dh, int *codes);
|
---|
221 | OSSL_DEPRECATEDIN_3_0 int DH_check_pub_key(const DH *dh, const BIGNUM *pub_key,
|
---|
222 | int *codes);
|
---|
223 | OSSL_DEPRECATEDIN_3_0 int DH_generate_key(DH *dh);
|
---|
224 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key(unsigned char *key,
|
---|
225 | const BIGNUM *pub_key, DH *dh);
|
---|
226 | OSSL_DEPRECATEDIN_3_0 int DH_compute_key_padded(unsigned char *key,
|
---|
227 | const BIGNUM *pub_key, DH *dh);
|
---|
228 |
|
---|
229 | DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHparams)
|
---|
230 | DECLARE_ASN1_ENCODE_FUNCTIONS_only_attr(OSSL_DEPRECATEDIN_3_0, DH, DHxparams)
|
---|
231 |
|
---|
232 | # ifndef OPENSSL_NO_STDIO
|
---|
233 | OSSL_DEPRECATEDIN_3_0 int DHparams_print_fp(FILE *fp, const DH *x);
|
---|
234 | # endif
|
---|
235 | OSSL_DEPRECATEDIN_3_0 int DHparams_print(BIO *bp, const DH *x);
|
---|
236 |
|
---|
237 | /* RFC 5114 parameters */
|
---|
238 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_1024_160(void);
|
---|
239 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_224(void);
|
---|
240 | OSSL_DEPRECATEDIN_3_0 DH *DH_get_2048_256(void);
|
---|
241 |
|
---|
242 | /* Named parameters, currently RFC7919 and RFC3526 */
|
---|
243 | OSSL_DEPRECATEDIN_3_0 DH *DH_new_by_nid(int nid);
|
---|
244 | OSSL_DEPRECATEDIN_3_0 int DH_get_nid(const DH *dh);
|
---|
245 |
|
---|
246 | /* RFC2631 KDF */
|
---|
247 | OSSL_DEPRECATEDIN_3_0 int DH_KDF_X9_42(unsigned char *out, size_t outlen,
|
---|
248 | const unsigned char *Z, size_t Zlen,
|
---|
249 | ASN1_OBJECT *key_oid,
|
---|
250 | const unsigned char *ukm,
|
---|
251 | size_t ukmlen, const EVP_MD *md);
|
---|
252 |
|
---|
253 | OSSL_DEPRECATEDIN_3_0 void DH_get0_pqg(const DH *dh, const BIGNUM **p,
|
---|
254 | const BIGNUM **q, const BIGNUM **g);
|
---|
255 | OSSL_DEPRECATEDIN_3_0 int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g);
|
---|
256 | OSSL_DEPRECATEDIN_3_0 void DH_get0_key(const DH *dh, const BIGNUM **pub_key,
|
---|
257 | const BIGNUM **priv_key);
|
---|
258 | OSSL_DEPRECATEDIN_3_0 int DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key);
|
---|
259 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_p(const DH *dh);
|
---|
260 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_q(const DH *dh);
|
---|
261 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_g(const DH *dh);
|
---|
262 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_priv_key(const DH *dh);
|
---|
263 | OSSL_DEPRECATEDIN_3_0 const BIGNUM *DH_get0_pub_key(const DH *dh);
|
---|
264 | OSSL_DEPRECATEDIN_3_0 void DH_clear_flags(DH *dh, int flags);
|
---|
265 | OSSL_DEPRECATEDIN_3_0 int DH_test_flags(const DH *dh, int flags);
|
---|
266 | OSSL_DEPRECATEDIN_3_0 void DH_set_flags(DH *dh, int flags);
|
---|
267 | OSSL_DEPRECATEDIN_3_0 ENGINE *DH_get0_engine(DH *d);
|
---|
268 | OSSL_DEPRECATEDIN_3_0 long DH_get_length(const DH *dh);
|
---|
269 | OSSL_DEPRECATEDIN_3_0 int DH_set_length(DH *dh, long length);
|
---|
270 |
|
---|
271 | OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_new(const char *name, int flags);
|
---|
272 | OSSL_DEPRECATEDIN_3_0 void DH_meth_free(DH_METHOD *dhm);
|
---|
273 | OSSL_DEPRECATEDIN_3_0 DH_METHOD *DH_meth_dup(const DH_METHOD *dhm);
|
---|
274 | OSSL_DEPRECATEDIN_3_0 const char *DH_meth_get0_name(const DH_METHOD *dhm);
|
---|
275 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set1_name(DH_METHOD *dhm, const char *name);
|
---|
276 | OSSL_DEPRECATEDIN_3_0 int DH_meth_get_flags(const DH_METHOD *dhm);
|
---|
277 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_flags(DH_METHOD *dhm, int flags);
|
---|
278 | OSSL_DEPRECATEDIN_3_0 void *DH_meth_get0_app_data(const DH_METHOD *dhm);
|
---|
279 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set0_app_data(DH_METHOD *dhm, void *app_data);
|
---|
280 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_key(const DH_METHOD *dhm)) (DH *);
|
---|
281 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_key(DH_METHOD *dhm,
|
---|
282 | int (*generate_key) (DH *));
|
---|
283 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_compute_key(const DH_METHOD *dhm))
|
---|
284 | (unsigned char *key,
|
---|
285 | const BIGNUM *pub_key,
|
---|
286 | DH *dh);
|
---|
287 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_compute_key(DH_METHOD *dhm,
|
---|
288 | int (*compute_key)
|
---|
289 | (unsigned char *key,
|
---|
290 | const BIGNUM *pub_key,
|
---|
291 | DH *dh));
|
---|
292 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_bn_mod_exp(const DH_METHOD *dhm))
|
---|
293 | (const DH *, BIGNUM *,
|
---|
294 | const BIGNUM *,
|
---|
295 | const BIGNUM *,
|
---|
296 | const BIGNUM *, BN_CTX *,
|
---|
297 | BN_MONT_CTX *);
|
---|
298 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_bn_mod_exp(DH_METHOD *dhm,
|
---|
299 | int (*bn_mod_exp)
|
---|
300 | (const DH *, BIGNUM *,
|
---|
301 | const BIGNUM *, const BIGNUM *,
|
---|
302 | const BIGNUM *, BN_CTX *,
|
---|
303 | BN_MONT_CTX *));
|
---|
304 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_init(const DH_METHOD *dhm))(DH *);
|
---|
305 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_init(DH_METHOD *dhm, int (*init)(DH *));
|
---|
306 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_finish(const DH_METHOD *dhm)) (DH *);
|
---|
307 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_finish(DH_METHOD *dhm, int (*finish) (DH *));
|
---|
308 | OSSL_DEPRECATEDIN_3_0 int (*DH_meth_get_generate_params(const DH_METHOD *dhm))
|
---|
309 | (DH *, int, int,
|
---|
310 | BN_GENCB *);
|
---|
311 | OSSL_DEPRECATEDIN_3_0 int DH_meth_set_generate_params(DH_METHOD *dhm,
|
---|
312 | int (*generate_params)
|
---|
313 | (DH *, int, int,
|
---|
314 | BN_GENCB *));
|
---|
315 | # endif /* OPENSSL_NO_DEPRECATED_3_0 */
|
---|
316 |
|
---|
317 | # ifndef OPENSSL_NO_DEPRECATED_0_9_8
|
---|
318 | OSSL_DEPRECATEDIN_0_9_8 DH *DH_generate_parameters(int prime_len, int generator,
|
---|
319 | void (*callback) (int, int,
|
---|
320 | void *),
|
---|
321 | void *cb_arg);
|
---|
322 | # endif
|
---|
323 |
|
---|
324 | # endif
|
---|
325 | # ifdef __cplusplus
|
---|
326 | }
|
---|
327 | # endif
|
---|
328 | #endif
|
---|