@@ -5,7 +5,7 @@ mod test_quote {
5
5
use crate :: common:: create_ctx_with_session;
6
6
use std:: convert:: TryFrom ;
7
7
use tss_esapi:: {
8
- abstraction:: { ak, ek, AsymmetricAlgorithmSelection } ,
8
+ abstraction:: { ak, ek, AsymmetricAlgorithmSelection , no_tpm } ,
9
9
handles:: PcrHandle ,
10
10
interface_types:: {
11
11
algorithm:: { HashingAlgorithm , SignatureSchemeAlgorithm } ,
@@ -16,7 +16,6 @@ mod test_quote {
16
16
Auth , Data , Digest , DigestList , DigestValues , EccSignature , PcrSelectionListBuilder ,
17
17
PcrSlot , Signature , SignatureScheme ,
18
18
} ,
19
- utils,
20
19
} ;
21
20
22
21
fn checkquote_ecc ( hash_alg : HashingAlgorithm ) {
@@ -79,7 +78,7 @@ mod test_quote {
79
78
. unwrap ( ) ;
80
79
81
80
let public = ak_res. out_public ;
82
- assert ! ( utils :: checkquote(
81
+ assert ! ( no_tpm :: checkquote(
83
82
& attest,
84
83
& signature,
85
84
& public,
@@ -88,10 +87,10 @@ mod test_quote {
88
87
)
89
88
. unwrap( ) ) ;
90
89
// Test without pcrs
91
- assert ! ( utils :: checkquote( & attest, & signature, & public, & None , & qualifying_data) . unwrap( ) ) ;
90
+ assert ! ( no_tpm :: checkquote( & attest, & signature, & public, & None , & qualifying_data) . unwrap( ) ) ;
92
91
93
92
let wrong_nonce = vec ! [ 5 , 2 , 3 , 8 , 1 , 4 , 8 ] ;
94
- assert ! ( !utils :: checkquote( & attest, & signature, & public, & None , & wrong_nonce) . unwrap( ) ) ;
93
+ assert ! ( !no_tpm :: checkquote( & attest, & signature, & public, & None , & wrong_nonce) . unwrap( ) ) ;
95
94
96
95
let wrong_ak_res = ak:: create_ak (
97
96
& mut context,
@@ -103,7 +102,7 @@ mod test_quote {
103
102
None ,
104
103
)
105
104
. unwrap ( ) ;
106
- assert ! ( !utils :: checkquote(
105
+ assert ! ( !no_tpm :: checkquote(
107
106
& attest,
108
107
& signature,
109
108
& wrong_ak_res. out_public,
@@ -117,7 +116,7 @@ mod test_quote {
117
116
. with_selection ( HashingAlgorithm :: Sha256 , & [ PcrSlot :: Slot2 ] )
118
117
. build ( )
119
118
. expect ( "Failed to create PcrSelectionList" ) ;
120
- assert ! ( !utils :: checkquote(
119
+ assert ! ( !no_tpm :: checkquote(
121
120
& attest,
122
121
& signature,
123
122
& public,
@@ -131,7 +130,7 @@ mod test_quote {
131
130
wrong_pcr_data. add ( pcr_data. value ( ) [ i] . clone ( ) ) . unwrap ( ) ;
132
131
}
133
132
wrong_pcr_data. add ( pcr_data. value ( ) [ 0 ] . clone ( ) ) . unwrap ( ) ;
134
- assert ! ( !utils :: checkquote(
133
+ assert ! ( !no_tpm :: checkquote(
135
134
& attest,
136
135
& signature,
137
136
& public,
@@ -152,7 +151,7 @@ mod test_quote {
152
151
ecc. signature_r ( ) . clone ( ) ,
153
152
)
154
153
. unwrap ( ) ;
155
- assert ! ( !utils :: checkquote(
154
+ assert ! ( !no_tpm :: checkquote(
156
155
& attest,
157
156
& Signature :: EcDsa ( wrong_signature) ,
158
157
& public,
@@ -226,7 +225,7 @@ mod test_quote {
226
225
. execute_without_session ( |ctx| ctx. pcr_read ( pcr_selection_list) )
227
226
. unwrap ( ) ;
228
227
229
- assert ! ( utils :: checkquote(
228
+ assert ! ( no_tpm :: checkquote(
230
229
& attest,
231
230
& signature,
232
231
& ak_rsa. out_public,
0 commit comments