diff --git a/android-client/PMA.Store.pas b/android-client/PMA.Store.pas index de6eb84..fec9f5c 100644 --- a/android-client/PMA.Store.pas +++ b/android-client/PMA.Store.pas @@ -101,6 +101,15 @@ procedure SaveVault(const APlainJson, AETag, ASyncPwd: string; const ASalt: TBytes = nil; AIterations: Integer = 0; AClearPin: Boolean = False); +/// VRAI quand la derniere lecture a echoue parce que la cle protegee a ete +/// DETRUITE par le systeme - verrouillage d'ecran retire ou reinitialise. +/// +/// Un drapeau, et non un test sur le texte du message : c'est exactement ce +/// tri-la, fait sur des chaines, qui detruisait autrefois le cache en se +/// trompant. Ici l'information vient du systeme lui-meme, une seule fois, a +/// l'endroit ou elle est certaine. +function LastStoreKeyInvalidated: Boolean; + /// Le fichier local est-il scelle sous un code d'application ? Lu dans /// l'en-tete, sans rien dechiffrer. function VaultNeedsPin: Boolean; @@ -241,12 +250,18 @@ const var FLastStoreError: string = ''; + FLastStoreKeyInvalidated: Boolean = False; function LastStoreError: string; begin Result := FLastStoreError; end; +function LastStoreKeyInvalidated: Boolean; +begin + Result := FLastStoreKeyInvalidated; +end; + function LocalContainerPath: string; begin Result := TPath.Combine(TPath.GetHomePath, LOCAL_FILE); @@ -1217,6 +1232,7 @@ begin // rien ne pourra rouvrir. if Pos('KeyPermanentlyInvalidated', E.ClassName + E.Message) > 0 then try + FLastStoreKeyInvalidated := True; OpenKeyStore.deleteEntry(StringToJString(KEY_ALIAS_WRAP)); FLastStoreError := FLastStoreError + ' (cle invalidee, jetee)'; except diff --git a/android-client/web/app.html b/android-client/web/app.html index 6b1b79d..4a8c53f 100644 --- a/android-client/web/app.html +++ b/android-client/web/app.html @@ -410,8 +410,13 @@ JAMAIS PRE-REMPLI : le retenir reviendrait a ne rien proteger. -->