@@ -152,12 +152,6 @@ struct FortanixVmeConfig {
152152 /// `true` by default. This enables debug mode of `nitro-cli run-enclave`.
153153 debug_mode : bool ,
154154
155- /// The path to a .json configuration file that specifies the paramaters for the enclave
156- ///
157- /// If this is given, no other entry should be there in the table otherwise
158- /// this will error out.
159- nitro_cli_run_enclave_config : Option < PathBuf > ,
160-
161155 /// fortanix-vme-runner starts a vsock proxy server and
162156 /// is needed if your edp application makes any call to
163157 /// functions like `TcpStream::connect()`.
@@ -229,7 +223,6 @@ impl Default for FortanixVmeConfig {
229223 enclave_name : None ,
230224 cpu_ids : None ,
231225 enclave_cid : None ,
232- nitro_cli_run_enclave_config : None ,
233226 verbose : false ,
234227 eif_file_path : FortanixVmeConfig :: default_eif_path ( ) ,
235228 resource_path : None ,
@@ -269,31 +262,17 @@ fn main() -> anyhow::Result<()> {
269262 fortanix_vme_runner. spawn ( ) . context ( "Failed to start fortanix-vme-runner" ) ?;
270263 }
271264
272- // if config is specified, no other arg should be passed. Reference:
273- // https://docs.aws.amazon.com/enclaves/latest/user/cmd-nitro-run-enclave.html#cmd-nitro-run-enclave-options
274- let nitro_cli_run_enclave = match fortanix_vme_config. nitro_cli_run_enclave_config {
275- Some ( nitro_cli_run_enclave_config) => {
276- command ! {
277- "nitro-cli" => args(
278- "run-enclave" ,
279- "--config" => nitro_cli_run_enclave_config
280- )
281- }
282- } ,
283- None => {
284- command ! {
285- "nitro-cli" => args(
286- "run-enclave" ,
287- "--enclave-name" => ?is_some( fortanix_vme_config. enclave_name) ,
288- "--cpu-count" => ?is_some( fortanix_vme_config. cpu_count. map( |c| c. to_string( ) ) ) ,
289- "--cpu-ids" => ?is_some( fortanix_vme_config. cpu_ids) ,
290- "--eif-path" => & fortanix_vme_config. eif_file_path,
291- "--memory" => fortanix_vme_config. memory. to_string( ) ,
292- "--enclave-cid" => ?is_some( fortanix_vme_config. enclave_cid) ,
293- "--debug-mode" => ?is_true( fortanix_vme_config. debug_mode)
294- )
295- }
296- } ,
265+ let nitro_cli_run_enclave = command ! {
266+ "nitro-cli" => args(
267+ "run-enclave" ,
268+ "--enclave-name" => ?is_some( fortanix_vme_config. enclave_name) ,
269+ "--cpu-count" => ?is_some( fortanix_vme_config. cpu_count. map( |c| c. to_string( ) ) ) ,
270+ "--cpu-ids" => ?is_some( fortanix_vme_config. cpu_ids) ,
271+ "--eif-path" => & fortanix_vme_config. eif_file_path,
272+ "--memory" => fortanix_vme_config. memory. to_string( ) ,
273+ "--enclave-cid" => ?is_some( fortanix_vme_config. enclave_cid) ,
274+ "--debug-mode" => ?is_true( fortanix_vme_config. debug_mode)
275+ )
297276 } ;
298277
299278 run_command ( nitro_cli_run_enclave) ?;
0 commit comments