summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto/ec/ec_kmeth.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/libcrypto/ec/ec_kmeth.c')
-rw-r--r--src/lib/libcrypto/ec/ec_kmeth.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/src/lib/libcrypto/ec/ec_kmeth.c b/src/lib/libcrypto/ec/ec_kmeth.c
index ec45e679d9..3e997f8a5e 100644
--- a/src/lib/libcrypto/ec/ec_kmeth.c
+++ b/src/lib/libcrypto/ec/ec_kmeth.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: ec_kmeth.c,v 1.10 2023/07/05 11:37:46 tb Exp $ */ 1/* $OpenBSD: ec_kmeth.c,v 1.11 2023/07/07 13:54:45 beck Exp $ */
2/* 2/*
3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL 3 * Written by Dr Stephen N Henson (steve@openssl.org) for the OpenSSL
4 * project. 4 * project.
@@ -92,12 +92,14 @@ EC_KEY_OpenSSL(void)
92{ 92{
93 return &openssl_ec_key_method; 93 return &openssl_ec_key_method;
94} 94}
95LCRYPTO_ALIAS(EC_KEY_OpenSSL);
95 96
96const EC_KEY_METHOD * 97const EC_KEY_METHOD *
97EC_KEY_get_default_method(void) 98EC_KEY_get_default_method(void)
98{ 99{
99 return default_ec_key_meth; 100 return default_ec_key_meth;
100} 101}
102LCRYPTO_ALIAS(EC_KEY_get_default_method);
101 103
102void 104void
103EC_KEY_set_default_method(const EC_KEY_METHOD *meth) 105EC_KEY_set_default_method(const EC_KEY_METHOD *meth)
@@ -107,12 +109,14 @@ EC_KEY_set_default_method(const EC_KEY_METHOD *meth)
107 else 109 else
108 default_ec_key_meth = meth; 110 default_ec_key_meth = meth;
109} 111}
112LCRYPTO_ALIAS(EC_KEY_set_default_method);
110 113
111const EC_KEY_METHOD * 114const EC_KEY_METHOD *
112EC_KEY_get_method(const EC_KEY *key) 115EC_KEY_get_method(const EC_KEY *key)
113{ 116{
114 return key->meth; 117 return key->meth;
115} 118}
119LCRYPTO_ALIAS(EC_KEY_get_method);
116 120
117int 121int
118EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth) 122EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth)
@@ -132,6 +136,7 @@ EC_KEY_set_method(EC_KEY *key, const EC_KEY_METHOD *meth)
132 return meth->init(key); 136 return meth->init(key);
133 return 1; 137 return 1;
134} 138}
139LCRYPTO_ALIAS(EC_KEY_set_method);
135 140
136EC_KEY * 141EC_KEY *
137EC_KEY_new_method(ENGINE *engine) 142EC_KEY_new_method(ENGINE *engine)
@@ -180,6 +185,7 @@ EC_KEY_new_method(ENGINE *engine)
180 EC_KEY_free(ret); 185 EC_KEY_free(ret);
181 return NULL; 186 return NULL;
182} 187}
188LCRYPTO_ALIAS(EC_KEY_new_method);
183 189
184EC_KEY_METHOD * 190EC_KEY_METHOD *
185EC_KEY_METHOD_new(const EC_KEY_METHOD *meth) 191EC_KEY_METHOD_new(const EC_KEY_METHOD *meth)
@@ -193,6 +199,7 @@ EC_KEY_METHOD_new(const EC_KEY_METHOD *meth)
193 ret->flags |= EC_KEY_METHOD_DYNAMIC; 199 ret->flags |= EC_KEY_METHOD_DYNAMIC;
194 return ret; 200 return ret;
195} 201}
202LCRYPTO_ALIAS(EC_KEY_METHOD_new);
196 203
197void 204void
198EC_KEY_METHOD_free(EC_KEY_METHOD *meth) 205EC_KEY_METHOD_free(EC_KEY_METHOD *meth)
@@ -202,6 +209,7 @@ EC_KEY_METHOD_free(EC_KEY_METHOD *meth)
202 if (meth->flags & EC_KEY_METHOD_DYNAMIC) 209 if (meth->flags & EC_KEY_METHOD_DYNAMIC)
203 free(meth); 210 free(meth);
204} 211}
212LCRYPTO_ALIAS(EC_KEY_METHOD_free);
205 213
206void 214void
207EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth, 215EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth,
@@ -219,12 +227,14 @@ EC_KEY_METHOD_set_init(EC_KEY_METHOD *meth,
219 meth->set_private = set_private; 227 meth->set_private = set_private;
220 meth->set_public = set_public; 228 meth->set_public = set_public;
221} 229}
230LCRYPTO_ALIAS(EC_KEY_METHOD_set_init);
222 231
223void 232void
224EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, int (*keygen)(EC_KEY *key)) 233EC_KEY_METHOD_set_keygen(EC_KEY_METHOD *meth, int (*keygen)(EC_KEY *key))
225{ 234{
226 meth->keygen = keygen; 235 meth->keygen = keygen;
227} 236}
237LCRYPTO_ALIAS(EC_KEY_METHOD_set_keygen);
228 238
229void 239void
230EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth, 240EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth,
@@ -233,6 +243,7 @@ EC_KEY_METHOD_set_compute_key(EC_KEY_METHOD *meth,
233{ 243{
234 meth->compute_key = ckey; 244 meth->compute_key = ckey;
235} 245}
246LCRYPTO_ALIAS(EC_KEY_METHOD_set_compute_key);
236 247
237void 248void
238EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth, 249EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth,
@@ -249,6 +260,7 @@ EC_KEY_METHOD_set_sign(EC_KEY_METHOD *meth,
249 meth->sign_setup = sign_setup; 260 meth->sign_setup = sign_setup;
250 meth->sign_sig = sign_sig; 261 meth->sign_sig = sign_sig;
251} 262}
263LCRYPTO_ALIAS(EC_KEY_METHOD_set_sign);
252 264
253void 265void
254EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth, 266EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth,
@@ -260,6 +272,7 @@ EC_KEY_METHOD_set_verify(EC_KEY_METHOD *meth,
260 meth->verify = verify; 272 meth->verify = verify;
261 meth->verify_sig = verify_sig; 273 meth->verify_sig = verify_sig;
262} 274}
275LCRYPTO_ALIAS(EC_KEY_METHOD_set_verify);
263 276
264 277
265void 278void
@@ -284,6 +297,7 @@ EC_KEY_METHOD_get_init(const EC_KEY_METHOD *meth,
284 if (pset_public != NULL) 297 if (pset_public != NULL)
285 *pset_public = meth->set_public; 298 *pset_public = meth->set_public;
286} 299}
300LCRYPTO_ALIAS(EC_KEY_METHOD_get_init);
287 301
288void 302void
289EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth, 303EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth,
@@ -292,6 +306,7 @@ EC_KEY_METHOD_get_keygen(const EC_KEY_METHOD *meth,
292 if (pkeygen != NULL) 306 if (pkeygen != NULL)
293 *pkeygen = meth->keygen; 307 *pkeygen = meth->keygen;
294} 308}
309LCRYPTO_ALIAS(EC_KEY_METHOD_get_keygen);
295 310
296void 311void
297EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth, 312EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth,
@@ -301,6 +316,7 @@ EC_KEY_METHOD_get_compute_key(const EC_KEY_METHOD *meth,
301 if (pck != NULL) 316 if (pck != NULL)
302 *pck = meth->compute_key; 317 *pck = meth->compute_key;
303} 318}
319LCRYPTO_ALIAS(EC_KEY_METHOD_get_compute_key);
304 320
305void 321void
306EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth, 322EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth,
@@ -320,6 +336,7 @@ EC_KEY_METHOD_get_sign(const EC_KEY_METHOD *meth,
320 if (psign_sig != NULL) 336 if (psign_sig != NULL)
321 *psign_sig = meth->sign_sig; 337 *psign_sig = meth->sign_sig;
322} 338}
339LCRYPTO_ALIAS(EC_KEY_METHOD_get_sign);
323 340
324void 341void
325EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth, 342EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
@@ -333,3 +350,4 @@ EC_KEY_METHOD_get_verify(const EC_KEY_METHOD *meth,
333 if (pverify_sig != NULL) 350 if (pverify_sig != NULL)
334 *pverify_sig = meth->verify_sig; 351 *pverify_sig = meth->verify_sig;
335} 352}
353LCRYPTO_ALIAS(EC_KEY_METHOD_get_verify);