^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 1) /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 2)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 3) #ifndef _CRYPTO_FIPS140_EVAL_TESTING_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 4) #define _CRYPTO_FIPS140_EVAL_TESTING_H
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 5)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 6) #include <linux/ioctl.h>
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 7)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 8) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 9) * This header defines the ioctls that are available on the fips140 character
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 10) * device. These ioctls expose some of the module's services to userspace so
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 11) * that they can be tested by the FIPS certification lab; this is a required
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 12) * part of getting a FIPS 140 certification. These ioctls do not have any other
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 13) * purpose, and they do not need to be present in production builds.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 14) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 15)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 16) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 17) * Call the fips140_is_approved_service() function. The argument must be the
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 18) * service name as a NUL-terminated string. The return value will be 1 if
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 19) * fips140_is_approved_service() returned true, or 0 if it returned false.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 20) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 21) #define FIPS140_IOCTL_IS_APPROVED_SERVICE _IO('F', 0)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 22)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 23) /*
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 24) * Call the fips140_module_version() function. The argument must be a pointer
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 25) * to a buffer of size >= 256 chars. The NUL-terminated string returned by
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 26) * fips140_module_version() will be written to this buffer.
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 27) */
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 28) #define FIPS140_IOCTL_MODULE_VERSION _IOR('F', 1, char[256])
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 29)
^8f3ce5b39 (kx 2023-10-28 12:00:06 +0300 30) #endif /* _CRYPTO_FIPS140_EVAL_TESTING_H */