summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/nsSSLStatus.cpp
diff options
context:
space:
mode:
authorwolfbeast <mcwerewolf@gmail.com>2018-06-20 19:11:09 +0200
committerwolfbeast <mcwerewolf@gmail.com>2018-06-20 19:14:58 +0200
commit7d3b69729b68d80e7b301e7e1fd05e68e13cc133 (patch)
treec54c93de5921a6abd0439affbbc878ed9f6e43da /security/manager/ssl/nsSSLStatus.cpp
parent5c0b3b7d3224778c9421f8dcd7f8dd1d09f62675 (diff)
downloadUXP-7d3b69729b68d80e7b301e7e1fd05e68e13cc133.tar
UXP-7d3b69729b68d80e7b301e7e1fd05e68e13cc133.tar.gz
UXP-7d3b69729b68d80e7b301e7e1fd05e68e13cc133.tar.lz
UXP-7d3b69729b68d80e7b301e7e1fd05e68e13cc133.tar.xz
UXP-7d3b69729b68d80e7b301e7e1fd05e68e13cc133.zip
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.
Diffstat (limited to 'security/manager/ssl/nsSSLStatus.cpp')
-rw-r--r--security/manager/ssl/nsSSLStatus.cpp19
1 files changed, 18 insertions, 1 deletions
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;
}