fips: always enable AES in FIPS mode when using madmin (#11732)

This commit adds FIPS-specifc build tags to the madmin
package. When madmin is compiled with `--tags "fips"`
it will always use AES-GCM for encryption - not just
when an optimized AES implementation is available.
This commit is contained in:
Andreas Auernhammer
2021-03-08 19:58:02 +01:00
committed by GitHub
parent 64662a49ff
commit ba6930bb13
3 changed files with 47 additions and 1 deletions

View File

@@ -51,7 +51,7 @@ func EncryptData(password string, data []byte) ([]byte, error) {
err error
stream *sio.Stream
)
if sioutil.NativeAES() { // Only use AES-GCM if we can use an optimized implementation
if useAES() { // Only use AES-GCM if we can use an optimized implementation
id = aesGcm
stream, err = sio.AES_256_GCM.Stream(key)
} else {