Skip to content

WebTransport serverCertificateHashes value can't be string #44004

@kouhe3

Description

@kouhe3

MDN URL

https://developer.mozilla.org/en-US/docs/Web/API/WebTransport/WebTransport#connecting_with_server_certificate_hashes

What specific section or headline is this issue about?

No response

What information was incorrect, unhelpful, or incomplete?

const transport = new WebTransport(url, {
  serverCertificateHashes: [
    {
      algorithm: "sha-256",
      value: "5a155927eba7996228455e4721e6fe5f739ae15db6915d765e5db302b4f8a274",
    },
    {
      algorithm: "sha-256",
      value: "7d7094e7a8d3097feff3b5ee84fa5cab58e4de78f38bcfdee5ea8b51f4bfa8fd",
    },
  ],
});

What did you expect to see?

const transport = new WebTransport(url, {
  serverCertificateHashes: [
    {
      algorithm: "sha-256",
      value: new Uint8Array(hexToBytes("5a155927eba7996228455e4721e6fe5f739ae15db6915d765e5db302b4f8a274"))
    },
    {
      algorithm: "sha-256",
      value: new Uint8Array(hexToBytes("7d7094e7a8d3097feff3b5ee84fa5cab58e4de78f38bcfdee5ea8b51f4bfa8fd"))
    }
  ]
});

Do you have any supporting links, references, or citations?

No response

Do you have anything more you want to share?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Content:WebAPIWeb API docshelp wantedIf you know something about this topic, we would love your help!

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions