File tree Expand file tree Collapse file tree 2 files changed +4
-9
lines changed
providers/trusted_service/context Expand file tree Collapse file tree 2 files changed +4
-9
lines changed Original file line number Diff line number Diff line change @@ -74,15 +74,10 @@ impl Context {
7474
7575 info ! ( "Obtaining a crypto Trusted Service context." ) ;
7676 let mut status = 0 ;
77- let service_context = unsafe {
78- service_locator_query (
79- CString :: new ( "sn:trustedfirmware.org:crypto:0" )
80- . unwrap ( )
81- . into_raw ( ) ,
82- & mut status,
83- )
84- } ;
77+ let service_name = CString :: new ( "sn:trustedfirmware.org:crypto:0" ) . unwrap ( ) ;
78+ let service_context = unsafe { service_locator_query ( service_name. as_ptr ( ) , & mut status) } ;
8579 if service_context. is_null ( ) {
80+ error ! ( "Locating crypto Trusted Service failed, status: {}" , status) ;
8681 return Err ( io:: Error :: new (
8782 io:: ErrorKind :: Other ,
8883 "Failed to obtain a Trusted Service context" ,
Original file line number Diff line number Diff line change @@ -370,7 +370,7 @@ unsafe fn get_provider(
370370 }
371371 #[ cfg( feature = "trusted-service-provider" ) ]
372372 ProviderConfig :: TrustedService { .. } => {
373- info ! ( "Creating a TPM Provider." ) ;
373+ info ! ( "Creating a Trusted Service Provider." ) ;
374374 Ok ( Some ( Arc :: new (
375375 TrustedServiceProviderBuilder :: new ( )
376376 . with_key_info_store ( kim_factory. build_client ( ProviderId :: TrustedService ) )
You can’t perform that action at this time.
0 commit comments