Bug 1580557 - Remove nsISSLSocketControl.serverRootCertIsBuiltInRoot. r=keeler

Differential Revision: https://phabricator.services.mozilla.com/D45988

--HG--
extra : moz-landing-system : lando
This commit is contained in:
Dragana Damjanovic 2019-09-16 18:22:20 +00:00
parent d757112ea7
commit a8b9f215c0
3 changed files with 0 additions and 39 deletions

View File

@ -318,12 +318,6 @@ FuzzySecurityInfo::SetEsniTxt(const nsACString& aEsniTxt) {
return NS_OK;
}
NS_IMETHODIMP
FuzzySecurityInfo::GetServerRootCertIsBuiltInRoot(bool* aIsBuiltInRoot) {
*aIsBuiltInRoot = true;
return NS_OK;
}
void FuzzySecurityInfo::SerializeToIPC(IPC::Message* aMsg) {
MOZ_CRASH("Unused");
}

View File

@ -162,12 +162,6 @@ interface nsISSLSocketControl : nsISupports {
*/
attribute ACString esniTxt;
/**
* If the server certificate is present, serverCertIsBuiltInRoot is true if
* the root certificate for the server certificate is built in.
*/
readonly attribute boolean serverRootCertIsBuiltInRoot;
/**
* True iff the connection was resumed using the resumption token.
*/

View File

@ -887,33 +887,6 @@ nsNSSSocketInfo::SetEsniTxt(const nsACString& aEsniTxt) {
return NS_OK;
}
NS_IMETHODIMP
nsNSSSocketInfo::GetServerRootCertIsBuiltInRoot(bool* aIsBuiltInRoot) {
*aIsBuiltInRoot = false;
if (!HasServerCert()) {
return NS_ERROR_NOT_AVAILABLE;
}
nsCOMPtr<nsIX509CertList> certList;
nsresult rv = GetSucceededCertChain(getter_AddRefs(certList));
if (NS_SUCCEEDED(rv)) {
if (!certList) {
return NS_ERROR_NOT_AVAILABLE;
}
RefPtr<nsNSSCertList> nssCertList = certList->GetCertList();
nsCOMPtr<nsIX509Cert> cert;
rv = nssCertList->GetRootCertificate(cert);
if (NS_SUCCEEDED(rv)) {
if (!cert) {
return NS_ERROR_NOT_AVAILABLE;
}
rv = cert->GetIsBuiltInRoot(aIsBuiltInRoot);
}
}
return rv;
}
#if defined(DEBUG_SSL_VERBOSE) && defined(DUMP_BUFFER)
// Dumps a (potentially binary) buffer using SSM_DEBUG. (We could have used
// the version in ssltrace.c, but that's specifically tailored to SSLTRACE.)