diff options
Diffstat (limited to 'src/lib/libcrypto/evp/digest.c')
-rw-r--r-- | src/lib/libcrypto/evp/digest.c | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/lib/libcrypto/evp/digest.c b/src/lib/libcrypto/evp/digest.c index 6615aa4a35..ca3fb219cd 100644 --- a/src/lib/libcrypto/evp/digest.c +++ b/src/lib/libcrypto/evp/digest.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* $OpenBSD: digest.c,v 1.37 2023/07/07 13:54:45 beck Exp $ */ | 1 | /* $OpenBSD: digest.c,v 1.38 2023/07/07 19:37:53 beck Exp $ */ |
2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) | 2 | /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) |
3 | * All rights reserved. | 3 | * All rights reserved. |
4 | * | 4 | * |
@@ -130,7 +130,6 @@ EVP_DigestInit(EVP_MD_CTX *ctx, const EVP_MD *type) | |||
130 | EVP_MD_CTX_init(ctx); | 130 | EVP_MD_CTX_init(ctx); |
131 | return EVP_DigestInit_ex(ctx, type, NULL); | 131 | return EVP_DigestInit_ex(ctx, type, NULL); |
132 | } | 132 | } |
133 | LCRYPTO_ALIAS(EVP_DigestInit); | ||
134 | 133 | ||
135 | int | 134 | int |
136 | EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) | 135 | EVP_DigestInit_ex(EVP_MD_CTX *ctx, const EVP_MD *type, ENGINE *impl) |
@@ -212,14 +211,12 @@ skip_to_init: | |||
212 | return 1; | 211 | return 1; |
213 | return ctx->digest->init(ctx); | 212 | return ctx->digest->init(ctx); |
214 | } | 213 | } |
215 | LCRYPTO_ALIAS(EVP_DigestInit_ex); | ||
216 | 214 | ||
217 | int | 215 | int |
218 | EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) | 216 | EVP_DigestUpdate(EVP_MD_CTX *ctx, const void *data, size_t count) |
219 | { | 217 | { |
220 | return ctx->update(ctx, data, count); | 218 | return ctx->update(ctx, data, count); |
221 | } | 219 | } |
222 | LCRYPTO_ALIAS(EVP_DigestUpdate); | ||
223 | 220 | ||
224 | /* The caller can assume that this removes any secret data from the context */ | 221 | /* The caller can assume that this removes any secret data from the context */ |
225 | int | 222 | int |
@@ -231,7 +228,6 @@ EVP_DigestFinal(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) | |||
231 | EVP_MD_CTX_cleanup(ctx); | 228 | EVP_MD_CTX_cleanup(ctx); |
232 | return ret; | 229 | return ret; |
233 | } | 230 | } |
234 | LCRYPTO_ALIAS(EVP_DigestFinal); | ||
235 | 231 | ||
236 | /* The caller can assume that this removes any secret data from the context */ | 232 | /* The caller can assume that this removes any secret data from the context */ |
237 | int | 233 | int |
@@ -253,7 +249,6 @@ EVP_DigestFinal_ex(EVP_MD_CTX *ctx, unsigned char *md, unsigned int *size) | |||
253 | memset(ctx->md_data, 0, ctx->digest->ctx_size); | 249 | memset(ctx->md_data, 0, ctx->digest->ctx_size); |
254 | return ret; | 250 | return ret; |
255 | } | 251 | } |
256 | LCRYPTO_ALIAS(EVP_DigestFinal_ex); | ||
257 | 252 | ||
258 | int | 253 | int |
259 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) | 254 | EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) |
@@ -261,7 +256,6 @@ EVP_MD_CTX_copy(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
261 | EVP_MD_CTX_init(out); | 256 | EVP_MD_CTX_init(out); |
262 | return EVP_MD_CTX_copy_ex(out, in); | 257 | return EVP_MD_CTX_copy_ex(out, in); |
263 | } | 258 | } |
264 | LCRYPTO_ALIAS(EVP_MD_CTX_copy); | ||
265 | 259 | ||
266 | int | 260 | int |
267 | EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | 261 | EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) |
@@ -324,7 +318,6 @@ EVP_MD_CTX_copy_ex(EVP_MD_CTX *out, const EVP_MD_CTX *in) | |||
324 | 318 | ||
325 | return 1; | 319 | return 1; |
326 | } | 320 | } |
327 | LCRYPTO_ALIAS(EVP_MD_CTX_copy_ex); | ||
328 | 321 | ||
329 | int | 322 | int |
330 | EVP_Digest(const void *data, size_t count, | 323 | EVP_Digest(const void *data, size_t count, |
@@ -342,14 +335,12 @@ EVP_Digest(const void *data, size_t count, | |||
342 | 335 | ||
343 | return ret; | 336 | return ret; |
344 | } | 337 | } |
345 | LCRYPTO_ALIAS(EVP_Digest); | ||
346 | 338 | ||
347 | EVP_MD_CTX * | 339 | EVP_MD_CTX * |
348 | EVP_MD_CTX_new(void) | 340 | EVP_MD_CTX_new(void) |
349 | { | 341 | { |
350 | return calloc(1, sizeof(EVP_MD_CTX)); | 342 | return calloc(1, sizeof(EVP_MD_CTX)); |
351 | } | 343 | } |
352 | LCRYPTO_ALIAS(EVP_MD_CTX_new); | ||
353 | 344 | ||
354 | void | 345 | void |
355 | EVP_MD_CTX_free(EVP_MD_CTX *ctx) | 346 | EVP_MD_CTX_free(EVP_MD_CTX *ctx) |
@@ -361,35 +352,30 @@ EVP_MD_CTX_free(EVP_MD_CTX *ctx) | |||
361 | 352 | ||
362 | free(ctx); | 353 | free(ctx); |
363 | } | 354 | } |
364 | LCRYPTO_ALIAS(EVP_MD_CTX_free); | ||
365 | 355 | ||
366 | void | 356 | void |
367 | EVP_MD_CTX_init(EVP_MD_CTX *ctx) | 357 | EVP_MD_CTX_init(EVP_MD_CTX *ctx) |
368 | { | 358 | { |
369 | memset(ctx, 0, sizeof(*ctx)); | 359 | memset(ctx, 0, sizeof(*ctx)); |
370 | } | 360 | } |
371 | LCRYPTO_ALIAS(EVP_MD_CTX_init); | ||
372 | 361 | ||
373 | int | 362 | int |
374 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) | 363 | EVP_MD_CTX_reset(EVP_MD_CTX *ctx) |
375 | { | 364 | { |
376 | return EVP_MD_CTX_cleanup(ctx); | 365 | return EVP_MD_CTX_cleanup(ctx); |
377 | } | 366 | } |
378 | LCRYPTO_ALIAS(EVP_MD_CTX_reset); | ||
379 | 367 | ||
380 | EVP_MD_CTX * | 368 | EVP_MD_CTX * |
381 | EVP_MD_CTX_create(void) | 369 | EVP_MD_CTX_create(void) |
382 | { | 370 | { |
383 | return EVP_MD_CTX_new(); | 371 | return EVP_MD_CTX_new(); |
384 | } | 372 | } |
385 | LCRYPTO_ALIAS(EVP_MD_CTX_create); | ||
386 | 373 | ||
387 | void | 374 | void |
388 | EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) | 375 | EVP_MD_CTX_destroy(EVP_MD_CTX *ctx) |
389 | { | 376 | { |
390 | EVP_MD_CTX_free(ctx); | 377 | EVP_MD_CTX_free(ctx); |
391 | } | 378 | } |
392 | LCRYPTO_ALIAS(EVP_MD_CTX_destroy); | ||
393 | 379 | ||
394 | /* This call frees resources associated with the context */ | 380 | /* This call frees resources associated with the context */ |
395 | int | 381 | int |
@@ -418,7 +404,6 @@ EVP_MD_CTX_cleanup(EVP_MD_CTX *ctx) | |||
418 | 404 | ||
419 | return 1; | 405 | return 1; |
420 | } | 406 | } |
421 | LCRYPTO_ALIAS(EVP_MD_CTX_cleanup); | ||
422 | 407 | ||
423 | int | 408 | int |
424 | EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) | 409 | EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) |
@@ -442,4 +427,3 @@ EVP_MD_CTX_ctrl(EVP_MD_CTX *ctx, int type, int arg, void *ptr) | |||
442 | } | 427 | } |
443 | return ret; | 428 | return ret; |
444 | } | 429 | } |
445 | LCRYPTO_ALIAS(EVP_MD_CTX_ctrl); | ||