summaryrefslogtreecommitdiff
path: root/src/lib/libcrypto
diff options
context:
space:
mode:
authortb <>2023-12-29 07:14:02 +0000
committertb <>2023-12-29 07:14:02 +0000
commit703a26b0064ec7a8714dacd096043f3df18c667f (patch)
tree91b0f0e8476f03b6aa2e3b696737d2b277a9fe1d /src/lib/libcrypto
parent49bdd006c34b7427173db8e17bc4c93ee919d4d4 (diff)
downloadopenbsd-703a26b0064ec7a8714dacd096043f3df18c667f.tar.gz
openbsd-703a26b0064ec7a8714dacd096043f3df18c667f.tar.bz2
openbsd-703a26b0064ec7a8714dacd096043f3df18c667f.zip
Move the EVP_MD_CTX flag accessors up a bit
This way the accessors are sorted the same way as the struct.
Diffstat (limited to 'src/lib/libcrypto')
-rw-r--r--src/lib/libcrypto/evp/evp_digest.c38
1 files changed, 19 insertions, 19 deletions
diff --git a/src/lib/libcrypto/evp/evp_digest.c b/src/lib/libcrypto/evp/evp_digest.c
index 7c17a09e2a..0f99cba268 100644
--- a/src/lib/libcrypto/evp/evp_digest.c
+++ b/src/lib/libcrypto/evp/evp_digest.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: evp_digest.c,v 1.5 2023/12/29 07:09:44 tb Exp $ */ 1/* $OpenBSD: evp_digest.c,v 1.6 2023/12/29 07:14:02 tb 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 *
@@ -376,6 +376,24 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx)
376 return ctx->digest; 376 return ctx->digest;
377} 377}
378 378
379void
380EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags)
381{
382 ctx->flags &= ~flags;
383}
384
385void
386EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags)
387{
388 ctx->flags |= flags;
389}
390
391int
392EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
393{
394 return (ctx->flags & flags);
395}
396
379void * 397void *
380EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) 398EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx)
381{ 399{
@@ -411,24 +429,6 @@ EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx)
411 } 429 }
412} 430}
413 431
414void
415EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags)
416{
417 ctx->flags |= flags;
418}
419
420void
421EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags)
422{
423 ctx->flags &= ~flags;
424}
425
426int
427EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags)
428{
429 return (ctx->flags & flags);
430}
431
432int 432int
433EVP_MD_block_size(const EVP_MD *md) 433EVP_MD_block_size(const EVP_MD *md)
434{ 434{