Skip to content

Commit

Permalink
Remove trailing/leading spaces in Certificates (minio#5885)
Browse files Browse the repository at this point in the history
Fixes:  minio#5632
  • Loading branch information
Praveenrajmani authored and nitisht committed May 9, 2018
1 parent deb685c commit 3971483
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cmd/certs.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
package cmd

import (
"bytes"
"crypto"
"crypto/ecdsa"
"crypto/tls"
Expand All @@ -38,6 +39,9 @@ func parsePublicCertFile(certFile string) (x509Certs []*x509.Certificate, err er
return nil, err
}

// Trimming leading and tailing white spaces.
data = bytes.TrimSpace(data)

// Parse all certs in the chain.
current := data
for len(current) > 0 {
Expand Down

0 comments on commit 3971483

Please sign in to comment.