Compilation and tests fixes
diff --git a/library/psa_crypto.c b/library/psa_crypto.c
index 5ba60e1..329ee3d 100644
--- a/library/psa_crypto.c
+++ b/library/psa_crypto.c
@@ -1304,7 +1304,7 @@
     if ( slot->lifetime == PSA_KEY_LIFETIME_WRITE_ONCE )
         return( PSA_ERROR_KEY_LIFETIME_CHANGE );
         
-    slot->lifetime = liftime;
+    slot->lifetime = lifetime;
 
     return( PSA_SUCCESS );
 }