fips: add function to detect if the self tests are running

Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Viktor Dukhovni <viktor@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/26838)
This commit is contained in:
Pauli 2025-02-20 10:41:56 +11:00
parent 92159b48e9
commit e36d00e53b
2 changed files with 28 additions and 0 deletions

21
include/internal/fips.h Normal file
View file

@ -0,0 +1,21 @@
/*
* Copyright 2025 The OpenSSL Project Authors. All Rights Reserved.
*
* Licensed under the Apache License 2.0 (the "License"). You may not use
* this file except in compliance with the License. You can obtain a copy
* in the file LICENSE in the source distribution or at
* https://www.openssl.org/source/license.html
*/
#ifndef OSSL_INTERNAL_FIPS_H
# define OSSL_INTERNAL_FIPS_H
# pragma once
# ifdef FIPS_MODULE
/* Return 1 if the FIPS self tests are running and 0 otherwise */
int ossl_fips_self_testing(void);
# endif /* FIPS_MODULE */
#endif