diff --git a/src/test.proto b/src/test.proto index 3ec1a34..934a30f 100644 --- a/src/test.proto +++ b/src/test.proto @@ -94,12 +94,50 @@ message SM2_3_Response { string out_data = 3; } +message ExportPublicKeyRequest { + int32 key_pair_type = 1; +} + +message ImportECCKeyPairRequest { + int32 key_pair_type = 1; + string private_key = 2; + string public_key = 3; +} + +message ImportCertificateRequest { + int32 cer_type = 1; + string in_data = 2; +} + +message ExportCertificateRequest { + int32 cer_type = 1; +} + +message ImportFileRequest { + string filename = 1; + string in_data = 2; +} + +message ExportFileRequest { + string filename = 1; +} + +message ExportResponse { + int32 code = 1; + string msg = 2; + + string out_data = 3; +} + service DeviceService { + rpc GetUseCount(EmptyRequest) returns (StatusResponse) {} + rpc Init(EmptyRequest) returns (StatusResponse) {} rpc Status(EmptyRequest) returns (StatusResponse) {} rpc GetHWCode(EmptyRequest) returns (SingleDataResponse) {} rpc Close(EmptyRequest) returns (StatusResponse) {} rpc ClearApp(EmptyRequest) returns (EmptyResponse) {} + rpc GenerateECCKeyPair(EmptyRequest) returns (StatusResponse) {} rpc UnlockApplicationPIN(ApplicationPINRequest) returns (StatusResponse) {} rpc ChangeApplicationPIN(ApplicationPINRequest) returns (StatusResponse) {} @@ -121,4 +159,12 @@ service DeviceService { rpc SM1Decrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {} rpc SM4Encrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {} rpc SM4Decrypt(SMSymmetricRequest) returns (SMSymmetricResponse) {} + + rpc ExportPublicKey(ExportPublicKeyRequest) returns (ExportResponse) {} + rpc ImportEccKeyPair(ImportECCKeyPairRequest) returns (StatusResponse) {} + rpc ImportCertificate(ImportCertificateRequest) returns (StatusResponse) {} + rpc ExportCertificate(ExportCertificateRequest) returns (ExportResponse) {} + + rpc ImportFile(ImportFileRequest) returns (StatusResponse) {} + rpc ExportFile(ExportFileRequest) returns (ExportResponse) {} }