Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c8b068ce authored by Alex Klyubin's avatar Alex Klyubin Committed by Android Git Automerger
Browse files

am cf2999aa: Merge "Handle KM_ERROR_CALLER_NONCE_PROHIBITED." into mnc-dev

* commit 'cf2999aa':
  Handle KM_ERROR_CALLER_NONCE_PROHIBITED.
parents 1d8aae3b cf2999aa
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -238,6 +238,8 @@ public final class KeymasterDefs {
        sErrorCodeToString.put(KM_ERROR_UNSUPPORTED_EC_FIELD, "Unsupported EC field");
        sErrorCodeToString.put(KM_ERROR_MISSING_NONCE, "Required IV missing");
        sErrorCodeToString.put(KM_ERROR_INVALID_NONCE, "Invalid IV");
        sErrorCodeToString.put(KM_ERROR_CALLER_NONCE_PROHIBITED,
                "Caller-provided IV not permitted");
        sErrorCodeToString.put(KM_ERROR_UNIMPLEMENTED, "Not implemented");
        sErrorCodeToString.put(KM_ERROR_UNKNOWN_ERROR, "Unknown error");
    }
+2 −0
Original line number Diff line number Diff line
@@ -74,6 +74,8 @@ abstract class KeyStoreCryptoOperationUtils {
        switch (beginOpResultCode) {
            case KeymasterDefs.KM_ERROR_INVALID_NONCE:
                return new InvalidAlgorithmParameterException("Invalid IV");
            case KeymasterDefs.KM_ERROR_CALLER_NONCE_PROHIBITED:
                return new InvalidAlgorithmParameterException("Caller-provided IV not permitted");
        }

        // General cases