1- //! HTTP client for the embedding verifier host.
1+ //! HTTP client for the Flamingo Verifier host.
22
33use base64:: { Engine as _, engine:: general_purpose:: STANDARD } ;
44
@@ -38,19 +38,18 @@ impl VerifiedAssignment {
3838 }
3939}
4040
41- // TODO: Rename FaceVerifierClient to FlamingoVerifierClient.
42- /// Calls the face verifier host and verifies the attestation documents it relays.
41+ /// Calls the Flamingo Verifier host and verifies the attestation documents it relays.
4342///
4443/// Nothing is returned until the enclave that produced it has been verified, so callers
4544/// cannot accidentally use an unattested key.
4645#[ derive( Debug ) ]
47- pub struct FaceVerifierClient {
46+ pub struct FlamingoVerifierClient {
4847 config : Config ,
4948 http : reqwest:: Client ,
5049 verifier : Verifier ,
5150}
5251
53- impl FaceVerifierClient {
52+ impl FlamingoVerifierClient {
5453 /// Builds a client from `config`.
5554 ///
5655 /// # Errors
@@ -296,7 +295,7 @@ mod tests {
296295 use pontifex:: { ChannelConsumer , ChannelDomain , ChannelEnclave } ;
297296 use serde_json:: { Value , json} ;
298297
299- use super :: { FaceVerifierClient , MatchRequestBody } ;
298+ use super :: { FlamingoVerifierClient , MatchRequestBody } ;
300299 use crate :: { Config , Error , PcrMeasurement } ;
301300
302301 fn config ( base_url : & str ) -> Config {
@@ -355,7 +354,7 @@ mod tests {
355354 }
356355
357356 async fn request_match_with_consumer (
358- client : & FaceVerifierClient ,
357+ client : & FlamingoVerifierClient ,
359358 consumer : & ChannelConsumer ,
360359 inputs : & MatchInputs ,
361360 ) -> Result < MatchResult , Error > {
@@ -465,7 +464,7 @@ mod tests {
465464 async fn a_sealed_rejection_round_trips ( ) {
466465 let answer = MatchResult :: Failed ( FailureReason :: MatchBelowThreshold ) ;
467466 let ( base_url, responder, seen) = serve_enclave ( answer. clone ( ) , false ) . await ;
468- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
467+ let client = FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
469468
470469 let result = request_match_with_consumer ( & client, & consumer_for ( & responder) , & inputs ( ) )
471470 . await
@@ -491,7 +490,7 @@ mod tests {
491490 async fn a_reply_from_another_exchange_cannot_be_opened ( ) {
492491 let ( base_url, responder, _) =
493492 serve_enclave ( MatchResult :: Failed ( FailureReason :: MalformedInputs ) , true ) . await ;
494- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
493+ let client = FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
495494
496495 let error = request_match_with_consumer ( & client, & consumer_for ( & responder) , & inputs ( ) )
497496 . await
@@ -503,7 +502,7 @@ mod tests {
503502 #[ tokio:: test]
504503 async fn a_stale_assignment_asks_for_a_reassignment ( ) {
505504 let base_url = serve_error ( StatusCode :: CONFLICT , "reassign_required" , true ) . await ;
506- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
505+ let client = FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
507506 let responder = ChannelEnclave :: generate ( ChannelDomain :: new ( MATCH_CHANNEL_DOMAIN ) )
508507 . expect ( "channel key" ) ;
509508
@@ -520,7 +519,7 @@ mod tests {
520519 #[ tokio:: test]
521520 async fn other_envelopes_keep_their_code_and_retry_flag ( ) {
522521 let base_url = serve_error ( StatusCode :: PAYLOAD_TOO_LARGE , "request_too_large" , false ) . await ;
523- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
522+ let client = FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
524523 let responder = ChannelEnclave :: generate ( ChannelDomain :: new ( MATCH_CHANNEL_DOMAIN ) )
525524 . expect ( "channel key" ) ;
526525
@@ -549,7 +548,7 @@ mod tests {
549548 post ( || async { ( StatusCode :: BAD_GATEWAY , "not json" ) } ) ,
550549 ) ;
551550 let base_url = serve ( router) . await ;
552- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
551+ let client = FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
553552 let responder = ChannelEnclave :: generate ( ChannelDomain :: new ( MATCH_CHANNEL_DOMAIN ) )
554553 . expect ( "channel key" ) ;
555554
@@ -568,7 +567,8 @@ mod tests {
568567 signing_key_attestation : attestation,
569568 } ) ;
570569 let ( base_url, responder, _) = serve_enclave ( answer, false ) . await ;
571- let client = FaceVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
570+ let client =
571+ FlamingoVerifierClient :: new ( config ( & base_url) ) . expect ( "client should build" ) ;
572572
573573 let error = request_match_with_consumer ( & client, & consumer_for ( & responder) , & inputs ( ) )
574574 . await
0 commit comments