Interface nsISiteSecurityServiceType

Hierarchy

Methods

  • Increases the reference count for this interface. The associated instance will not be deleted unless the reference count is returned to zero.

    Returns

    The resulting reference count.

    Returns number

  • Parameters

    • aIID: object
    • Optional aInstancePtr: object

    Returns any

  • A run time mechanism for interface discovery.

    Returns

    NS_OK if the interface is supported by the associated instance, NS_NOINTERFACE if it is not.

    aInstancePtr must not be null.

    Parameters

    • aIID: object

      [in] A requested interface IID

    • aInstancePtr: object

      [out] A pointer to an interface pointer to receive the result.

    Returns void

  • Decreases the reference count for this interface. Generally, if the reference count returns to zero, the associated instance is deleted.

    Returns

    The resulting reference count.

    Returns number

  • Removes all non-preloaded HSTS state by resetting to factory-original settings.

    Returns void

  • Returns an enumerator of the nsISiteSecurityService storage. Each item in the enumeration is a nsISiteSecurityState that can be QueryInterfaced to nsISiteHSTSState. Doesn't include hard-coded preloaded entries.

    Returns nsISimpleEnumerator

  • Parameters

    • aURI: nsIURI
    • aOriginAttributes: any

    Returns boolean

  • Checks whether or not the URI's hostname has HSTS set. For example: The URI is an HSTS URI if either the host has the HSTS state set, or one of its super-domains has the HSTS "includeSubdomains" flag set. NOTE: this function makes decisions based only on the host contained in the URI, and disregards other portions of the URI such as path and port.

    Parameters

    • aURI: nsIURI

      the URI to query for STS state.

    • aOriginAttributes: const_OriginAttributesRef

      the origin attributes that isolate this origin, (note that this implementation does not isolate by userContextId because of the risk of man-in- the-middle attacks before trust-on-second-use happens).

    Returns boolean

  • Parameters

    • aSourceURI: nsIURI
    • aHeader: string
    • aOriginAttributes: any
    • aMaxAge: number
    • aIncludeSubdomains: boolean
    • aFailureResult: uint32_t

    Returns void

  • Parses a given HTTP header and records the results internally. Currently one header type is supported: HSTS (aka STS). The format of the HSTS header is defined by the HSTS specification: https://tools.ietf.org/html/rfc6797 and allows a host to specify that future HTTP requests should be upgraded to HTTPS. The caller is responsible for first determining that the header was delivered via a trustworthy connection (namely, https with no errors).

    Returns

    NS_OK if it succeeds NS_ERROR_FAILURE if it can't be parsed NS_SUCCESS_LOSS_OF_INSIGNIFICANT_DATA if there are unrecognized tokens in the header.

    Parameters

    • aSourceURI: nsIURI

      the URI of the resource with the HTTP header.

    • aHeader: string

      the HTTP response header specifying security data.

    • aOriginAttributes: const_OriginAttributesRef

      the origin attributes that isolate this origin, (note that this implementation does not isolate by userContextId because of the risk of man-in- the-middle attacks before trust-on-second-use happens). If mPrivateBrowsingId > 0, information gathered from this header will not be saved persistently.

    • aMaxAge: number

      the parsed max-age directive of the header.

    • aIncludeSubdomains: boolean

      the parsed includeSubdomains directive.

    • aFailureResult: uint32_t

      a more specific failure result if NS_ERROR_FAILURE was returned.

    Returns void

  • Resets HSTS state a host, including the includeSubdomains state that would affect subdomains. This essentially removes the state for the domain tree rooted at this host. If any preloaded information is present for that host, that information will then be used instead of any other previously existing state.

    Parameters

    • aURI: nsIURI

      the URI of the target host

    • aOriginAttributes: any

      the origin attributes that isolate this origin, (note that this implementation does not isolate by userContextId because of the risk of man-in- the-middle attacks before trust-on-second-use happens).

    Returns void

Generated using TypeDoc