Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
River2000i committed Dec 20, 2024
1 parent 6dc9d5f commit 1e887f8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions dm/config/security/security.go
Original file line number Diff line number Diff line change
Expand Up @@ -103,15 +103,15 @@ func (s *Security) Clone() *Security {
return &clone
}

func (s *Security) WriteFiles(name string) error {
func (s *Security) WriteFiles(fileName string) error {
var err error
if s.SSLCA, err = certificate.WriteFile(fmt.Sprintf("%s_ca.pem", name), s.SSLCABytes); err != nil {
if s.SSLCA, err = certificate.WriteFile(fileName, s.SSLCABytes); err != nil {
return err
}
if s.SSLCert, err = certificate.WriteFile(fmt.Sprintf("%s_dm.pem", name), s.SSLCertBytes); err != nil {
if s.SSLCert, err = certificate.WriteFile(fileName, s.SSLCertBytes); err != nil {
return err
}
if s.SSLKey, err = certificate.WriteFile(fmt.Sprintf("%s_dm.key", name), s.SSLKeyBytes); err != nil {
if s.SSLKey, err = certificate.WriteFile(fileName, s.SSLKeyBytes); err != nil {
return err
}
return nil
Expand Down

0 comments on commit 1e887f8

Please sign in to comment.