Skip to content

Commit

Permalink
Fix variable shadow bug in push cert API endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
jessepeterson committed Apr 3, 2022
1 parent 2a46dfd commit 3faeabe
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion http/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ func StorePushCertHandlerFunc(storage storage.PushCertStore, logger log.Logger)
switch block.Type {
case "CERTIFICATE":
pemCert = pem.EncodeToMemory(block)
cert, err := x509.ParseCertificate(block.Bytes)
var cert *x509.Certificate
cert, err = x509.ParseCertificate(block.Bytes)
if err == nil {
topic, err = cryptoutil.TopicFromCert(cert)
}
Expand Down

0 comments on commit 3faeabe

Please sign in to comment.