2007-03-22 10:30:00 -07:00
|
|
|
/* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
|
|
|
|
*
|
2012-05-21 04:12:37 -07:00
|
|
|
* 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/. */
|
2007-03-22 10:30:00 -07:00
|
|
|
|
|
|
|
#include "nsISupports.idl"
|
|
|
|
|
|
|
|
interface nsIInterfaceRequestor;
|
|
|
|
|
2011-12-13 07:55:50 -08:00
|
|
|
%{C++
|
2013-09-22 20:35:05 -07:00
|
|
|
template<class T> class nsTArray;
|
2011-12-13 07:55:50 -08:00
|
|
|
class nsCString;
|
|
|
|
%}
|
|
|
|
[ref] native nsCStringTArrayRef(nsTArray<nsCString>);
|
|
|
|
|
2014-05-06 14:22:25 -07:00
|
|
|
[scriptable, builtinclass, uuid(ec72446c-8241-457f-ba75-83d214392289)]
|
2007-03-22 10:30:00 -07:00
|
|
|
interface nsISSLSocketControl : nsISupports {
|
|
|
|
attribute nsIInterfaceRequestor notificationCallbacks;
|
|
|
|
|
|
|
|
void proxyStartSSL();
|
|
|
|
void StartTLS();
|
2011-12-13 07:55:50 -08:00
|
|
|
|
|
|
|
/* 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
|
2013-05-28 17:09:22 -07:00
|
|
|
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. */
|
2011-12-13 07:55:50 -08:00
|
|
|
|
|
|
|
[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;
|
|
|
|
|
|
|
|
/* 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);
|
2012-06-30 07:34:17 -07:00
|
|
|
|
2013-11-25 15:12:40 -08:00
|
|
|
/* The Key Exchange Algorithm is used when determining whether or
|
2014-05-06 14:22:25 -07:00
|
|
|
not to do false start and whether or not HTTP/2 can be used.
|
|
|
|
|
2013-11-25 15:12:40 -08:00
|
|
|
After a handshake is complete it can be read from KEAUsed,
|
|
|
|
before a handshake is started it may be set through KEAExpected.
|
|
|
|
The values correspond to the SSLKEAType enum in NSS or the
|
|
|
|
KEY_EXCHANGE_UNKNOWN constant defined below.
|
2014-05-06 14:22:25 -07:00
|
|
|
|
|
|
|
KEAKeyBits is the size/security-level used for the KEA.
|
2013-06-28 13:58:28 -07:00
|
|
|
*/
|
|
|
|
|
|
|
|
[infallible] readonly attribute short KEAUsed;
|
|
|
|
[infallible] attribute short KEAExpected;
|
2014-05-06 14:22:25 -07:00
|
|
|
[infallible] readonly attribute unsigned long KEAKeyBits;
|
2013-06-28 13:58:28 -07:00
|
|
|
|
|
|
|
const short KEY_EXCHANGE_UNKNOWN = -1;
|
|
|
|
|
2012-06-30 07:34:17 -07:00
|
|
|
/*
|
|
|
|
* The original flags from the socket provider.
|
|
|
|
*/
|
|
|
|
readonly attribute uint32_t providerFlags;
|
2013-10-09 17:21:48 -07:00
|
|
|
|
|
|
|
/* 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 SSL_VERSION_UNKNOWN = -1;
|
|
|
|
|
|
|
|
[infallible] readonly attribute short SSLVersionUsed;
|
2007-03-22 10:30:00 -07:00
|
|
|
};
|
|
|
|
|