An object describing the security properties of a particular web request. An object of this type is returned from the
webRequest.getSecurityInfo()
API。
If the request is not secured using
TLS
, then this object will contain only the property
state
, whose value will be
"insecure"
.
Values of this type are objects. They contain the following properties:
certificates
数组
of
CertificateInfo
。若
webRequest.getSecurityInfo()
was called with the
certificateChain
option present and set to
true
, this will contain a
CertificateInfo
object for every certificate in the chain, from the server certificate up to and including the trust root.
Otherwise it will contain a single
CertificateInfo
object, for the server certificate.
certificateTransparencyStatus
可选
字符串
. Indicates the
Certificate Transparency
status for the connection. This may take any one of the following values:
cipherSuite
可选
字符串
. Cipher suite used for the connection, formatted as per the
TLS specification
: for example, "TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256".
errorMessage
可选
字符串
. If there was a problem with the TLS handshake (for example, the certificate had expired, or a trusted root could not be found, or a certificate was revoked) then
status
will be "broken" and the
errorMessage
property will contain a string describing the error, taken from Firefox's internal list of error codes.
Note though that at present you can only call
getSecurityInfo()
在
onHeaderReceived
listener, and the
onHeaderReceived
event is not fired when the handshake fails. So in practice this will never be set.
hpkp
可选
布尔
.
true
if the host uses
Public Key Pinning
,
false
否则。
hsts
可选
布尔
.
true
if the host uses
Strict Transport Security
,
false
否则。
isDomainMismatch
可选
布尔
.
true
if the server's domain name does not match the domain name in its certificate,
false
否则。
isExtendedValidation
可选
布尔
.
true
if the server has an
Extended Validation Certificate
,
false
否则。
isNotValidAtThisTime
可选
布尔
.
true
if the current time falls outside the server certificate's validity period (i.e. the certificate has expired or is not yet valid),
false
否则。
isUntrusted
可选
布尔
.
true
if a chain back to a trusted root certificate could not be constructed,
false
否则。
keaGroupName
可选
字符串
。若
state
is "secure" this describes the key exchange algorithm used in this request.
protocolVersion
可选
字符串
. Version of the TLS protocol used. One of:
signatureSchemeName
可选
字符串
。若
state
is "secure" this describes the signature scheme used in this request.
state
字符串
. State of the connection. One of:
weaknessReasons
to find out the problem.
Note though that at present you can only call
getSecurityInfo()
在
onHeaderReceived
listener, and the
onHeaderReceived
event is not fired when the handshake fails. So in practice this will never be set to "broke".
weaknessReasons
可选
字符串
。若
state
is "weak", this indicates the reason. Currently this may contain only a single value "cipher", indicating that the negotiated cipher suite is considered weak.
BCD tables only load in the browser
最后修改: , 由 MDN 贡献者