Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions files/en-us/web/api/rtccertificatestats/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,15 @@ The report can be obtained by iterating the {{domxref("RTCStatsReport")}} return

## Instance properties

- {{domxref("RTCCertificateStats.base64Certificate", "base64Certificate")}}
- : A string containing the base-64 representation of the DER-encoded certificate.
- {{domxref("RTCCertificateStats.fingerprint", "fingerprint")}}
- : A string containing the certificate fingerprint, which is calculated using the hash function specified in [`fingerprintAlgorithm`](/en-US/docs/Web/API/RTCCertificateStats/fingerprintAlgorithm).
- {{domxref("RTCCertificateStats.fingerprintAlgorithm", "fingerprintAlgorithm")}}
- : A string containing the hash function used to compute the certificate [`fingerprint`](/en-US/docs/Web/API/RTCCertificateStats/fingerprint), such as "sha-256".
- {{domxref("RTCCertificateStats.base64Certificate", "base64Certificate")}}
- : A string containing the base-64 representation of the DER-encoded certificate.
- {{domxref("RTCCertificateStats.issuerCertificateId", "issuerCertificateId")}}
- : A string containing the `id` of the {{domxref("RTCCertificateStats")}} object in this report that contains the next certificate in the certificate chain.
This will not be set if the current certificate is a self-signed certificate or the end of the certificate chain (a root certificate).

### Common instance properties

Expand All @@ -35,6 +38,8 @@ The following properties are common to all WebRTC statistics objects (See [`RTCS

## Examples

### Basic usage

Given a variable `myPeerConnection`, which is an instance of {{domxref("RTCPeerConnection")}}, the code below uses `await` to wait for the statistics report, and then iterates it using `RTCStatsReport.forEach()`.
It then filters the dictionaries for just those reports that have the type of `certificate` and logs the result.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
---
title: "RTCCertificateStats: issuerCertificateId property"
short-title: issuerCertificateId
slug: Web/API/RTCCertificateStats/issuerCertificateId
page-type: web-api-instance-property
browser-compat: api.RTCStatsReport.type_certificate.issuerCertificateId
---

{{APIRef("WebRTC")}}

The **`issuerCertificateId`** property of the {{domxref("RTCCertificateStats")}} dictionary is a string containing the {{domxref("RTCCertificateStats.id", "id")}} of the {{domxref("RTCCertificateStats")}} object in this report that contains the next certificate in the certificate chain.

If there are no further certificates in the chain, such as if this is the root certificate or a self-signed certificate, the value is `undefined`.

Note that WebRTC uses certificates when establishing a DTLS connection.
By default connections use self-signed certificates, but in enterprise or WebRTC gateway setups signed certificate chains from intermediate and root certificate authorities (CAs) may be used instead.
This property allows you to walk the chain of certificates if needed.

## Value

A string, or `undefined` if the current certificate is at the end of the certificate chain.

## Specifications

{{Specifications}}

## Browser compatibility

{{Compat}}