From: tb Date: Fri, 29 Dec 2023 07:14:02 +0000 (+0000) Subject: Move the EVP_MD_CTX flag accessors up a bit X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=4f60b84558ee024598278d6141922ec447fca311;p=openbsd Move the EVP_MD_CTX flag accessors up a bit This way the accessors are sorted the same way as the struct. --- diff --git a/lib/libcrypto/evp/evp_digest.c b/lib/libcrypto/evp/evp_digest.c index 7c17a09e2ac..0f99cba2686 100644 --- a/lib/libcrypto/evp/evp_digest.c +++ b/lib/libcrypto/evp/evp_digest.c @@ -1,4 +1,4 @@ -/* $OpenBSD: evp_digest.c,v 1.5 2023/12/29 07:09:44 tb Exp $ */ +/* $OpenBSD: evp_digest.c,v 1.6 2023/12/29 07:14:02 tb Exp $ */ /* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) * All rights reserved. * @@ -376,6 +376,24 @@ EVP_MD_CTX_md(const EVP_MD_CTX *ctx) return ctx->digest; } +void +EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) +{ + ctx->flags &= ~flags; +} + +void +EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) +{ + ctx->flags |= flags; +} + +int +EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) +{ + return (ctx->flags & flags); +} + void * EVP_MD_CTX_md_data(const EVP_MD_CTX *ctx) { @@ -411,24 +429,6 @@ EVP_MD_CTX_set_pkey_ctx(EVP_MD_CTX *ctx, EVP_PKEY_CTX *pctx) } } -void -EVP_MD_CTX_set_flags(EVP_MD_CTX *ctx, int flags) -{ - ctx->flags |= flags; -} - -void -EVP_MD_CTX_clear_flags(EVP_MD_CTX *ctx, int flags) -{ - ctx->flags &= ~flags; -} - -int -EVP_MD_CTX_test_flags(const EVP_MD_CTX *ctx, int flags) -{ - return (ctx->flags & flags); -} - int EVP_MD_block_size(const EVP_MD *md) {