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

Commit fe090a46 authored by Arve Hjønnevåg's avatar Arve Hjønnevåg
Browse files

trusty: keymaster: set_attestation_key: Change wrapped key

Remove WrappedPrivateKey and select wrapped vs plaintext key command
based on format instead.

Bug: 154033394
Test: send wrapped test key. Not yet accepted by trusty
Change-Id: I3b0a29be78f2a8e84ebd990713f66788256d8e3f
parent 754c6b29
Loading
Loading
Loading
Loading
+8 −3
Original line number Diff line number Diff line
@@ -292,9 +292,14 @@ static int process_xml(xmlTextReaderPtr xml) {
                value = xmlTextReaderConstValue(xml);
                uint32_t cmd;
                if (xmlStrEqual(element, BAD_CAST "PrivateKey")) {
                    if (xmlStrEqual(element_format, BAD_CAST "pem")) {
                        cmd = KM_SET_ATTESTATION_KEY;
                } else if (xmlStrEqual(element, BAD_CAST "WrappedPrivateKey")) {
                    } else if (xmlStrEqual(element_format, BAD_CAST "iecs")) {
                        cmd = KM_SET_WRAPPED_ATTESTATION_KEY;
                    } else {
                        printf("unsupported key format: %s\n", element_format);
                        return -1;
                    }
                } else if (xmlStrEqual(element, BAD_CAST "Certificate")) {
                    cmd = KM_APPEND_ATTESTATION_CERT_CHAIN;
                } else {