Add common validation for compression and encryption (#7978)

This commit is contained in:
Harshavardhana
2019-07-26 02:41:16 -07:00
committed by GitHub
parent efb8b00db0
commit 007a52b546
3 changed files with 29 additions and 18 deletions

View File

@@ -19,7 +19,6 @@ package cmd
import (
"context"
"encoding/gob"
"errors"
"fmt"
"net/http"
"os"
@@ -380,9 +379,11 @@ func serverMain(ctx *cli.Context) {
if err = globalNotificationSys.Init(newObject); err != nil {
logger.LogIf(context.Background(), err)
}
if globalAutoEncryption && !newObject.IsEncryptionSupported() {
logger.Fatal(errors.New("Invalid KMS configuration"), "auto-encryption is enabled but server does not support encryption")
}
// Verify if object layer supports
// - encryption
// - compression
verifyObjectLayerFeatures("server", newObject)
if globalIsXL {
initBackgroundHealing()