storj.io/minio@v0.0.0-20230509071714-0cbc90f649b1/pkg/fips/fips.go (about) 1 //go:build fips 2 // +build fips 3 4 // MinIO Cloud Storage, (C) 2021 MinIO, Inc. 5 // 6 // Licensed under the Apache License, Version 2.0 (the "License"); 7 // you may not use this file except in compliance with the License. 8 // You may obtain a copy of the License at 9 // 10 // http://www.apache.org/licenses/LICENSE-2.0 11 // 12 // Unless required by applicable law or agreed to in writing, software 13 // distributed under the License is distributed on an "AS IS" BASIS, 14 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 15 // See the License for the specific language governing permissions and 16 // limitations under the License. 17 18 package fips 19 20 import ( 21 "crypto/tls" 22 23 "github.com/minio/sio" 24 ) 25 26 var enabled = true 27 28 func cipherSuitesDARE() []byte { 29 return []byte{sio.AES_256_GCM} 30 } 31 32 func cipherSuitesTLS() []uint16 { 33 return []uint16{ 34 tls.TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, 35 tls.TLS_ECDHE_ECDSA_WITH_AES_128_GCM_SHA256, 36 tls.TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384, 37 tls.TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384, 38 } 39 } 40 41 func ellipticCurvesTLS() []tls.CurveID { 42 return []tls.CurveID{tls.CurveP256} 43 }