Skip to content

Commit 64cbe6b

Browse files
committed
Moves to attestation type
1 parent 1cded51 commit 64cbe6b

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ This repository contains a sample [measurements.json](./measurements.json) file
102102
Attestation verification requires the expected measurements which you pass through the `--{client, server}-measurements` flag.
103103
The measurements are expected to be a JSON map, and multiple valid measurements can be provided. The verifier will attempt to verify with each of the provided measurements, and if any succeeds, the attestation is assumed valid.
104104

105-
The (single) validated measurement is json-marshalled and forwarded (returned in the case of client) as "X-Flashbots-Measurement" header, and the type of attestation (validator OID) as "X-Flashbots-Ext-OID" header. For mapping OIDs to issuers, see [internal/attestation/variant/variant.go](./internal/attestation/variant/variant.go).
105+
The (single) validated measurement is json-marshalled and forwarded (returned in the case of client) as "X-Flashbots-Measurement" header, and the type of attestation as "X-Flashbots-Attestation-Type" header. For mapping attestation types to OIDs and issuers, see [internal/attestation/variant/variant.go](./internal/attestation/variant/variant.go).
106106
To only validate and forward the measurement (as opposed to also authorizing the measurement against an expected one), simply provide an empty expected measurements object.
107107

108108
---

proxy/proxy.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ type Proxy struct {
2222
}
2323

2424
const (
25-
AttestationTypeHeader string = "X-Flashbots-Ext-OID"
25+
AttestationTypeHeader string = "X-Flashbots-Attestation-Type"
2626
MeasurementHeader string = "X-Flashbots-Measurement"
2727
)
2828

@@ -125,7 +125,7 @@ func (p *Proxy) copyMeasurementsToHeader(conn *tls.ConnectionState, header *http
125125
return http.StatusInternalServerError, errors.New("could not marshal measurement extracted from tls extension")
126126
}
127127

128-
header.Set(AttestationTypeHeader, ATLSExtension.Id.String())
128+
header.Set(AttestationTypeHeader, atlsVariant.String())
129129
header.Set(MeasurementHeader, string(marshaledPcrs))
130130

131131
return 0, nil

0 commit comments

Comments
 (0)