config: enforce AES-GCM in FIPS mode (#12265)

This commit enforces the usage of AES-256
for config and IAM data en/decryption in FIPS
mode.

Further, it improves the implementation of
`fips.Enabled` by making it a compile time
constant. Now, the compiler is able to evaluate
the any `if fips.Enabled { ... }` at compile time
and eliminate unused code.

Signed-off-by: Andreas Auernhammer <aead@mail.de>
This commit is contained in:
Andreas Auernhammer authored and GitHub committed 2021-05-10 08:24:11 -07:00
1 parent 2d79d6d847
commit c03a06cca8
5 files changed
+18 -13

No files matched your search

+3 -1
View File
@@ -15,6 +15,8 @@
// You should have received a copy of the GNU Affero General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
// +build !fips
package fips
import (
@@ -23,7 +25,7 @@ import (
"github.com/minio/sio"
)
var enabled = false
const enabled = false
func cipherSuitesDARE() []byte {
return []byte{sio.AES_256_GCM, sio.CHACHA20_POLY1305}