mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-05 07:18:39 +09:00
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
This commit is contained in:
parent
f92a4b1c8a
commit
38e95f9e35
13 changed files with 258 additions and 15 deletions
|
|
@ -76,6 +76,28 @@ nsSSLStatus::GetCipherName(nsACString& aCipherName)
|
|||
return NS_OK;
|
||||
}
|
||||
|
||||
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)
|
||||
{
|
||||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue