File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -161,9 +161,11 @@ mod tests {
161161 #[ tokio:: test]
162162 async fn verify_der_rejects_missing_attestation_extension ( ) {
163163 let key = KeyPair :: generate_for ( & PKCS_ECDSA_P256_SHA256 ) . unwrap ( ) ;
164+ let alt_names = vec ! [ "missing-attestation.example" . to_string( ) ] ;
164165 let cert = CertRequest :: builder ( )
165166 . key ( & key)
166167 . subject ( "missing-attestation.example" )
168+ . alt_names ( & alt_names)
167169 . usage_server_auth ( true )
168170 . build ( )
169171 . self_signed ( )
@@ -180,9 +182,11 @@ mod tests {
180182 async fn verify_der_rejects_attestation_not_bound_to_cert_key ( ) {
181183 let key = KeyPair :: generate_for ( & PKCS_ECDSA_P256_SHA256 ) . unwrap ( ) ;
182184 let attestation = fake_tdx_attestation ( [ 0u8 ; 64 ] ) ;
185+ let alt_names = vec ! [ "mismatched-attestation.example" . to_string( ) ] ;
183186 let cert = CertRequest :: builder ( )
184187 . key ( & key)
185188 . subject ( "mismatched-attestation.example" )
189+ . alt_names ( & alt_names)
186190 . usage_server_auth ( true )
187191 . attestation ( & attestation)
188192 . build ( )
You can’t perform that action at this time.
0 commit comments