summaryrefslogtreecommitdiffstats
path: root/security/manager/ssl/nsSSLStatus.cpp
diff options
context:
space:
mode:
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;
}