Commit Graph

802 Commits

Author SHA1 Message Date
Treehugger Robot
de291dabb4 Merge "Keystore 2.0: isKeystore2Enabled returned wrong value." am: 51bf93a35a am: f8a276f313 am: da743b68a4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1572822

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I91ccdfa9250800092160c1fb79e168213af87c43
2021-02-03 23:23:20 +00:00
Treehugger Robot
51bf93a35a Merge "Keystore 2.0: isKeystore2Enabled returned wrong value." 2021-02-03 19:34:56 +00:00
Janis Danisevskis
e359de094e Keystore 2.0: isKeystore2Enabled returned wrong value.
Test: Keystore 2.0 is used by certain system apps (Settings, Keychain)
      when enabled.
Change-Id: Idc3f27577df684561d403047a1e611bdc1350409
2021-02-03 08:44:14 -08:00
Treehugger Robot
892c82e0f2 Merge changes from topic "limited_use_keys"
* changes:
  Add limited use keys related API into Keystore 2.0 SPI.
  Limited use key: feature flags.
2021-02-03 16:42:01 +00:00
Qi Wu
cca3d81204 Add limited use keys related API into Keystore 2.0 SPI.
Bug: b/174140443
Test: atest CtsKeystoreTestCases

The new CTS tests for this feature is introduced in aosp/1556464

Change-Id: I9620c4a3e5d2c10ed8a50d494e63eb2fb19dabef
Merged-In: I9620c4a3e5d2c10ed8a50d494e63eb2fb19dabef
2021-02-03 07:17:04 +00:00
Qi Wu
fcb4e8ee2d Add limited use keys related API into Keystore 2.0 SPI.
Bug: b/174140443
Test: atest CtsKeystoreTestCases

The new CTS tests for this feature is introduced in aosp/1556464

Change-Id: I9620c4a3e5d2c10ed8a50d494e63eb2fb19dabef
2021-02-03 07:11:33 +00:00
Treehugger Robot
34becf1760 Merge "Update frameworks to use unbundled version of BouncyCastle." am: 19547685bb am: 36adf13e62 am: c3c1cd54e4
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559779

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iaf00137fbdfc3dacd99537f9f4e2da0ffbc9a844
2021-02-02 15:59:03 +00:00
Treehugger Robot
19547685bb Merge "Update frameworks to use unbundled version of BouncyCastle." 2021-02-02 14:37:05 +00:00
Janis Danisevskis
e352e1f919 Merge "Keystore 2.0 SPI: Small fix to apease CTS test." am: f246dc6346 am: b30a7eb006 am: 69ffb7d195
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1564074

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Idc461fac1698ab72d6fc7ce2b692197fc0f38f6b
2021-02-01 21:18:38 +00:00
Janis Danisevskis
05943c30a1 Keystore 2.0 SPI: Small fix to apease CTS test.
* The Keystore SPI needs to return null if getKeyEntry is called on a
  pure certificate entry.
* Also checked the wrong purpose.

Test: Keystore CTS tests.
Change-Id: Ib668447a9ff56fc4cea550f547c6cbfea3590cb3
2021-01-31 20:41:51 -08:00
Treehugger Robot
468a665964 Merge "Keystore 2.0 SPI: Add back-off hint to BackendBusyException." am: 9aba68730c am: b03763fb58 am: 1f8a1b854d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1558768

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id9b14285a83ca6b8c9b603c47e33382b10335161
2021-01-28 22:46:18 +00:00
Treehugger Robot
4c0229d58e Merge "Keystore 2.0: Add human readable strings to Keystore exceptions." am: 4844c2065b am: 8fa4c0f37e am: 62b031351a
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546382

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I1beb7bbd7fcfa50428e0c6e1bde9e7485261a50f
2021-01-28 20:42:42 +00:00
Treehugger Robot
9aba68730c Merge "Keystore 2.0 SPI: Add back-off hint to BackendBusyException." 2021-01-28 20:39:01 +00:00
Treehugger Robot
4844c2065b Merge "Keystore 2.0: Add human readable strings to Keystore exceptions." 2021-01-28 18:01:44 +00:00
Janis Danisevskis
f4c64ad3e2 Keystore 2.0 SPI: Add back-off hint to BackendBusyException.
BackendBusyException now returns a back-off hint that API users can use
to implement their retry loop.

