From c5795a328880eadb879088fc59cd0087edc8dc20 Mon Sep 17 00:00:00 2001 From: Adam Langley Date: Mon, 28 Apr 2025 16:10:45 -0700 Subject: [PATCH] Note a couple of typoed struct names that we'll leave alone. Change-Id: I4f0774c8c986eb7b2c464b6ecc72c8b6aa00b350 Reviewed-on: https://boringssl-review.googlesource.com/c/boringssl/+/78870 Auto-Submit: Adam Langley Reviewed-by: David Benjamin Commit-Queue: David Benjamin --- crypto/fipsmodule/digest/internal.h | 6 ++++-- include/openssl/digest.h | 5 ++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/crypto/fipsmodule/digest/internal.h b/crypto/fipsmodule/digest/internal.h index 0e850c9ef..dca8e2c88 100644 --- a/crypto/fipsmodule/digest/internal.h +++ b/crypto/fipsmodule/digest/internal.h @@ -22,6 +22,8 @@ extern "C" { #endif +// env_md_st is typoed ("evp" -> "env"), but the typo comes from OpenSSL and +// some consumers forward-declare these structures so we're leaving it alone. struct env_md_st { // type contains a NID identifing the digest function. (For example, // NID_md5.) @@ -55,11 +57,11 @@ struct env_md_st { struct evp_md_pctx_ops { // free is called when an |EVP_MD_CTX| is being freed and the |pctx| also // needs to be freed. - void (*free) (EVP_PKEY_CTX *pctx); + void (*free)(EVP_PKEY_CTX *pctx); // dup is called when an |EVP_MD_CTX| is copied and so the |pctx| also needs // to be copied. - EVP_PKEY_CTX* (*dup) (EVP_PKEY_CTX *pctx); + EVP_PKEY_CTX *(*dup)(EVP_PKEY_CTX *pctx); }; diff --git a/include/openssl/digest.h b/include/openssl/digest.h index 6abab7693..b5f76c34e 100644 --- a/include/openssl/digest.h +++ b/include/openssl/digest.h @@ -15,7 +15,7 @@ #ifndef OPENSSL_HEADER_DIGEST_H #define OPENSSL_HEADER_DIGEST_H -#include // IWYU pragma: export +#include // IWYU pragma: export #if defined(__cplusplus) extern "C" { @@ -285,6 +285,9 @@ OPENSSL_EXPORT int EVP_MD_nid(const EVP_MD *md); struct evp_md_pctx_ops; +// env_md_ctx_st is typoed ("evp" -> "env"), but the typo comes from OpenSSL +// and some consumers forward-declare these structures so we're leaving it +// alone. struct env_md_ctx_st { // digest is the underlying digest function, or NULL if not set. const EVP_MD *digest;