Wed, 31 Dec 2014 06:09:35 +0100
Cloned upstream origin tor-browser at tor-browser-31.3.0esr-4.5-1-build1
revision ID fc1c9ff7c1b2defdbc039f12214767608f46423f for hacking purpose.
michael@0 | 1 | /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*- |
michael@0 | 2 | * |
michael@0 | 3 | * This Source Code Form is subject to the terms of the Mozilla Public |
michael@0 | 4 | * License, v. 2.0. If a copy of the MPL was not distributed with this |
michael@0 | 5 | * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ |
michael@0 | 6 | |
michael@0 | 7 | #include "nsISupports.idl" |
michael@0 | 8 | |
michael@0 | 9 | interface nsIArray; |
michael@0 | 10 | interface nsIX509Cert; |
michael@0 | 11 | interface nsISSLStatus; |
michael@0 | 12 | |
michael@0 | 13 | %{C++ |
michael@0 | 14 | #define NS_RECENTBADCERTS_CONTRACTID "@mozilla.org/security/recentbadcerts;1" |
michael@0 | 15 | %} |
michael@0 | 16 | |
michael@0 | 17 | /** |
michael@0 | 18 | * This represents a global list of recently seen bad ssl status |
michael@0 | 19 | * including the bad cert. |
michael@0 | 20 | * The implementation will decide how many entries it will hold, |
michael@0 | 21 | * the number is expected to be small. |
michael@0 | 22 | */ |
michael@0 | 23 | [scriptable, uuid(0fed7784-d152-44d6-95a7-67a59024de0f)] |
michael@0 | 24 | interface nsIRecentBadCerts : nsISupports { |
michael@0 | 25 | /** |
michael@0 | 26 | * Retrieve the recently seen bad ssl status for the given hostname:port. |
michael@0 | 27 | * If no SSL cert was recently seen for the given hostname:port, return null. |
michael@0 | 28 | * If a good cert was seen for the given hostname:port, return null. |
michael@0 | 29 | * |
michael@0 | 30 | * @param aHostNameWithPort The host:port whose entry should be tested |
michael@0 | 31 | * @return null or a recently seen bad ssl status with cert |
michael@0 | 32 | */ |
michael@0 | 33 | nsISSLStatus getRecentBadCert(in AString aHostNameWithPort); |
michael@0 | 34 | |
michael@0 | 35 | /** |
michael@0 | 36 | * A bad certificate that should be remembered by the service. |
michael@0 | 37 | * Will be added as the most recently seen cert. |
michael@0 | 38 | * The service may forget older entries to make room for the new one. |
michael@0 | 39 | * |
michael@0 | 40 | * @param aHostNameWithPort The host:port whose entry should be tested |
michael@0 | 41 | * @param aCert The bad ssl status with certificate |
michael@0 | 42 | */ |
michael@0 | 43 | void addBadCert(in AString aHostNameWithPort, |
michael@0 | 44 | in nsISSLStatus aStatus); |
michael@0 | 45 | |
michael@0 | 46 | /** |
michael@0 | 47 | * Clear all stored cert data. |
michael@0 | 48 | */ |
michael@0 | 49 | void resetStoredCerts(); |
michael@0 | 50 | }; |