Handle new keymaster4 ROLLBACK_RESISTANCE tag in attestation tests.

Keymaster4 introduced new tag ROLLBACK_RESISTANCE that is not understood
by the attestation parser used for CTS and GTS tests. This CL adds support
for them.

Test: run cts -m CtsKeystoreTestCases -t android.keystore.cts.KeyAttestationTest#testEcAttestation --abi arm64-v8a

Bug: 123552933
Change-Id: Ia7eb328348bc9673a2071e7f53951f0510897fb2
Signed-off-by: Juha Maki-Asiala <juha.maki-asiala@bittium.com>
(cherry picked from commit 0fff55cf73eab8e66a43efa6f6e89f7be3348eed)
diff --git a/tests/security/src/android/keystore/cts/AuthorizationList.java b/tests/security/src/android/keystore/cts/AuthorizationList.java
index e4c5eb6..e6849f3 100644
--- a/tests/security/src/android/keystore/cts/AuthorizationList.java
+++ b/tests/security/src/android/keystore/cts/AuthorizationList.java
@@ -185,6 +185,7 @@
     private Date creationDateTime;
     private Integer origin;
     private boolean rollbackResistant;
+    private boolean rollbackResistance;
     private RootOfTrust rootOfTrust;
     private Integer osVersion;
     private Integer osPatchLevel;
@@ -270,6 +271,9 @@
                 case KM_TAG_ROLLBACK_RESISTANT & KEYMASTER_TAG_TYPE_MASK:
                     rollbackResistant = true;
                     break;
+                case KM_TAG_ROLLBACK_RESISTANCE & KEYMASTER_TAG_TYPE_MASK:
+                    rollbackResistance = true;
+                    break;
                 case KM_TAG_AUTH_TIMEOUT & KEYMASTER_TAG_TYPE_MASK:
                     authTimeout = Asn1Utils.getIntegerFromAsn1(value);
                     break;
@@ -535,6 +539,10 @@
         return rollbackResistant;
     }
 
+    public boolean isRollbackResistance() {
+        return rollbackResistance;
+    }
+
     public RootOfTrust getRootOfTrust() {
         return rootOfTrust;
     }
@@ -675,6 +683,10 @@
             s.append("\nRollback resistant: true");
         }
 
+        if (rollbackResistance) {
+            s.append("\nRollback resistance: true");
+        }
+
         if (rootOfTrust != null) {
             s.append("\nRoot of Trust:\n");
             s.append(rootOfTrust);