Skip to content
This repository has been archived by the owner on Dec 11, 2019. It is now read-only.

Commit

Permalink
Handle cert fingerprints that contain '/'
Browse files Browse the repository at this point in the history
The cert fingerprint emitted by Muon/Electron is base64 encoded [1], so it may contain '/'. I think we were truncating the certificate fingerprint when this was the case, which may have caused the decoding error in #6524.

[1] https://cs.chromium.org/chromium/src/net/base/hash_value.h?q=net::HashValue&sq=package:chromium&l=58

Auditors: @darkdh
  • Loading branch information
diracdeltas authored and bsclifton committed Jan 17, 2017
1 parent 53e6100 commit afc6741
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion js/about/certerror.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,14 +57,16 @@ class CertErrorPage extends React.Component {
var validExpiry = new Date()
validStart.setTime(detail.validStart * 1000)
validExpiry.setTime(detail.validExpiry * 1000)
var fingerprint = detail.fingerprint.split('/')
var algorithm = fingerprint.shift()
this.setState({
certDetail: true,
certIssuerName: detail.issuerName,
certSubjectName: detail.subjectName,
certSerialNumber: seperateHex(detail.serialNumber),
certValidStart: validStart.toString(),
certValidExpiry: validExpiry.toString(),
certFingerprint: detail.fingerprint.split('/')
certFingerprint: [algorithm, fingerprint.join('/')]
})
})
}
Expand Down

0 comments on commit afc6741

Please sign in to comment.