mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-04-05 20:52:50 +08:00
fix: s3 command ignore -tlsVerifyClientCert and -cacert.file arguments (#6547)
s3 command ignore tlsVerifyClientCert and cacert.file arguments from command line. On startS3Server instead of use real values (in s3opt), default values (from s3Options, always empty) are checked. Now on right values are checked and if user provide this arguments RequireAndVerifyClientCert is set and/or ca certificate is loaded.
This commit is contained in:
parent
903d288e08
commit
441614b386
@ -312,7 +312,7 @@ func (s3opt *S3Options) startS3Server() bool {
|
||||
}
|
||||
|
||||
caCertPool := x509.NewCertPool()
|
||||
if *s3Options.tlsCACertificate != "" {
|
||||
if *s3opt.tlsCACertificate != "" {
|
||||
// load CA certificate file and add it to list of client CAs
|
||||
caCertFile, err := ioutil.ReadFile(*s3opt.tlsCACertificate)
|
||||
if err != nil {
|
||||
@ -322,7 +322,7 @@ func (s3opt *S3Options) startS3Server() bool {
|
||||
}
|
||||
|
||||
clientAuth := tls.NoClientCert
|
||||
if *s3Options.tlsVerifyClientCert {
|
||||
if *s3opt.tlsVerifyClientCert {
|
||||
clientAuth = tls.RequireAndVerifyClientCert
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user