Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@

### Chrome CT Policy Update
* #906: Update chromepolicy.go to follow the updated Chrome CT policy.


### Misc
* #1059: Escape forward slashes in certificate Subject names when used as user quota id strings.

## v1.1.6

## Dependency update
Expand All @@ -29,7 +32,7 @@

* Remove v2 log list package files.

### Misc
### Misc

* Updated golangci-lint to v1.51.1 (developers should update to this version).
* Bump Go version from 1.17 to 1.19.
Expand Down
3 changes: 2 additions & 1 deletion trillian/ctfe/cert_quota.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"crypto/sha256"
"encoding/hex"
"fmt"
"strings"

"github.com/google/certificate-transparency-go/x509"
)
Expand All @@ -38,5 +39,5 @@ const CertificateQuotaUserPrefix = "@intermediate"
// See tests for examples.
func QuotaUserForCert(c *x509.Certificate) string {
spkiHash := sha256.Sum256(c.RawSubjectPublicKeyInfo)
return fmt.Sprintf("%s %s %s", CertificateQuotaUserPrefix, c.Subject.String(), hex.EncodeToString(spkiHash[0:5]))
return fmt.Sprintf("%s %s %s", CertificateQuotaUserPrefix, strings.ReplaceAll(c.Subject.String(), "/", "%2F"), hex.EncodeToString(spkiHash[0:5]))
}