Bug: 174761871
Test: N/A
Change-Id: I95662a5a5432965de365017eae43c502eb5bfc06
2021-01-28 09:23:21 -08:00
Treehugger Robot
d6e1adf8e5 Merge "ECDH SPI interface" am: e43b86d5b1 am: 5e78686425 am: 42cc0967a5
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1542804

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id09498294433c647915894a00d6b1f5e92acebb4
2021-01-28 14:59:03 +00:00
Daulet Zhanguzin
59444d5be7 Update frameworks to use unbundled version of BouncyCastle.
Previously BouncyCastle methods were exposed as libcore APIs (@CorePlatformApi), which no longer possible when ART is updatable module (and can't guarantee BouncyCastle API stability)

Bug: 154796679
Test: Treehugger

Change-Id: I908681841a6766de88761767c77c4e2d4b5f56d5
2021-01-28 07:51:22 +00:00
Bram Bonné
b3c666454e ECDH SPI interface
Test: atest KeyAgreementTest
Bug: 171847641
Change-Id: I7cb0c713e3797bb738a6134c690824e762346d4f
2021-01-27 10:54:47 +01:00
Treehugger Robot
6f77754650 Merge "Keystore 2.0 SPI Small doc comment fixup." am: 37356f4149 am: 1d4d6f4caa am: 2461dcf65f
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1561316

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Id91035ac8a2eb0e89f8aaa67027185a279ac3533
2021-01-27 08:05:43 +00:00
Treehugger Robot
35fe58bb8e Merge "Keystore 2 SPI: Fix KeyStorePublicKey getEncoded()." am: 9e5385798e am: 050882545c am: a38be41f98
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1559984

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I2aa3d12fc66b123fbba7af6ede0b2a91e159be1d
2021-01-27 07:59:53 +00:00
Janis Danisevskis
e553efeb7a Keystore 2.0 SPI Small doc comment fixup.
Test: N/A
Change-Id: Ia54b912092431569cac64e228b902abd6383f728
2021-01-26 16:49:16 -08:00
Janis Danisevskis
a7303378bc Keystore 2 SPI: Fix KeyStorePublicKey getEncoded().
AndroidKeyStorePublicKey now returns the encoded key instead of the
encoded certificate.

Test: Keystore CTS tests.
Bug: 178456047
Change-Id: I2c9b44bd13c702545b33ed0fb4c7e802c13851f6
2021-01-26 08:14:00 -08:00
Treehugger Robot
758c0c54bf Merge "Keystore 2.0: Integrate onLockScreenEvent." am: 01460b0bd8 am: 2670006095 am: 396957acad
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1546381

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I801c764ca7c4927ff7ac57e6a9b130e803fa8ebd
2021-01-20 23:25:35 +00:00
Treehugger Robot
a4659cc4fe Merge "Keystore 2.0 SPI: Use Timestamp from secure clock service" am: f327ea256c am: 5e27a324ac am: 7108d008db
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538990

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I574f5752b3b6e3aabad3305084048ff08c6dd63a
2021-01-20 18:56:22 +00:00
Janis Danisevskis
283c206e2a Merge "Integrate IKeystoreAuthorization aidl's addAuthToken with Keystore SPI." am: 9740651028 am: fc80cfcd25 am: 73326c9ebe
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553976

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ia5eb3d8f5b47c833c087d65536b1ccf30b3b9ec5
2021-01-19 22:58:21 +00:00
Janis Danisevskis
a7a9e7af3d Keystore 2.0: Add human readable strings to Keystore exceptions.
Test: N/A
Change-Id: Ic07ca2329c6ebf3dacddf687cc85935e2bfa0cdd
2021-01-19 10:10:20 -08:00
Hasini Gunasinghe
49e239ec96 Keystore 2.0: Integrate onLockScreenEvent.
This patch updates LockSettingService and TrustManagerService to use the
new Keystore 2.0 authorization api.

Bug: 166672367
Test: VTS test
Change-Id: I5494d7b923d33d447488a0c67ada43d1f9593861
2021-01-19 10:10:20 -08:00
Janis Danisevskis
f9c123d7da Keystore 2.0 SPI: Use Timestamp from secure clock service
Test: N/A
Change-Id: I20e925e2827a6485b187d20b737456e8a5d4c437
2021-01-19 10:10:20 -08:00
Hasini Gunasinghe
5364fce817 Integrate IKeystoreAuthorization aidl's addAuthToken with Keystore SPI.
This CL introduces the Keystore SPI class for IKeystoreAuthorization
aidl interface and implements the calling code for addAuthToken method.

Bug: 166672367
Bug: 177830239
Bug: 177791435
Bug: 177787061
Bug: 177787180
Test: VTS test
Change-Id: I9f0adc97efadd0fa1a1f16dd5ec811f4151a2b03
2021-01-19 14:41:03 +00:00
Louis Chang
bfcc7e5f4f Merge "Revert "Integrate IKeystoreAuthorization aidl's addAuthToken wit..."" am: 5896e8c4fd am: ec5b2c95cd am: 9937680764
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1553467

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ie0cdc4f92c34085bd4faad4fce9807dbedaa7bfa
2021-01-18 16:47:47 +00:00
Louis Chang
5896e8c4fd Merge "Revert "Integrate IKeystoreAuthorization aidl's addAuthToken wit..."" 2021-01-18 14:58:14 +00:00
Alex Johnston
f273e8e318 Merge "Add KeyChain Test API for the credential manager" 2021-01-18 13:48:31 +00:00
Louis Chang
589975d198 Revert "Integrate IKeystoreAuthorization aidl's addAuthToken wit..."
Revert submission 1519257-rename_auth_service

Reason for revert: breaking WM presubmit, b/177787180
Reverted Changes:
Ib847b68d4:Integrate IKeystoreAuthorization aidl's addAuthTok...
I7893ab452:Integrate IKeystoreAuthorization aidl's addAuthTok...
I4a092119c:Implement addAuthToken method of IKeystoreAuthoriz...

Change-Id: Iea9bf7e7b3d1e968bbbe39f4ec08dcc3577cee07
2021-01-18 10:01:12 +00:00
Treehugger Robot
eb9cf95d7f Merge "Integrate IKeystoreAuthorization aidl's addAuthToken with Keystore SPI." am: 1ef847338e am: 4ed74ba3f1 am: e7c4ffdae2
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519257

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Ic35ee1e49978c705ca765e4c8fbe7117c398abc0
2021-01-16 23:17:12 +00:00
Treehugger Robot
1ef847338e Merge "Integrate IKeystoreAuthorization aidl's addAuthToken with Keystore SPI." 2021-01-16 22:05:18 +00:00
Treehugger Robot
c83ba4d50c Merge "Keystore 2.0 SPI: Fix bug in chunked streamer." am: 3af57cab3a am: 4b1f565fc0 am: cbb3d15358
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1552674

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I6dd2fc4918b0264c08135036a56d06f9408031b5
2021-01-16 00:04:44 +00:00
Janis Danisevskis
adeebe5e38 Keystore 2.0 SPI: Fix bug in chunked streamer.
The chunked streamer sent the chunk buffer prematurely leading to
oversized and garbage data sent to keystore.

Test: atest android.keystore.cts.SignatureTest#testSmallMsgKat
Change-Id: I84e40766b735f05b3fb7e0e692d26a25a0496649
2021-01-15 08:36:47 -08:00
Hasini Gunasinghe
2d29591e51 Integrate IKeystoreAuthorization aidl's addAuthToken with Keystore SPI.
This CL introduces the Keystore SPI class for IKeystoreAuthorization
aidl interface and implements the calling code for addAuthToken method.

Bug: 166672367
Test: VTS test
Change-Id: I7893ab4520b16533b9fddc9909297856e0b523ae
2021-01-14 17:09:06 -08:00
Alex Johnston
ad53ef61e7 Add KeyChain Test API for the credential manager
* Add setCredentialManagementApp and
  removeCredentialManagementApp
  to KeyChain
* Add permission to manage credential
  management app, which is to be used in
  CTS tests

Bug: 165641221
Test: atest android.devicepolicy.cts.CredentialManagementAppTest
Change-Id: I8487ebc13758a31639d55c8e380faa51d1cfd843
2021-01-12 14:26:56 +00:00
Janis Danisevskis
97ad203382 Merge "Keystore 2.0: Fix wrong exception returned on not authenticated." am: 89ec9d42d9 am: 70f3932f23 am: deb3fc814c
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1538989

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I7f17f052e551c14ccdfcdb193f2648f779548999
2021-01-06 20:16:48 +00:00
Janis Danisevskis
2e494c0577 Keystore 2.0: Fix wrong exception returned on not authenticated.
Test: CtsVerifier fingerprint bound key test.
Change-Id: I0aa897455b88d7a709e4de6b515eef43bc15d053
2021-01-06 10:23:30 -08:00
Rubin Xu
49dd77abf0 Merge "Allow KeyChain.bindAsUser() to be called on the main thread" 2021-01-06 11:30:30 +00:00
Treehugger Robot
5bdd02628d Merge "Keystore 2.0: Android Protected Confirmation" am: 30841f177c am: 3443d2b671 am: ca6272cf1e
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1508897

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I9bb924273fb712efb270e8afbe194604ce1f90ce
2021-01-06 01:52:47 +00:00
Treehugger Robot
30841f177c Merge "Keystore 2.0: Android Protected Confirmation" 2021-01-05 23:29:35 +00:00
Rubin Xu
392e1e23e5 Allow KeyChain.bindAsUser() to be called on the main thread
KeyChain.bindAsUser() couldn't be called on the main thread because
it was using the main thread to handle service connection callback.
Add an overload of KeyChain.bindAsUser() that accepts an alternative
handler to process the connection callback, which makes it possible
to call KeyChain from the main UI thread directly.

Bug: 165641221
Test: atest KeyChainTests
Test: m RunKeyChainRoboTests
Change-Id: I4290bccf5ae04de0d84c7091729e86704b937295
2020-12-22 22:38:26 +00:00
Treehugger Robot
372a2c302d Merge "Keystore 2.0 SPI: Switch to aidl union KeyParameters" am: 220d33ce2c am: 1769b6bd16 am: 2fd2954c84
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1532513

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: Iffa2479320dd97650460690652732b59d23c248c
2020-12-22 07:01:45 +00:00
Treehugger Robot
21e0150463 Merge changes I316fdb8b,I99c1bd49 am: 572416b317 am: a4f1b7e82a am: f491d4bca8
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1519116

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5bd177a8244c91089495d2a9d2a9e9c5ca03d300
2020-12-22 06:56:26 +00:00
Treehugger Robot
220d33ce2c Merge "Keystore 2.0 SPI: Switch to aidl union KeyParameters" 2020-12-21 18:10:58 +00:00
Janis Danisevskis
a80fd14256 Keystore 2.0 SPI: Public key operation workaround.
Test: Keystore cts tests.
Change-Id: I316fdb8beae018ac91c172dede735e6b0759368a
2020-12-18 11:15:27 -08:00
Janis Danisevskis
efaff8f604 Keystore 2.0 SPI: Bug fixes
* Correctly recover public key from certificate.
* KeyStore2ParameterUtils: iterate through set flags instead of unset
  flags.
* Return private key on Keystore.getKey() instead of public key.

Test: Keystore CTS tests
Change-Id: I99c1bd49ff5cf7a2d89b54559504e67b3def0cd3
2020-12-18 11:09:06 -08:00