From f6bf35350c59e856deafdac65569b71a3413155b Mon Sep 17 00:00:00 2001 From: Rupert Ben Wiser Date: Mon, 17 Jul 2023 10:55:18 +0000 Subject: [PATCH] Add hash type and DOMException --- docs/spec.bs | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/docs/spec.bs b/docs/spec.bs index 6547995..1a490b7 100644 --- a/docs/spec.bs +++ b/docs/spec.bs @@ -11,6 +11,20 @@ Markup Shorthands: markdown yes, css no + +
+{
+  "SHA-256": {
+    "href":"https://nvlpubs.nist.gov/nistpubs/FIPS/NIST.FIPS.180-4.pdf",
+    "title":"Secure Hash Standard (SHS) (FIPS PUB 180-4)",
+    "authors": ["National Institute of Standards and Technology"],
+    "publisher":"NIST",
+    "id":"FIPS 180-4",
+    "date": "August 2015"
+  }
+}
 
# Introduction # {#introduction} @@ -140,8 +154,9 @@ The [=attester verdict=] consists of: 1. Let |promise| be [=a new promise=] 1. Run the following steps [=in parallel=]: - 1. Set |attesterVerdict| to a new [=attester verdict=] from the |attesterConnection| using the |contentBinding|. If this fails then: - 1. [=Reject=] |promise| with a TODO [=Exception=] + 1. Let |hashedCB| be the digest [[SHA-256]](|contentBinding| + ";" + [=origin=]) + 1. Set |attesterVerdict| to a new [=attester verdict=] from the |attesterConnection| using the |hashedCB|. If this fails then: + 1. [=Reject=] |promise| with a "{{UnknownError}}" {{DOMException}} 1. Abort these steps 1. Let |environmentIntegrity| be a new {{EnvironmentIntegrity}} with: - {{EnvironmentIntegrity/attestationToken}} set to the [=attester verdict/raw response=] in the |attesterVerdict|