Files
palemoon27/netwerk/socket/nsISSLSocketControl.idl
roytam1 3b1d2cdd8a import changes from `dev' branch of rmottola/Arctic-Fox:
- Bug 1171486 - Part 2: Make it OK to call ServiceWorkerManager::GetInstance() during its Init() function; r=baku (c3c7bd78c)
- Bug 1115820 - Add telemetry to ServiceWorkers. r=nsm, r=vladan (9a86f7466)
- Bug 1172717 - Fail on UNKNOWN_APP_ID instead of crashing. r=bholley a=RyanVM (f950a7c59)
- Bug 1154068 - rename relaxed to insecure scheme and add more runtime checks r=hurley (76e8ce41a)
- Bug 1154061 - clear cached alt svc mappings on a variety of state changes r=hurley (9855ee544)
- Bug 1153437 - rename proxyFlags to controlFlags with nsISocketProvider interfaces r=hurley (043a531c8)
- bug 1153212 - 2/2 Necko explicitly track origin vs routed host and give psm only origin r=dkeeler r=hurley IGNORE IDL (d44c3d0e6)
- part of Bug 935838 - Add per app network traffic statistics (d1861cb3d)
- Bug 1109338: Part 1: Separate UDPSocket logging from network logging r=dragana (c2c887b0f)
- Bug 1109338: Part 2: Sharing UDPSocket between PNecko and PBackground r=bent (90b2a09d2)
- Bug 1133189 - Extend PrincipalInfo to handle expanded principals. r=bent, r=sicking (d3269d57e)
- Bug 1155153 - about:serviceworkers should work in e10s mode, r=nsm, r=bholley (90dd0bb4b)
- Bug 1061116 - Make the comparison query/hash insensitive for validity widget. r=fabrice (0969e8404)
- Bug 1167603 - use string to replace nsIURI in aApps.widgetPages. r=fabrice (c528e2615)
- Bug 1087469 - Add support for a start_url property in app manifests r=fabrice (0053f26d6)
- Bug 1168783 - Expose principal in mozIApplication. r=fabrice (2fee4ed8e)
- Bug 1169249 - Unregister service worker registration when uninstalling a service-worker-enabled application. r=baku (c881ee50b)
- Bug 1174381 - ServiceWorkerManager::TeardownRunnable should be called when xpcom-shutdown notification is received, r=nsm (f47d59f19)
- Bug 1167296 - patch 1 - ServiceWorkerManager::RemoveAll should use PBackground, r=nsm (8f8feda13)
- Bug 1167296 - patch 2 - ServiceWorkerManager::Remove should use PBackground, r=nsm (fc931fffc)
2021-02-19 12:19:36 +08:00

141 lines
5.0 KiB
Plaintext

/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "nsISupports.idl"
interface nsIInterfaceRequestor;
interface nsIX509Cert;
%{C++
template<class T> class nsTArray;
class nsCString;
%}
[ref] native nsCStringTArrayRef(nsTArray<nsCString>);
[scriptable, builtinclass, uuid(418265c8-654e-4fbb-ba62-4eed27de1f03)]
interface nsISSLSocketControl : nsISupports {
attribute nsIInterfaceRequestor notificationCallbacks;
void proxyStartSSL();
void StartTLS();
/* NPN (Next Protocol Negotiation) is a mechanism for
negotiating the protocol to be spoken inside the SSL
tunnel during the SSL handshake. The NPNList is the list
of offered client side protocols. setNPNList() needs to
be called before any data is read or written (including the
handshake to be setup correctly. The server determines the
priority when multiple matches occur, but if there is no overlap
the first protocol in the list is used. */
[noscript] void setNPNList(in nsCStringTArrayRef aNPNList);
/* negotiatedNPN is '' if no NPN list was provided by the client,
* or if the server did not select any protocol choice from that
* list. That also includes the case where the server does not
* implement NPN.
*
* If negotiatedNPN is read before NPN has progressed to the point
* where this information is available NS_ERROR_NOT_CONNECTED is
* raised.
*/
readonly attribute ACString negotiatedNPN;
/* For 0RTT we need to know the alpn protocol selected for the last tls
* session. This function will return a value if applicable or an error
* NS_ERROR_NOT_AVAILABLE.
*/
ACString getAlpnEarlySelection();
/* If 0RTT handshake was applied and some data has been sent, as soon as
* the handshake finishes this attribute will be set to appropriate value.
*/
readonly attribute bool earlyDataAccepted;
/* When 0RTT is performed, PR_Write will not drive the handshake forward.
* It must be forced by calling this function.
*/
void driveHandshake();
/* Determine if a potential SSL connection to hostname:port with
* a desired NPN negotiated protocol of npnProtocol can use the socket
* associated with this object instead of making a new one.
*/
boolean joinConnection(
in ACString npnProtocol, /* e.g. "spdy/2" */
in ACString hostname,
in long port);
/* Determine if existing connection should be trusted to convey information about
* a hostname.
*/
boolean isAcceptableForHost(in ACString hostname);
/* The Key Exchange Algorithm is used when determining whether or
not HTTP/2 can be used.
After a handshake is complete it can be read from KEAUsed.
The values correspond to the SSLKEAType enum in NSS or the
KEY_EXCHANGE_UNKNOWN constant defined below.
KEAKeyBits is the size/security-level used for the KEA.
*/
[infallible] readonly attribute short KEAUsed;
[infallible] readonly attribute unsigned long KEAKeyBits;
const short KEY_EXCHANGE_UNKNOWN = -1;
/*
* The original flags from the socket provider.
*/
readonly attribute uint32_t providerFlags;
/* These values are defined by TLS. */
const short SSL_VERSION_3 = 0x0300;
const short TLS_VERSION_1 = 0x0301;
const short TLS_VERSION_1_1 = 0x0302;
const short TLS_VERSION_1_2 = 0x0303;
const short TLS_VERSION_1_3 = 0x0304;
const short SSL_VERSION_UNKNOWN = -1;
[infallible] readonly attribute short SSLVersionUsed;
[infallible] readonly attribute short SSLVersionOffered;
/* These values match the NSS defined values in sslt.h */
const short SSL_MAC_UNKNOWN = -1;
const short SSL_MAC_NULL = 0;
const short SSL_MAC_MD5 = 1;
const short SSL_MAC_SHA = 2;
const short SSL_HMAC_MD5 = 3;
const short SSL_HMAC_SHA = 4;
const short SSL_HMAC_SHA256 = 5;
const short SSL_MAC_AEAD = 6;
[infallible] readonly attribute short MACAlgorithmUsed;
/**
* If set before the server requests a client cert (assuming it does so at
* all), then this cert will be presented to the server, instead of asking
* the user or searching the set of rememebered user cert decisions.
*/
attribute nsIX509Cert clientCert;
/**
* bypassAuthentication is true if the server certificate checks are
* not be enforced. This is to enable non-secure transport over TLS.
*/
[infallible] readonly attribute boolean bypassAuthentication;
/*
* failedVerification is true if any enforced certificate checks have failed.
* Connections that have not yet tried to verify, have verifications bypassed,
* or are using acceptable exceptions will all return false.
*/
[infallible] readonly attribute boolean failedVerification;
};