Allow extra error code in device ID attestation

Generalize the existing helper function to allow more variants.

Remove a couple of pointless invocations of the existing helper.

Bug: 286733800
Test: VtsAidlKeyMintTargetTest
(cherry picked from https://android-review.googlesource.com/q/commit:f42238c99ffe0df2e51cec84a96ed859a878b2b0)
Merged-In: Ic01c53cbe79f55c2d403a66acbfd04029395c287
Change-Id: Ic01c53cbe79f55c2d403a66acbfd04029395c287
4 files changed