Skip to content
Commit 7ee17aa6 authored by Dan Cashman's avatar Dan Cashman
Browse files

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
parent 6dbf837a
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment