@@ -24,15 +24,15 @@ public static byte[] GetToken(string appId)
2424 type : LinuxNativeKeyUtils . KeyTypes . User ,
2525 description : $ "{ Constants . TokenCahceServiceName } :{ appId } ",
2626 callout_info : IntPtr . Zero ,
27- dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_USER_SESSION_KEYRING ) ;
27+ dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_SESSION_KEYRING ) ;
2828
2929 if ( key == - 1 )
3030 return new byte [ 0 ] ;
3131
3232 LinuxNativeKeyUtils . keyctl_read_alloc (
3333 key : key ,
3434 buffer : out IntPtr contentPtr ) ;
35- string content = Marshal . PtrToStringAuto ( contentPtr ) ;
35+ string content = Marshal . PtrToStringAnsi ( contentPtr ) ;
3636 Marshal . FreeHGlobal ( contentPtr ) ;
3737
3838 if ( string . IsNullOrEmpty ( content ) )
@@ -55,15 +55,15 @@ public static void SetToken(string appId, byte[] plainContent)
5555 type : LinuxNativeKeyUtils . KeyTypes . User ,
5656 description : $ "{ Constants . TokenCahceServiceName } :{ appId } ",
5757 callout_info : IntPtr . Zero ,
58- dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_USER_SESSION_KEYRING ) ;
58+ dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_SESSION_KEYRING ) ;
5959
6060 if ( key == - 1 )
6161 LinuxNativeKeyUtils . add_key (
6262 type : LinuxNativeKeyUtils . KeyTypes . User ,
6363 description : $ "{ Constants . TokenCahceServiceName } :{ appId } ",
6464 payload : encodedContent ,
6565 plen : encodedContent . Length ,
66- keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_USER_SESSION_KEYRING ) ;
66+ keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_SESSION_KEYRING ) ;
6767 else
6868 LinuxNativeKeyUtils . keyctl_update (
6969 key : key ,
@@ -82,7 +82,7 @@ public static void DeleteToken(string appId)
8282 type : LinuxNativeKeyUtils . KeyTypes . User ,
8383 description : $ "{ Constants . TokenCahceServiceName } :{ appId } ",
8484 callout_info : IntPtr . Zero ,
85- dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_USER_SESSION_KEYRING ) ;
85+ dest_keyring : ( int ) LinuxNativeKeyUtils . KeyringType . KEY_SPEC_SESSION_KEYRING ) ;
8686 if ( key != - 1 )
8787 {
8888 int removedState = LinuxNativeKeyUtils . keyctl_revoke ( key ) ;
0 commit comments