readCertsListXml: fix IndexOutofBoundsException and erroneous skip.
When reading pastCerts, flags are read along with the hex-encoded
certificate, but the index into the array is updated after reading
the cert, before reading the flags. This leads to an
ArrayIndexOutOfBoundsException. Change the iterator update to be
after both arrays have been processed.
Also move the skipCurrentTag call to the <cert /> parsing section.
The pastSigs tag has nested elements so by the time it has finished
processing, it is already at the pastSigs end-tag, which causes the
parser to continue past the <sigs> entry erroneously.
Bug: 64686581
Test: Builds, boots with app with key rotation history.
Change-Id: I3965ffb5f4306eaddc0a3a959ef0f9674068f9d2
1 file changed