From ba17bdcbcb3b877a0394142277138feb356fa7c5 Mon Sep 17 00:00:00 2001 From: Hendrik Eeckhaut Date: Wed, 11 Oct 2023 11:35:10 +0200 Subject: [PATCH] wip --- src/main.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/main.rs b/src/main.rs index 61c9a06..7b2e64c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -159,17 +159,14 @@ cRzMG5kaTeHGoSzDu6cFqx3uEWYpFGo6C0EOUgf+mEgbktLrXocv5yHzKg== // Verify the session proof against the Notary's public key fn verify_proof(session: &SessionProof) -> String { - // FIXME: this does not work yet - return String::from("TODO"); - // This verifies the identity of the server using a default certificate verifier which trusts // the root certificates from the `webpki-roots` crate. - // let v = session.verify_with_default_cert_verifier(notary_pubkey()); - // match v { - // Ok(_) => return "Proof successfully verified ✅".to_string(), - // Err(error) => return error.to_string(), - // }; + let v = session.verify_with_default_cert_verifier(notary_pubkey()); + match v { + Ok(_) => return "Proof successfully verified ✅".to_string(), + Err(error) => return error.to_string(), + } } fn parse_tls_proof(json_str: &str) -> Html {