summaryrefslogtreecommitdiff
path: root/security/keymint/aidl/vts/functional/AttestKeyTest.cpp
Commit message (Collapse)AuthorAgeFilesLines
* KeyMint VTS: don't combine ATTEST_KEY with SIGNDavid Drysdale2021-11-291-15/+15
| | | | | | | | | | | Update the VTS tests so that attestation keys are not created with another purpose. Bug: 197096139 Test: VtsAidlKeyMintTargetTest Merged-In: Ib6e4ad98cbe5c3015138854679b11fa0e683ade9 Change-Id: Ib6e4ad98cbe5c3015138854679b11fa0e683ade9 Ignore-AOSP-First: cross-merge from aosp/master
* KeyMint VTS: catch empty cert chainsDavid Drysdale2021-08-111-0/+3
| | | | | | | | | | | Explicitly detect empty cert chains returned by GenerateKey rather than crashing when trying to dereference the first entry. Bug: 195605180 Test: VtsAidlKeyMintTargetTest Merged-In: Idad2703b458952ff599c6ccdd04a941aef7aedde Change-Id: Idad2703b458952ff599c6ccdd04a941aef7aedde Ignore-AOSP-First: already merged in aosp/master
* KeyMint VTS: improve attestation testsDavid Drysdale2021-06-171-2/+120
| | | | | | | | | | | | | | Check that the various ATTESTATION_ID_* tags are included if they have the correct value, and that keygen fails if they have an invalid value. Also update attestation tags to include vendor/boot patchlevel if they're available. (They always should be, but fixing that is a separate task.) Bug: 190757200 Test: VtsAidlKeyMintTargetTest Change-Id: Ibaed7364c6d08c0982e2a9fb6cb864ae42cf39fe
* KeyMint VTS: test getKeyCharacteristics()David Drysdale2021-06-071-0/+7
| | | | | | | | | Bug: 186685601 Bug: 188855306 Test: VtsAidlKeyMintTargetTest Merged-In: Icf400533b0ded98b9338f2d782d95d90c7efbff4 Change-Id: Icf400533b0ded98b9338f2d782d95d90c7efbff4 Ignore-AOSP-First: already merged in aosp/master
* Merge "KeyMint: improve HAL spec and tests" into sc-devDavid Drysdale2021-05-211-2/+4
|\
| * KeyMint: improve HAL spec and testsDavid Drysdale2021-05-211-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | - clarify & test BIGNUM spec - allow alternative return codes when requesting device unique attestation - use specific error for early boot import failure - test more early boot key scenarios (in post-early-boot mode) Bug: 188672564 Test: VtsAidlKeyMintTargetTest Merged-In: I70a342084a29144aef1ed0ff80fec02cc06ffbc0 Change-Id: I70a342084a29144aef1ed0ff80fec02cc06ffbc0
* | KeyMint vts: Correct the EC curve parameter and some return codeTommy Chiu2021-05-181-4/+4
|/ | | | | | | | | | | Strongbox doens't support p-224. Change the curve to p-256 for better compatibility. Also update the tags to be filtered on the hw-enforcement list. Bug: 186735514 Test: VtsAidlKeyMintTargetTest Change-Id: I3f587c5471ca68b88a565ee9ec2e27d1e9e11b17 Merged-In: Ia8eb4c8e28810de5f37295abd8baed6f01b19a3c
* Merge changes Ic8949e22,Ia3a6363dShawn Willden2021-05-041-0/+3
|\ | | | | | | | | | | * changes: Update DeviceUniqueAttestationTest to match spec Make AttestKeyTest not crash if no cert is returned.
| * Make AttestKeyTest not crash if no cert is returned.Shawn Willden2021-05-031-0/+3
| | | | | | | | | | Test: VtsAidlKeyMintTargetTest Change-Id: Ia3a6363d854742681f684ff989b98b7cfda30746
* | More KeyMint VTS testcasesDavid Drysdale2021-04-301-1/+56
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tests for: - non-prime RSA exponent (fails with CF KeyMint) - RSA exponent value of 3 - key size > 512 for `STRONGBOX` - unknown tag inclusion - CBC input size not block size multiple - challenge omitted for attestation (fails with CF KeyMint) - import RSA key with implicit params - vestigial upgradeKey test - importWrappedKey errors - importWrappedKey sids ignored - duplicate/missing params on begin() - more tests for incompatible params on begin() - HMAC size not multiple of 8 (fails with CF KeyMint) - wrong size caller IV for 3DES rejected - too large MIN_MAC_LENGTH for HMAC - invalid AES-GCM minimum MAC length values - check failed updateAad() cancels operation - check that auto-generated nonces are distinct - (DISABLED_) invoke destroyAttestationIds() - omitting optional RSA keygen tags Also add commenting to illustrate the ASN.1 structure of hex data. Test: VtsKeyMintAidlTargetTest Change-Id: I4663c42671cbb094ffe8d603e0352ffa9f1dbf2e
* Add more symmetric KeyMint testsDavid Drysdale2021-04-301-3/+3
| | | | | | | Also fix some test name comments along the way. Test: VtsKeyMintAidlTargetTest Change-Id: I828acfaa676e1b9fa2e3c6f184f9dafb936b0e82
* Added various vts tests for attestKey.Selene Huang2021-04-241-7/+365
| | | | | | | | | | | | - Added tests for signing attest key with factory chain. - Added test for signing encryption keys. - Added tests for chaining many RSA attest keys on the same chain. - Added tests for chaining many Ec attest keys on the same chain. - Added tests for alternate chaining of rsa-ec-rsa-ec-rsa attesti keys on the same chain. Test: atest VtsAidlKeyMintTargetTest Change-Id: I9c67e2b928d6bba6cc4074a4b65f639f33c9ec26
* Correct error code in attest_key docs.Shawn Willden2021-04-011-0/+30
| | | | | | | | Also adds a test to verify that implementations return the expected error code. Test: VtsAidlKeyMintTargetTest Change-Id: Ic8e9953a2572eb0cc8fefc363934eaf9b432b5a4
* Test that provisioned keys can be used with KeyMintDavid Drysdale2021-03-291-23/+0
| | | | | Test: VtsRemotelyProvisionedComponentTests Change-Id: I2f5187bfb4fd1572d10c306377e07a6d167689fa
* Add KeyPurpose::ATTEST_KEY.Shawn Willden2021-02-171-0/+235
This allows applications to generate their own attestation keys and then use them to attest other application-generated keys. Bug: 171845652 Test: VtsAidlKeyMintTargetTest Change-Id: I32add16dcc2d1b29665a88024610f7bef7e50200