Fix SSL status ambiguity.

- Adds CipherSuite string with the full suite
- Changes CipherName to be the actual cipher name instead of the (erroneous) full suite like Firefox does.
This commit is contained in:
wolfbeast committed 2018-06-20 19:14:58 +02:00
1 parent 73738dc3c6
commit a00a8b05f0
7 files changed
+45 -9

No files matched your search

+18 -1
View File
@@ -72,7 +72,24 @@ nsSSLStatus::GetCipherName(nsACString& aCipherName)
return NS_ERROR_FAILURE;
}
aCipherName.Assign(cipherInfo.cipherSuiteName);
aCipherName.Assign(cipherInfo.symCipherName);
return NS_OK;
}
NS_IMETHODIMP
nsSSLStatus::GetCipherSuite(nsACString& aCipherSuite)
{
if (!mHaveCipherSuiteAndProtocol) {
return NS_ERROR_NOT_AVAILABLE;
}
SSLCipherSuiteInfo cipherInfo;
if (SSL_GetCipherSuiteInfo(mCipherSuite, &cipherInfo,
sizeof(cipherInfo)) != SECSuccess) {
return NS_ERROR_FAILURE;
}
aCipherSuite.Assign(cipherInfo.cipherSuiteName);
return NS_OK;
}