Service specific error will be part of the description if applicable.
Bug: 312671886
Test: adb shell rkp_factory_extraction_tool
Change-Id: I071cf8bd892c3731de052dafb69a7d2029bf8b03
[Description]
1.Add patch to modify rkp_factory_extraction_tool, so
that it can meet TV customer's factory product line.
2.Introduce a new input parameter, serialno_prop,
to the function jsonEncodeCsrWithBuild.
3.Use the new property of serialno_prop if it is set,
otherwise defaults to "ro.serialno".
Test:
1.build pass
2.AC on/off pass
3.run "rkp_factory_extraction_tool
--output_format build+csr
--serialno_prop $(customer_prop) > csr.json" pass
4.run "rkp_factory_extraction_tool
--output_format build+csr > csr.json" pass
5.VtsHalRemotelyProvisionedComponentTargetTest pass
6.libkeymint_remote_prov_support_test pass
7.VtsAidlKeyMintTargetTest pass
Bug: 313811996
Change-Id: I261f7ae1b3b4c3e2776ec4013c77b7be355477cf
Revert submission 2706393-static-link-hwtrust
Reason for revert: This seems to be causing CFI failures.
Reverted changes: /q/submissionid:2706393-static-link-hwtrust
Change-Id: I5b301341ee869ace00a1314e65fbdc5e34863b64
We publish a prebuilt rkp_factory_extraction_tool online, so we should
only dynamically load the libraries that we cannot avoid (e.g. libdl)
Test: built and ran tool
Change-Id: Id109e12dde841797169f0a4e54fa2ede558da252
We will be publishing more tools for partners, and they should live
together. With that in mind, move the rkp_factory_extraction_tool dist
to "rkp/" instead of "rkp_factory_extraction_tool/".
Test: Built it
Change-Id: Ic86fe555a75dfe12a4cae1b4be48c33bae95ecbb
This way, we run the self test when extracting a CSR on the factory
line by default. This will ensure that devices producing bad payloads
will be more likely to be caught earlier in the manufacturing flow.
Test: ran tool devices with V2 and V3 HALs
Bug: 284098419
Change-Id: I79b50da7f86da50ebcfe18caf06046f1a39c6e81
This library is expensive and getting info from it should be delegated
to service manager.
Test: showmap $(pidof credstore) # before and after
Bug: 280829178
Change-Id: I26524e2c519a869b4cd5bd44b16f92cc8e29f50d
The data format changed a bit, and the fingerprint needs to be included
at the end of the CSRv3 data. Make sure to include that, else the RKP
server rejects the payload.
Test: run tool + upload output
Test: rkp_factory_extraction_lib_test
Change-Id: I5a13b21e65c64f19b9417a7d1e169710867e7a8f
The code is mostly from credstore. The intention here is that we replace
that code with a common library.
Test: librkp_support_test
Change-Id: I28ebc5a253c037277dad6d39b761b4e8aa4347e8
Remove the vendor entry in Android.bp and replace it with a
vendor_available=true clause. This will allow OEMs building devices with
a newer system image but older vendor to still incorporate the latest
changes to the tool.
Bug: 253979894
Test: Image builds
Change-Id: I4995ffef26a037fa27514383f8c32c37e1ffe087
Self test mode gets a test CSR and validates it.
Test: rkp_factory_extraction_tool --self_test
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Bug: 239839050
Change-Id: Ib4b0221ffcf56b60ded1ac2a1f85eddb77729cbf
This way, partners doing testing can see if they are getting bad device
info before they try to upload it to the backend.
This also acts as a check on the factory line, in case a device is
misprovisioned or defective, it can be discoverd earlier in the
manufacturing process (as CSRs tend to be uploaded at the very end).
Test: atest VtsHalRemotelyProvisionedComponentTargetTest
Test: rkp_factory_extraction_tool
Bug: 239838563
Change-Id: I8da97a9740cccb3263d21b07ba9d678513a337c8
This way, we can unit test the library in preparation for up-coming
changes that will verify the outputs. This will serve as an extra
layer of checking for factory lines, where they want to be extra
sure that a device is outputing correct information at various stages
of the pipe.
Bug: 239838563
Test: rkp_factory_extraction_lib_test
Change-Id: I018194673820d2b31c18d30057aa533cb4fe090e
Since we maybe have more than 1 RKP instances on the device, add the
instance name in JSON for better visibility.
Bug: 223509807
Test: libkeymint_remote_prov_support_test
Change-Id: I1657ecb3abba886f2f7682997e72e428f3d6993e
This change alters the behavior of the factory extraction tool to query
the underlying IRPC HAL implementation for which ECC curve it supports.
The tool then chooses the correct corresponding production EEK chain
based on that to pass back into the HAL implementation for CSR
generation.
Bug: 215445120
Test: run the extraction tool
Change-Id: Ic80e38ec4c30eff970926ed269693ee1167b168c
When using the rkp_factory_extraction_tool in test mode, a fake device
key is generated on the fly. This makes verifying the output difficult
as the key is permanently lost.
In test mode, print out the generated keys so that we can test if the
output data is good or not.
Test: Manually tested against backend service tooling not in AOSP
Change-Id: Ibc30044c03f5107990da6d3a03b17aa652d4b1bc
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same 'ndk' backend.
Bug: 161456198
Test: m
Change-Id: Ibeb4178f99857be75bb5f83a073a2d679058d921
1. The MAC tag value was not being included in the uploaded data, so
it was previosly impossible to verify the keys to sign mac.
2. The device info is supposed to be an array with [Verified,
Unverified] info. It was previously just the verified info.
Test: Manual. Uploaded sample data to device info service.
Change-Id: I096bc5ded0b38fc56864e75c5e06dfbef62e9a74
Bug: 194492359
The binary depended on a number of shared libs, but now uses static
linking where possible.
Stop linking to libvintf, which may not be available in a factory
image (it's not vendor-available).
Mark rkp_factory_extraction_tool as a vendor binary, allowing it to
be included in factory images.
Bug: 191301285
Test: Manually run tool on device
Change-Id: I1747f809ffd2d3d605c9f4ee81e9f40cc3a189c4
The JSON format is suitable for uploading as test data. It also
includes the build fingerprint, which is required by the backend
to associate the CSR with a particular device family.
Bug: 191301285
Test: Manually run the tool with various --output_format flags
Change-Id: I1d787271c52a25df2d16a6d88dd7b278407ff4b7
Merged-In: I1d787271c52a25df2d16a6d88dd7b278407ff4b7
The challenge was previously hard-coded to an empty string previously.
Though it's not necessarily required for remote key provisioning
certificate signing requests, go ahead and include good randomness
(via getrandom) into the csr.
Bug: 191301285
Test: Manually run rkp_factory_extraction_tool
Change-Id: I68e7d86259c67d40ecbb0c9e4ecac22954757dd3
Merged-In: I68e7d86259c67d40ecbb0c9e4ecac22954757dd3
The production Google Endpoint Encryption Key has been generated, so
include it in the tooling that is used at the factory to encrypt the
Boot Certificate Chain.
Keep test mode support around, gating it behind a flag.
Test: librkp_factory_extraction_test
Bug: 191301285
Change-Id: I62d6251610aab10b91661eda3ae801f1bb6ff5dc
Merged-In: I62d6251610aab10b91661eda3ae801f1bb6ff5dc
Reduce duplicated code, hooray. Also, we'll be adding the real EEK to
the support library, so prepare for that by linking it now.
Bug: 191301285
Test: Manually run rkp_factory_extraction_tool
Change-Id: I7e1695e3a512be01e24f681aa0a369d3482ad383
Merged-In: I7e1695e3a512be01e24f681aa0a369d3482ad383
This tool has been made obsolete by rkp_factory_extraction_tool
Test: n/a -- nothing uses this tool
Change-Id: Ic15ff9e526809dd7dae0d9f17b79fd7ff87f61c7
This binary gets added to the system image under
/bin/rkp_factory_extraction_tool. The purpose of this tool is to query
every IRemotelyProvisionedComponent interface in the device manifest and
print out a CertificateRequest to stdout for each interface.
The CertificateRequest will contain no keys to sign and a semantically
useless challenge, since this tool is just for key upload. The items of
value will be the DeviceInfo CBOR blob which will get associated with
the encrypted device public key once it is uploaded to the backing
servers and decrypted.
The tool will fail if it is unable to successfully query an
IRemotelyProvisionedComponent interface that is specified in the device
manifest file.
Test: Build and run
Change-Id: Ia82787749be5963567019f6523075100208aa101