@@ -33,6 +33,8 @@ pub mod delete_client;
3333pub mod list_clients;
3434pub mod psa_generate_random;
3535pub mod psa_raw_key_agreement;
36+ pub mod attest_key;
37+ pub mod prepare_key_attestation;
3638
3739pub use psa_crypto:: types:: algorithm as psa_algorithm;
3840pub use psa_crypto:: types:: key as psa_key_attributes;
@@ -91,6 +93,10 @@ pub enum NativeOperation {
9193 PsaSignMessage ( psa_sign_message:: Operation ) ,
9294 /// PsaVerifyMessage operation
9395 PsaVerifyMessage ( psa_verify_message:: Operation ) ,
96+ /// AttestKey operation
97+ AttestKey ( attest_key:: Operation ) ,
98+ /// PrepareKeyAttestation operation
99+ PrepareKeyAttestation ( prepare_key_attestation:: Operation ) ,
94100}
95101
96102impl NativeOperation {
@@ -121,6 +127,8 @@ impl NativeOperation {
121127 NativeOperation :: PsaRawKeyAgreement ( _) => Opcode :: PsaRawKeyAgreement ,
122128 NativeOperation :: PsaSignMessage ( _) => Opcode :: PsaSignMessage ,
123129 NativeOperation :: PsaVerifyMessage ( _) => Opcode :: PsaVerifyMessage ,
130+ NativeOperation :: AttestKey ( _) => Opcode :: AttestKey ,
131+ NativeOperation :: PrepareKeyAttestation ( _) => Opcode :: PrepareKeyAttestation ,
124132 }
125133 }
126134}
@@ -177,6 +185,10 @@ pub enum NativeResult {
177185 PsaSignMessage ( psa_sign_message:: Result ) ,
178186 /// PsaVerifyMessage result
179187 PsaVerifyMessage ( psa_verify_message:: Result ) ,
188+ /// AttestKey result
189+ AttestKey ( attest_key:: Result ) ,
190+ /// AttestKey result
191+ PrepareKeyAttestation ( prepare_key_attestation:: Result ) ,
180192}
181193
182194impl NativeResult {
@@ -207,6 +219,8 @@ impl NativeResult {
207219 NativeResult :: PsaRawKeyAgreement ( _) => Opcode :: PsaRawKeyAgreement ,
208220 NativeResult :: PsaSignMessage ( _) => Opcode :: PsaSignMessage ,
209221 NativeResult :: PsaVerifyMessage ( _) => Opcode :: PsaVerifyMessage ,
222+ NativeResult :: AttestKey ( _) => Opcode :: AttestKey ,
223+ NativeResult :: PrepareKeyAttestation ( _) => Opcode :: PrepareKeyAttestation ,
210224 }
211225 }
212226}
@@ -367,22 +381,36 @@ impl From<psa_hash_compare::Operation> for NativeOperation {
367381 NativeOperation :: PsaHashCompare ( op)
368382 }
369383}
384+
370385impl From < psa_raw_key_agreement:: Operation > for NativeOperation {
371386 fn from ( op : psa_raw_key_agreement:: Operation ) -> Self {
372387 NativeOperation :: PsaRawKeyAgreement ( op)
373388 }
374389}
390+
375391impl From < psa_sign_message:: Operation > for NativeOperation {
376392 fn from ( op : psa_sign_message:: Operation ) -> Self {
377393 NativeOperation :: PsaSignMessage ( op)
378394 }
379395}
396+
380397impl From < psa_verify_message:: Operation > for NativeOperation {
381398 fn from ( op : psa_verify_message:: Operation ) -> Self {
382399 NativeOperation :: PsaVerifyMessage ( op)
383400 }
384401}
385402
403+ impl From < attest_key:: Operation > for NativeOperation {
404+ fn from ( op : attest_key:: Operation ) -> Self {
405+ NativeOperation :: AttestKey ( op)
406+ }
407+ }
408+ impl From < prepare_key_attestation:: Operation > for NativeOperation {
409+ fn from ( op : prepare_key_attestation:: Operation ) -> Self {
410+ NativeOperation :: PrepareKeyAttestation ( op)
411+ }
412+ }
413+
386414impl From < list_providers:: Result > for NativeResult {
387415 fn from ( op : list_providers:: Result ) -> Self {
388416 NativeResult :: ListProviders ( op)
@@ -526,3 +554,15 @@ impl From<psa_verify_message::Result> for NativeResult {
526554 NativeResult :: PsaVerifyMessage ( op)
527555 }
528556}
557+
558+ impl From < attest_key:: Result > for NativeResult {
559+ fn from ( op : attest_key:: Result ) -> Self {
560+ NativeResult :: AttestKey ( op)
561+ }
562+ }
563+
564+ impl From < prepare_key_attestation:: Result > for NativeResult {
565+ fn from ( op : prepare_key_attestation:: Result ) -> Self {
566+ NativeResult :: PrepareKeyAttestation ( op)
567+ }
568+ }
0 commit comments