11mod attestation;
22
33use attestation:: AttestationError ;
4- pub use attestation:: { AttestationPlatform , NoAttestation , TdxAttestation } ;
4+ pub use attestation:: { AttestationPlatform , DcapTdxAttestation , NoAttestation } ;
55use thiserror:: Error ;
66use tokio_rustls:: rustls:: server:: { VerifierBuilderError , WebPkiClientVerifier } ;
77
@@ -510,7 +510,7 @@ mod tests {
510510 server_config,
511511 "127.0.0.1:0" ,
512512 target_addr,
513- TdxAttestation ,
513+ DcapTdxAttestation ,
514514 NoAttestation ,
515515 )
516516 . await
@@ -527,7 +527,7 @@ mod tests {
527527 "127.0.0.1:0" . to_string ( ) ,
528528 proxy_addr. to_string ( ) ,
529529 NoAttestation ,
530- TdxAttestation ,
530+ DcapTdxAttestation ,
531531 None ,
532532 )
533533 . await
@@ -573,8 +573,8 @@ mod tests {
573573 server_tls_server_config,
574574 "127.0.0.1:0" ,
575575 target_addr,
576- TdxAttestation ,
577- TdxAttestation ,
576+ DcapTdxAttestation ,
577+ DcapTdxAttestation ,
578578 )
579579 . await
580580 . unwrap ( ) ;
@@ -589,8 +589,8 @@ mod tests {
589589 client_tls_client_config,
590590 "127.0.0.1:0" ,
591591 proxy_addr. to_string ( ) ,
592- TdxAttestation ,
593- TdxAttestation ,
592+ DcapTdxAttestation ,
593+ DcapTdxAttestation ,
594594 Some ( client_cert_chain) ,
595595 )
596596 . await
@@ -619,7 +619,7 @@ mod tests {
619619 let ( cert_chain, private_key) = generate_certificate_chain ( "127.0.0.1" . parse ( ) . unwrap ( ) ) ;
620620 let ( server_config, client_config) = generate_tls_config ( cert_chain. clone ( ) , private_key) ;
621621
622- let local_attestation_platform = TdxAttestation ;
622+ let local_attestation_platform = DcapTdxAttestation ;
623623
624624 let proxy_server = ProxyServer :: new_with_tls_config (
625625 cert_chain,
@@ -643,7 +643,7 @@ mod tests {
643643 "127.0.0.1:0" ,
644644 proxy_server_addr. to_string ( ) ,
645645 NoAttestation ,
646- TdxAttestation ,
646+ DcapTdxAttestation ,
647647 None ,
648648 )
649649 . await
@@ -670,7 +670,7 @@ mod tests {
670670 let ( cert_chain, private_key) = generate_certificate_chain ( "127.0.0.1" . parse ( ) . unwrap ( ) ) ;
671671 let ( server_config, client_config) = generate_tls_config ( cert_chain. clone ( ) , private_key) ;
672672
673- let local_attestation_platform = TdxAttestation ;
673+ let local_attestation_platform = DcapTdxAttestation ;
674674
675675 let proxy_server = ProxyServer :: new_with_tls_config (
676676 cert_chain. clone ( ) ,
@@ -689,10 +689,13 @@ mod tests {
689689 proxy_server. accept ( ) . await . unwrap ( ) ;
690690 } ) ;
691691
692- let retrieved_chain =
693- get_tls_cert_with_config ( proxy_server_addr. to_string ( ) , TdxAttestation , client_config)
694- . await
695- . unwrap ( ) ;
692+ let retrieved_chain = get_tls_cert_with_config (
693+ proxy_server_addr. to_string ( ) ,
694+ DcapTdxAttestation ,
695+ client_config,
696+ )
697+ . await
698+ . unwrap ( ) ;
696699
697700 assert_eq ! ( retrieved_chain, cert_chain) ;
698701 }
0 commit comments