Bug 1935611 - Fix libyuv/libpng link failed for loongarch64. r=glandium,tnikkel,ng
[gecko.git] / security / manager / ssl / nsITransportSecurityInfo.idl
blob8fe5879e4a515236003b8c74a9cd4913df7218df
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;
12 %{ C++
13 namespace IPC {
14 class MessageWriter;
18 [ptr] native IpcMessageWriterPtr(IPC::MessageWriter);
20 [builtinclass, scriptable, uuid(216112d3-28bc-4671-b057-f98cc09ba1ea)]
21 interface nsITransportSecurityInfo : nsISupports {
22 cenum OverridableErrorCategory : 32 {
23 ERROR_UNSET,
24 ERROR_TRUST,
25 ERROR_DOMAIN,
26 ERROR_TIME,
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;
34 /**
35 * The following parameters are only valid after the TLS handshake
36 * has completed. Check securityState first.
39 /**
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;
49 [must_use]
50 readonly attribute ACString cipherName;
51 [must_use]
52 readonly attribute unsigned long keyLength;
53 [must_use]
54 readonly attribute unsigned long secretKeyLength;
55 [must_use]
56 readonly attribute ACString keaGroupName;
57 [must_use]
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;
65 [must_use]
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;
72 [must_use]
73 readonly attribute unsigned short certificateTransparencyStatus;
75 [must_use]
76 readonly attribute boolean isAcceptedEch;
77 [must_use]
78 readonly attribute boolean isDelegatedCredential;
79 [must_use]
80 readonly attribute nsITransportSecurityInfo_OverridableErrorCategory overridableErrorCategory;
82 /**
83 * True if OCSP requests were made to query the status of certificates
84 * used in this connection.
86 [must_use]
87 readonly attribute boolean madeOCSPRequests;
89 /**
90 * True if the DNS record used for this connection was fetched over an encrypted connection.
92 [must_use]
93 readonly attribute boolean usedPrivateDNS;
95 /**
96 * True only if (and after) serverCert was successfully validated as
97 * Extended Validation (EV).
99 [must_use]
100 readonly attribute boolean isExtendedValidation;
102 [notxpcom, noscript]
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.
109 [must_use]
110 ACString toString();
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
115 * implement NPN.
117 * If negotiatedNPN is read before NPN has progressed to the point
118 * where this information is available NS_ERROR_NOT_CONNECTED is
119 * raised.
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;