@@ -21,7 +21,7 @@ mod http;
21
21
#[ derive( Debug , Error ) ]
22
22
pub enum ProxyAttestationClientError {
23
23
#[ error( display = "ProxyAttestationClient: HttpError: {:?}" , _0) ]
24
- HttpError ( io_utils :: http:: HttpError ) ,
24
+ HttpError ( http:: HttpError ) ,
25
25
#[ error( display = "ProxyAttestationClient: Bad Response" ) ]
26
26
BadResponse ,
27
27
}
@@ -40,14 +40,14 @@ pub fn start_proxy_attestation<U: AsRef<str>>(
40
40
let url = format ! ( "http://{}/proxy/v1/Start" , proxy_attestation_server_url_base) ;
41
41
let empty_buffer: String = "" . to_string ( ) ;
42
42
43
- let ( id, nonce) = match post_buffer ( & url, & empty_buffer, None ) . map_err ( |e| {
43
+ let ( id, nonce) = match http :: post_buffer ( & url, & empty_buffer, None ) . map_err ( |e| {
44
44
error ! (
45
45
"Failed to send proxy attestation service start message. Error produced: {}." ,
46
46
e
47
47
) ;
48
48
e
49
49
} ) ? {
50
- HttpResponse :: Created ( location, body) => {
50
+ http :: HttpResponse :: Created ( location, body) => {
51
51
( location, body)
52
52
}
53
53
non_created => {
@@ -77,10 +77,10 @@ pub fn complete_proxy_attestation_nitro(
77
77
form_fields. insert ( "token" . to_string ( ) , base64:: encode ( att_doc) ) ;
78
78
form_fields. insert ( "csr" . to_string ( ) , base64:: encode ( csr) ) ;
79
79
80
- let response = post_form ( url, & form_fields)
80
+ let response = http :: post_form ( url, & form_fields)
81
81
. map_err ( |err| ProxyAttestationClientError :: HttpError ( err) ) ?;
82
82
match response {
83
- HttpResponse :: Ok ( data) => return Ok ( data) ,
83
+ http :: HttpResponse :: Ok ( data) => return Ok ( data) ,
84
84
_ => return Err ( anyhow ! ( ProxyAttestationClientError :: BadResponse ) ) ,
85
85
}
86
86
}
@@ -96,10 +96,10 @@ pub fn complete_proxy_attestation_linux(
96
96
form_fields. insert ( "token" . to_string ( ) , base64:: encode ( token) ) ;
97
97
form_fields. insert ( "csr" . to_string ( ) , base64:: encode ( csr) ) ;
98
98
99
- let response = post_form ( url, & form_fields)
99
+ let response = http :: post_form ( url, & form_fields)
100
100
. map_err ( |err| ProxyAttestationClientError :: HttpError ( err) ) ?;
101
101
match response {
102
- HttpResponse :: Ok ( data) => return Ok ( data) ,
102
+ http :: HttpResponse :: Ok ( data) => return Ok ( data) ,
103
103
_ => return Err ( anyhow ! ( ProxyAttestationClientError :: BadResponse ) ) ,
104
104
}
105
105
}
0 commit comments