From 7d3b69729b68d80e7b301e7e1fd05e68e13cc133 Mon Sep 17 00:00:00 2001 From: wolfbeast Date: Wed, 20 Jun 2018 19:11:09 +0200 Subject: 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. --- security/manager/ssl/nsSSLStatus.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'security/manager/ssl/nsSSLStatus.cpp') diff --git a/security/manager/ssl/nsSSLStatus.cpp b/security/manager/ssl/nsSSLStatus.cpp index 7f9915cb2..b2453d271 100644 --- a/security/manager/ssl/nsSSLStatus.cpp +++ b/security/manager/ssl/nsSSLStatus.cpp @@ -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; } -- cgit v1.2.3