From 4e472b27b06aae24a28bc5dcf267a721a8a4eaec Mon Sep 17 00:00:00 2001 From: yuroitaki <25913766+yuroitaki@users.noreply.github.com> Date: Tue, 27 May 2025 16:11:21 +0800 Subject: [PATCH] Add comment. --- docs/protocol/custom_extension.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/protocol/custom_extension.md b/docs/protocol/custom_extension.md index 59df8b0..8e83e81 100644 --- a/docs/protocol/custom_extension.md +++ b/docs/protocol/custom_extension.md @@ -23,7 +23,7 @@ The following demonstrates how to modify the [attestation example](https://githu The [attestation prover](https://github.com/tlsnotary/tlsn/blob/main/crates/examples/attestation/prove.rs) is modified as follows: ```rust -... +// ... let builder = RequestConfig::builder(); @@ -34,7 +34,7 @@ builder.extension(Extension { let request_config = builder.build()?; -... +// ... ``` Note that the `Extension`'s `id` and `value` are both `Vec`, giving full control over the encoding format. @@ -54,7 +54,7 @@ Currently, the notary server does not support adding its own extensions or perfo The [attestation verifier](https://github.com/tlsnotary/tlsn/blob/main/crates/examples/attestation/verify.rs) can be modified to inspect extensions: ```rust -... +// ... let PresentationOutput { server_name, @@ -69,10 +69,10 @@ let Extension { id, value } = extensions.pop().unwrap(); // Check the prover's public key. if id.as_slice() == b"prover_public_key" { let public_key_pem = String::from_utf8(value).unwrap(); - ... + // ... } -... +// ... ``` This allows the `Verifier` to confirm that the attestation is bound to the identity associated with the specified public key.