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"
9 interface nsIObjectOutputStream
;
10 interface nsIX509Cert
;
18 [ptr] native IpcMessageWriterPtr
(IPC
::MessageWriter
);
20 [builtinclass
, scriptable
, uuid(216112d3
-28bc
-4671-b057
-f98cc09ba1ea
)]
21 interface nsITransportSecurityInfo
: nsISupports
{
22 cenum OverridableErrorCategory
: 32 {
29 readonly attribute
unsigned long securityState
;
30 readonly attribute
long errorCode
; // PRErrorCode
31 // errorCode as string (e.g. "SEC_ERROR_UNKNOWN_ISSUER")
32 readonly attribute AString errorCodeString
;
35 * The following parameters are only valid after the TLS handshake
36 * has completed. Check securityState first.
40 * If certificate verification failed, this will be the peer certificate
41 * chain provided in the handshake, so it can be used for error reporting.
42 * If verification succeeded, this will be empty.
44 readonly attribute Array
<nsIX509Cert
> failedCertChain
;
46 readonly attribute nsIX509Cert serverCert
;
47 readonly attribute Array
<nsIX509Cert
> succeededCertChain
;
50 readonly attribute ACString cipherName
;
52 readonly attribute
unsigned long keyLength
;
54 readonly attribute
unsigned long secretKeyLength
;
56 readonly attribute ACString keaGroupName
;
58 readonly attribute ACString signatureSchemeName
;
60 const short SSL_VERSION_3
= 0;
61 const short TLS_VERSION_1
= 1;
62 const short TLS_VERSION_1_1
= 2;
63 const short TLS_VERSION_1_2
= 3;
64 const short TLS_VERSION_1_3
= 4;
66 readonly attribute
unsigned short protocolVersion
;
68 const short CERTIFICATE_TRANSPARENCY_NOT_APPLICABLE
= 0;
69 const short CERTIFICATE_TRANSPARENCY_POLICY_COMPLIANT
= 5;
70 const short CERTIFICATE_TRANSPARENCY_POLICY_NOT_ENOUGH_SCTS
= 6;
71 const short CERTIFICATE_TRANSPARENCY_POLICY_NOT_DIVERSE_SCTS
= 7;
73 readonly attribute
unsigned short certificateTransparencyStatus
;
76 readonly attribute
boolean isAcceptedEch
;
78 readonly attribute
boolean isDelegatedCredential
;
80 readonly attribute nsITransportSecurityInfo_OverridableErrorCategory overridableErrorCategory
;
83 * True if OCSP requests were made to query the status of certificates
84 * used in this connection.
87 readonly attribute
boolean madeOCSPRequests
;
90 * True if the DNS record used for this connection was fetched over an encrypted connection.
93 readonly attribute
boolean usedPrivateDNS
;
96 * True only if (and after) serverCert was successfully validated as
97 * Extended Validation (EV).
100 readonly attribute
boolean isExtendedValidation
;
103 void SerializeToIPC
(in IpcMessageWriterPtr aWriter
);
106 * Serializes the data represented in this interface to a base64-encoded
107 * string that can be deserialized using TransportSecurityInfo::Read.
112 /* negotiatedNPN is '' if no NPN list was provided by the client,
113 * or if the server did not select any protocol choice from that
114 * list. That also includes the case where the server does not
117 * If negotiatedNPN is read before NPN has progressed to the point
118 * where this information is available NS_ERROR_NOT_CONNECTED is
121 readonly attribute ACString negotiatedNPN
;
124 * True iff the connection was resumed using the resumption token.
126 readonly attribute
boolean resumed
;
129 * True iff the succeededCertChain is built in root.
131 readonly attribute
boolean isBuiltCertChainRootBuiltInRoot
;
134 * The id used to uniquely identify the connection to the peer.
136 readonly attribute ACString peerId
;