diff options
author | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 09:02:37 +0100 |
---|---|---|
committer | janekptacijarabaci <janekptacijarabaci@seznam.cz> | 2018-03-01 09:02:37 +0100 |
commit | 228d252ab14f65f8433c8d53122a7d1e9429c23e (patch) | |
tree | 0a2d13e0d46b5400b9a2d06e72b63e3c71fbc23a /security/manager/ssl/nsSSLStatus.cpp | |
parent | 46ecf68249ec70bbd68b57f92f9d48e5c95636b7 (diff) | |
download | uxp-228d252ab14f65f8433c8d53122a7d1e9429c23e.tar.gz |
DevTools - network - security (improvements)
https://github.com/MoonchildProductions/moebius/pull/113
https://github.com/MoonchildProductions/moebius/pull/118
https://github.com/MoonchildProductions/moebius/pull/127
Diffstat (limited to 'security/manager/ssl/nsSSLStatus.cpp')
-rw-r--r-- | security/manager/ssl/nsSSLStatus.cpp | 42 |
1 files changed, 41 insertions, 1 deletions
diff --git a/security/manager/ssl/nsSSLStatus.cpp b/security/manager/ssl/nsSSLStatus.cpp index 1538b2aa7d..7f9915cb2a 100644 --- a/security/manager/ssl/nsSSLStatus.cpp +++ b/security/manager/ssl/nsSSLStatus.cpp @@ -77,6 +77,28 @@ nsSSLStatus::GetCipherName(nsACString& aCipherName) } NS_IMETHODIMP +nsSSLStatus::GetKeaGroupName(nsACString& aKeaGroup) +{ + if (!mHaveCipherSuiteAndProtocol) { + return NS_ERROR_NOT_AVAILABLE; + } + + aKeaGroup.Assign(mKeaGroup); + return NS_OK; +} + +NS_IMETHODIMP +nsSSLStatus::GetSignatureSchemeName(nsACString& aSignatureScheme) +{ + if (!mHaveCipherSuiteAndProtocol) { + return NS_ERROR_NOT_AVAILABLE; + } + + aSignatureScheme.Assign(mSignatureSchemeName); + return NS_OK; +} + +NS_IMETHODIMP nsSSLStatus::GetProtocolVersion(uint16_t* aProtocolVersion) { NS_ENSURE_ARG_POINTER(aProtocolVersion); @@ -194,6 +216,15 @@ nsSSLStatus::Read(nsIObjectInputStream* aStream) NS_ENSURE_SUCCESS(rv, rv); } + // Added in version 2 (see bug 1304923). + if (streamFormatVersion >= 2) { + rv = aStream->ReadCString(mKeaGroup); + NS_ENSURE_SUCCESS(rv, rv); + + rv = aStream->ReadCString(mSignatureSchemeName); + NS_ENSURE_SUCCESS(rv, rv); + } + return NS_OK; } @@ -201,7 +232,7 @@ NS_IMETHODIMP nsSSLStatus::Write(nsIObjectOutputStream* aStream) { // The current version of the binary stream format. - const uint8_t STREAM_FORMAT_VERSION = 1; + const uint8_t STREAM_FORMAT_VERSION = 2; nsresult rv = aStream->WriteCompoundObject(mServerCert, NS_GET_IID(nsIX509Cert), @@ -237,6 +268,13 @@ nsSSLStatus::Write(nsIObjectOutputStream* aStream) rv = aStream->Write16(mCertificateTransparencyStatus); NS_ENSURE_SUCCESS(rv, rv); + // Added in version 2. + rv = aStream->WriteStringZ(mKeaGroup.get()); + NS_ENSURE_SUCCESS(rv, rv); + + rv = aStream->WriteStringZ(mSignatureSchemeName.get()); + NS_ENSURE_SUCCESS(rv, rv); + return NS_OK; } @@ -300,6 +338,8 @@ nsSSLStatus::nsSSLStatus() , mProtocolVersion(0) , mCertificateTransparencyStatus(nsISSLStatus:: CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE) +, mKeaGroup() +, mSignatureSchemeName() , mIsDomainMismatch(false) , mIsNotValidAtThisTime(false) , mIsUntrusted(false) |