diff options
author | Vladimir Shushlin <vshushlin@gitlab.com> | 2022-04-04 15:22:51 +0300 |
---|---|---|
committer | Vladimir Shushlin <vshushlin@gitlab.com> | 2022-04-04 15:22:51 +0300 |
commit | 8b79c056065c776fef0da08bf4a3de6e4da99aad (patch) | |
tree | 297d92f55e53a3689c6a656d0fad71c615cd8348 /internal | |
parent | e1f1effa23c520d3b8b717d831ccab7ba3dd494f (diff) | |
parent | 9fdda41eedbcb91c1d06c01d72f9d915934735b7 (diff) |
Merge branch 'build-fips' into 'master'
Add FIPS support
See merge request gitlab-org/gitlab-pages!716
Diffstat (limited to 'internal')
-rw-r--r-- | internal/boring/boring.go | 18 | ||||
-rw-r--r-- | internal/boring/notboring.go | 7 |
2 files changed, 25 insertions, 0 deletions
diff --git a/internal/boring/boring.go b/internal/boring/boring.go new file mode 100644 index 00000000..0a59ec4a --- /dev/null +++ b/internal/boring/boring.go @@ -0,0 +1,18 @@ +//go:build boringcrypto +// +build boringcrypto + +package boring + +import ( + "crypto/boring" + + "gitlab.com/gitlab-org/labkit/log" +) + +func CheckBoring() { + if boring.Enabled() { + log.Info("FIPS mode is enabled. Using BoringSSL.") + return + } + log.Info("GitLab Pages was compiled with FIPS mode but BoringSSL is not enabled.") +} diff --git a/internal/boring/notboring.go b/internal/boring/notboring.go new file mode 100644 index 00000000..6dbf3c39 --- /dev/null +++ b/internal/boring/notboring.go @@ -0,0 +1,7 @@ +//go:build !boringcrypto +// +build !boringcrypto + +package boring + +func CheckBoring() { +} |