Commit 97609cb854 for openssl.org
commit 97609cb854db7460daf36d2cfb69fb563f40edaa
Author: Bob Beck <beck@openssl.org>
Date: Mon Apr 27 12:25:45 2026 -0600
Add missing header guards in apps
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
MergeDate: Wed May 6 11:35:51 2026
(Merged from https://github.com/openssl/openssl/pull/31001)
diff --git a/apps/include/app_params.h b/apps/include/app_params.h
index 20caf737d4..5c8d22ced9 100644
--- a/apps/include/app_params.h
+++ b/apps/include/app_params.h
@@ -7,7 +7,12 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_APPS_INCLUDE_APP_PARAMS_H)
+#define OSSL_APPS_INCLUDE_APP_PARAMS_H
+
#include <openssl/core.h>
int print_param_types(const char *thing, const OSSL_PARAM *pdefs, int indent);
void print_param_value(const OSSL_PARAM *p, int indent);
+
+#endif /* !defined(OSSL_APPS_INCLUDE_APP_PARAMS_H) */
diff --git a/apps/include/names.h b/apps/include/names.h
index bf47459ade..a5d78de677 100644
--- a/apps/include/names.h
+++ b/apps/include/names.h
@@ -7,6 +7,9 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_APPS_INCLUDE_NAMES_H)
+#define OSSL_APPS_INCLUDE_NAMES_H
+
#include <openssl/safestack.h>
/* Standard comparing function for names */
@@ -15,3 +18,5 @@ int name_cmp(const char *const *a, const char *const *b);
void collect_names(const char *name, void *vdata);
/* Sorts and prints a stack of names to |out| */
void print_names(BIO *out, STACK_OF(OPENSSL_CSTRING) *names);
+
+#endif /* !defined(OSSL_APPS_INCLUDE_NAMES_H) */
diff --git a/apps/include/s_apps.h b/apps/include/s_apps.h
index c6a9a890c2..6432a2032a 100644
--- a/apps/include/s_apps.h
+++ b/apps/include/s_apps.h
@@ -7,6 +7,9 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_APPS_INCLUDE_S_APPS_H)
+#define OSSL_APPS_INCLUDE_S_APPS_H
+
#include <openssl/opensslconf.h>
#include <openssl/ssl.h>
@@ -112,3 +115,5 @@ int set_up_srp_verifier_file(SSL_CTX *ctx, srpsrvparm *srp_callback_parm,
char *srpuserseed, char *srp_verifier_file);
void lookup_srp_user(srpsrvparm *srp_callback_parm, BIO *bio_s_out);
#endif /* OPENSSL_NO_SRP */
+
+#endif /* !defined(OSSL_APPS_INCLUDE_S_APPS_H) */
diff --git a/apps/testdsa.h b/apps/testdsa.h
index e8d04bb31e..59c4bc4da2 100644
--- a/apps/testdsa.h
+++ b/apps/testdsa.h
@@ -7,6 +7,9 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_APPS_TESTDSA_H)
+#define OSSL_APPS_TESTDSA_H
+
#include <openssl/param_build.h>
/* used by speed.c */
@@ -1497,3 +1500,5 @@ err:
EVP_PKEY_CTX_free(pctx);
return pkey;
}
+
+#endif /* !defined(OSSL_APPS_TESTDSA_H) */
diff --git a/apps/testrsa.h b/apps/testrsa.h
index db9221e8aa..351f88b4c6 100644
--- a/apps/testrsa.h
+++ b/apps/testrsa.h
@@ -7,6 +7,9 @@
* https://www.openssl.org/source/license.html
*/
+#if !defined(OSSL_APPS_TESTRSA_H)
+#define OSSL_APPS_TESTRSA_H
+
static unsigned char test512[] = {
0x30,
0x82,
@@ -5976,3 +5979,5 @@ static unsigned char test15360[] = {
0x91, 0x29, 0x6e, 0x08, 0x37, 0xd6, 0xaa, 0xd2, 0xf8, 0x4f,
0x5e, 0x00, 0x16, 0x52
};
+
+#endif /* !defined(OSSL_APPS_TESTRSA_H) */