1 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
3 * This Source Code Form is subject to the terms of the Mozilla Public
4 * License, v. 2.0. If a copy of the MPL was not distributed with this
5 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
7 #include
"nsISupports.idl"
18 [ptr] native IpcMessagePtr
(IPC
::Message);
19 [ptr] native PickleIteratorPtr
(PickleIterator
);
21 [builtinclass
, scriptable
, uuid(216112d3
-28bc
-4671-b057
-f98cc09ba1ea
)]
22 interface nsITransportSecurityInfo
: nsISupports
{
23 readonly attribute
unsigned long securityState
;
24 readonly attribute
long errorCode
; // PRErrorCode
25 // errorCode as string (e.g. "SEC_ERROR_UNKNOWN_ISSUER")
26 readonly attribute AString errorCodeString
;
29 * The following parameters are only valid after the TLS handshake
30 * has completed. Check securityState first.
34 * If certificate verification failed, this will be the peer certificate
35 * chain provided in the handshake, so it can be used for error reporting.
36 * If verification succeeded, this will be empty.
38 readonly attribute Array
<nsIX509Cert
> failedCertChain
;
40 readonly attribute nsIX509Cert serverCert
;
41 readonly attribute Array
<nsIX509Cert
> succeededCertChain
;
44 readonly attribute ACString cipherName
;
46 readonly attribute
unsigned long keyLength
;
48 readonly attribute
unsigned long secretKeyLength
;
50 readonly attribute ACString keaGroupName
;
52 readonly attribute ACString signatureSchemeName
;
54 const short SSL_VERSION_3
= 0;
55 const short TLS_VERSION_1
= 1;
56 const short TLS_VERSION_1_1
= 2;
57 const short TLS_VERSION_1_2
= 3;
58 const short TLS_VERSION_1_3
= 4;
60 readonly attribute
unsigned short protocolVersion
;
62 const short CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE
= 0;
63 const short CERTIFICATE_TRANSPARENCY_POLICY_COMPLIANT
= 5;
64 const short CERTIFICATE_TRANSPARENCY_POLICY_NOT_ENOUGH_SCTS
= 6;
65 const short CERTIFICATE_TRANSPARENCY_POLICY_NOT_DIVERSE_SCTS
= 7;
67 readonly attribute
unsigned short certificateTransparencyStatus
;
70 readonly attribute
boolean isDelegatedCredential
;
72 readonly attribute
boolean isDomainMismatch
;
74 readonly attribute
boolean isNotValidAtThisTime
;
77 readonly attribute
boolean isUntrusted
;
80 * True only if (and after) serverCert was successfully validated as
81 * Extended Validation (EV).
84 readonly attribute
boolean isExtendedValidation
;
87 void SerializeToIPC
(in IpcMessagePtr aMsg
);
90 bool DeserializeFromIPC
([const] in IpcMessagePtr aMsg
, in PickleIteratorPtr aIter
);
92 /* negotiatedNPN is '' if no NPN list was provided by the client,
93 * or if the server did not select any protocol choice from that
94 * list. That also includes the case where the server does not
97 * If negotiatedNPN is read before NPN has progressed to the point
98 * where this information is available NS_ERROR_NOT_CONNECTED is
101 readonly attribute ACString negotiatedNPN
;
104 * True iff the connection was resumed using the resumption token.
106 readonly attribute
boolean resumed
;
109 * True iff the succeededCertChain is built in root.
111 attribute
boolean isBuiltCertChainRootBuiltInRoot
;