Eine aufbereitete Darstellung der Quelle

 
     
 
 
Anforderungen  |   Konzepte  |   Entwurf  |   Entwicklung  |   Qualitätssicherung  |   Lebenszyklus  |   Steuerung
 
 
 
 

Benutzer

Quelle  TLSCertificateBindingChild.sys.mjs   Sprache: unbekannt

 
Spracherkennung für: .mjs vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]

/* This Source Code Form is subject to the terms of the Mozilla Public
 * License, v. 2.0. If a copy of the MPL was not distributed with this
 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

export class TLSCertificateBindingChild extends JSWindowActorChild {
  #tlsCertificateBindingPromise = undefined;

  constructor() {
    super();
  }

  async receiveMessage(message) {
    if (message.name == "TLSCertificateBinding::Get") {
      this.maybeFetchTLSCertificateBinding();
      return this.#tlsCertificateBindingPromise;
    }
    return undefined;
  }

  maybeFetchTLSCertificateBinding() {
    // `#tlsCertificateBindingPromise` will be undefined if we haven't yet
    // attempted fetching for this document.
    if (this.#tlsCertificateBindingPromise === undefined) {
      this.#tlsCertificateBindingPromise = this.#fetchTLSCertificateBinding();
    }
  }

  async #fetchTLSCertificateBinding() {
    if (this.document.tlsCertificateBindingURI) {
      try {
        let response = await this.contentWindow.fetch(
          this.document.tlsCertificateBindingURI.spec
        );
        if (response.ok) {
          return response.text();
        }
      } catch (e) {
        console.error("Fetching TLS certificate binding failed:", e);
      }
    }
    // If there is no TLS certificate binding URI, or if fetching it failed,
    // return null to indicate that an attempt to fetch it was made.
    return null;
  }
}

[Dauer der Verarbeitung: 0.23 Sekunden, vorverarbeitet 2026-08-25]

                                                                                                                                                                                                                                                                                                                                                                                                     


Neuigkeiten

     Aktuelles
     Motto des Tages

Open Source Software

     Quellcodebibliothek
     Eigene Quellcodes
     Fremde Quellcodes
     Suchen

Jenseits des Üblichen ....
    

Besucherstatistik

Besucherstatistik

Statistik
#Sources=277311
#Domains=752002