Skip to content

Commit

Permalink
Implement workaround for #26 and detect RSA key exchange
Browse files Browse the repository at this point in the history
  • Loading branch information
jannispinter committed Jan 28, 2020
1 parent 0ef7d12 commit d429bb7
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions popup/popup-primary.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,9 +42,17 @@ async function updateProtocolDetails(securityInfo, hostname) {
textCipherSuiteAead.style.color = 'green';
} else {
textCipherSuiteAead.textContent = browser.i18n.getMessage('no');
textCipherSuiteAead.style.color = 'orange';
}

const textKeyExchange = document.getElementById('popup-primary-kex');
if(securityInfo.keaGroupName == undefined && securityInfo.cipherSuite.includes('TLS_RSA_')) {
textKeyExchange.textContent = 'RSA';
textKeyExchange.style.color = 'orange';
} else {
textKeyExchange.textContent = securityInfo.keaGroupName == undefined ? "N/A" : securityInfo.keaGroupName;
}

document.getElementById('popup-primary-kex').textContent = securityInfo.keaGroupName == undefined ? "N/A" : securityInfo.keaGroupName;
document.getElementById('popup-primary-signature').textContent = securityInfo.signatureSchemeName == undefined ? "N/A" : securityInfo.signatureSchemeName;
if(securityInfo.signatureSchemeName != undefined && securityInfo.signatureSchemeName.includes('PKCS1')) {
document.getElementById('popup-primary-signature').style.color = 'orange';
Expand All @@ -57,7 +65,9 @@ async function updateProtocolDetails(securityInfo, hostname) {
}

const textPFS = document.getElementById('popup-primary-pfs');
if(securityInfo.keaGroupName != undefined && securityInfo.keaGroupName != 'RSA') {
if((securityInfo.keaGroupName != undefined && securityInfo.keaGroupName != 'RSA')
|| (securityInfo.cipherSuite != undefined && (securityInfo.cipherSuite.includes('_DHE_') || securityInfo.cipherSuite.includes('_ECDHE_')))
|| securityInfo.protocolVersion === 'TLSv1.3') {
textPFS.textContent = browser.i18n.getMessage('yes');
textPFS.style.color = 'green';
} else {
Expand Down

0 comments on commit d429bb7

Please sign in to comment.