You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

67 lines
2.6 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. David Acker has patched socat to add OpenSSL FIPS.
  2. See http://oss-institute.org/fips-faq.html and
  3. http://linuxdevices.com/news/NS4742716157.html for more information.
  4. The patch that is integrated into socat 1.5 does the following:
  5. Add support for LDFLAGS in Makefile. LDFLAGS can be specified on the
  6. configure command line and then will be carried over into the make.
  7. Add fips support. Requires OpenSSL 0.9.7j-fips-dev from
  8. http://www.openssl.org/source/OpenSSL-fips-1.0.tar.gz built with fips
  9. support turned on. use ./Configure fips [os-arc], for example
  10. ./Configure fips linux-pentium
  11. The LDFLAGS is needed to point a build against a library
  12. located in a non-standard location. For example, if you download and
  13. build openssl manually, it gets installed in /usr/local/ssl by default.
  14. The FIPS support patches involve adding an option to enable/disable fips
  15. in configure (enabled by default), checking the system for FIPS support
  16. during configure, and then adding a fips option to socats openssl address
  17. to turn on fips mode. The openssl binary uses an environment variable
  18. instead of a command line flag.
  19. FIPS mode requires both a compile time flag of OPENSSL_FIPS and a
  20. runtime call of FIPS_mode_set(1). Fips mode requires building with the
  21. fipsld script provided by OpenSSL. FIPS tracks the pid of the process that
  22. initializes things so after a fork, the child must reinitialize. When the
  23. ssl code detects a forks occur and if FIPS mode was enabled, it reinitializes
  24. FIPS by disabling and then enabling it again.
  25. To produce Davids enviroment, do the following:
  26. To build openssl
  27. download OpenSSL 0.9.7j-fips-dev from
  28. http://www.openssl.org/source/OpenSSL-fips-1.0.tar.gz
  29. tar xzf OpenSSL-fips-1.0.tar.gz
  30. cd openssl
  31. ./Configure fips linux-pentium
  32. make
  33. make test
  34. (become root)
  35. make install
  36. This leaves an install in /usr/local/ssl
  37. To build socat:
  38. setup directory with socat 1.5 or higher.
  39. cd socat-1.5.0.0
  40. ./configure CPPFLAGS=-I/usr/local/ssl/include/ LDFLAGS=-L/usr/local/ssl/lib/ FIPSLD=/usr/local/ssl/bin/fipsld
  41. make
  42. (become root)
  43. make install
  44. To run tests we make sure the new openssl is used:
  45. export PATH=/usr/local/ssl/bin:$PATH
  46. ./test.sh fips
  47. There are two tests in test.sh that depend on fips:
  48. OPENSSL_FIPS_BOTHAUTH performs a SSL client to server connection with
  49. certificate based authentication in both directions. If it works FIPS mode
  50. seems to be ok.
  51. OPENSSL_FIPS_SECURITY generates a certificaet/key pair without fips support. It
  52. then tries a SSL connection in "normal" mode which is expected to work. In the
  53. second phase it uses fips mode with these credentials which is expected to
  54. fail. If so, the test succeeded.