fips140-eval-testing-uapi.h 1.2 KB

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