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

Commit ed00d254 authored by Bo Zhu's avatar Bo Zhu
Browse files

Change the cert parsing debugging logs to be more meaningful and less

noisy

Test: adb shell am instrument -w -e package \
com.android.server.locksettings.recoverablekeystore \
com.android.frameworks.servicestests/android.support.test.runner.AndroidJUnitRunner

Change-Id: Iee92d0c3fdea597e6ba4c9471554082360a724c7
parent ea7d4f3b
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -170,11 +170,13 @@ public class RecoverableKeyStoreManager {
            certXml = CertXml.parse(recoveryServiceCertFile);
        } catch (CertParsingException e) {
            // TODO: Do not use raw key bytes anymore once the other components are updated
            Log.d(TAG, "Failed to parse the cert file", e);
            Log.d(TAG, "Failed to parse the input as a cert file: " + HexDump.toHexString(
                    recoveryServiceCertFile));
            PublicKey publicKey = parseEcPublicKey(recoveryServiceCertFile);
            if (mDatabase.setRecoveryServicePublicKey(userId, uid, publicKey) > 0) {
                mDatabase.setShouldCreateSnapshot(userId, uid, true);
            }
            Log.d(TAG, "Successfully set the input as the raw public key");
            return;
        }