Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
257 commits
Select commit Hold shift + click to select a range
2c8b767
Resructured code and related changes
cpathak Nov 28, 2020
d13e552
Merge pull request #40 from cpathak/RestructuredCode
BKSSMVenkateswarlu Nov 29, 2020
85b2787
Added new function isUpgrading inside KMSEProvider
BKSSMVenkateswarlu Nov 29, 2020
4fa7b5f
Update README.md
BKSSMVenkateswarlu Nov 30, 2020
5c0f549
Update README.md
BKSSMVenkateswarlu Nov 30, 2020
ac67454
Added a protected function validateApduHeader so that subclass of KMK…
BKSSMVenkateswarlu Nov 30, 2020
5cac465
Merge branch 'provision_split' into android_se_provider
BKSSMVenkateswarlu Dec 1, 2020
938e3b6
Merge pull request #13 from BKSSMVenkateswarlu/android_se_provider
Dec 1, 2020
8068b05
Merge pull request #41 from divegeek/master
BKSSMVenkateswarlu Dec 1, 2020
70cbb3a
Added provision_tool source
BKSSMVenkateswarlu Dec 8, 2020
f5e4c1f
Fixed the VTS 4.1 EarlyBootEnded usecase with DeleteKey
BKSSMVenkateswarlu Dec 8, 2020
3723911
1. Used libjsoncpp for parsing json file
BKSSMVenkateswarlu Dec 9, 2020
4721737
Clear the certificate chain persisted in memory whenever provisionCer…
BKSSMVenkateswarlu Dec 9, 2020
be48ac5
Merge branch 'master' into provision_support
BKSSMVenkateswarlu Jan 11, 2021
107807a
HAL fixes shared by NXP team.
BKSSMVenkateswarlu Jan 12, 2021
61fbb90
Create operation handle map in HAL to differentiate between public an…
BKSSMVenkateswarlu Jan 13, 2021
1d243d9
Pass hal generated operation handle to abort() call from update and f…
BKSSMVenkateswarlu Jan 13, 2021
166c6b1
Added comments for the newly added code.
BKSSMVenkateswarlu Jan 14, 2021
732a4ed
updated provisioning tool
BKSSMVenkateswarlu Jan 14, 2021
c93390f
Used Rand_bytes for hal generated operation handle.
BKSSMVenkateswarlu Jan 15, 2021
775da64
Clearing the operation data inside the operation context
BKSSMVenkateswarlu Jan 15, 2021
cd7a9a8
Added comments for getBlockAlignedData function
BKSSMVenkateswarlu Jan 17, 2021
08658b8
Merge pull request #42 from BKSSMVenkateswarlu/hal_fixes
BKSSMVenkateswarlu Jan 17, 2021
751a1ce
Handle extended errorcodes in HAL
BKSSMVenkateswarlu Jan 19, 2021
43708f4
1. Exception handling for CryptoException and Generic exceptions
BKSSMVenkateswarlu Jan 19, 2021
c85f139
Remove trusted confirmation related code
BKSSMVenkateswarlu Jan 20, 2021
36cdea0
Corrected the extended error code values.
BKSSMVenkateswarlu Jan 20, 2021
14bec57
certificate chain input validation
BKSSMVenkateswarlu Jan 20, 2021
33cdd6c
1. Renamed INS_SHARED_SECRET to INS_PRESHARED_SECRET.
BKSSMVenkateswarlu Jan 21, 2021
e4b998c
Fixed the issue with KMFunctionalTest
BKSSMVenkateswarlu Jan 21, 2021
0e995bb
Renamed SHARED_SECRET to PRESHARED_SECRET
BKSSMVenkateswarlu Jan 21, 2021
ceecbec
Merge pull request #43 from BKSSMVenkateswarlu/applet_fixes
BKSSMVenkateswarlu Jan 21, 2021
bb47f0f
Merge pull request #44 from BKSSMVenkateswarlu/handle_extended_errorc…
BKSSMVenkateswarlu Jan 21, 2021
7698426
Corrected the month milliseconds hex value
BKSSMVenkateswarlu Jan 21, 2021
976c25b
Merge pull request #45 from BKSSMVenkateswarlu/applet_fixes
BKSSMVenkateswarlu Jan 21, 2021
523c01b
Removed authenticationIdentifier from cert params
BKSSMVenkateswarlu Jan 21, 2021
dd5eb1c
Merge pull request #46 from BKSSMVenkateswarlu/handle_extended_errorc…
BKSSMVenkateswarlu Jan 21, 2021
59e886f
Fixed the issue with keyblob decryption with AndroidSEProvider
BKSSMVenkateswarlu Jan 21, 2021
584884f
Remove MAX_USES_PER_BOOT related code as it is not supported by stron…
BKSSMVenkateswarlu Jan 22, 2021
f033908
generate random number for operation handle
BKSSMVenkateswarlu Jan 22, 2021
cbedb0e
Corrected the condition for SE provisioned status
BKSSMVenkateswarlu Jan 22, 2021
9c6732f
Corrected the condition for SE provisioned status
BKSSMVenkateswarlu Jan 22, 2021
21ec9b5
Merge branch 'master' into provision_support
BKSSMVenkateswarlu Jan 23, 2021
93e417e
make provision as separate library
BKSSMVenkateswarlu Jan 25, 2021
b5b0313
Removed sample_json.txt
BKSSMVenkateswarlu Jan 25, 2021
73e209b
Added uninit function
BKSSMVenkateswarlu Jan 25, 2021
149cf0c
modified the function to init and uninit
BKSSMVenkateswarlu Jan 26, 2021
cfec49f
Merge pull request #15 from BKSSMVenkateswarlu/master
Jan 26, 2021
5caf05e
1. Renamed the certiicate and key file names in sample_json.txt
BKSSMVenkateswarlu Jan 27, 2021
0f58d8c
Store master key as Key object rather than as a byte array
BKSSMVenkateswarlu Jan 29, 2021
71c50dc
Merge branch 'master' into provision_support
BKSSMVenkateswarlu Jan 31, 2021
df36877
updated the sample_json.txt to use 3 certificates instead of 2
BKSSMVenkateswarlu Jan 31, 2021
5b4f29e
Removed the changes relating to storing master key as Key object
BKSSMVenkateswarlu Feb 1, 2021
3f9b4ab
Merge branch 'master' into provision_support
BKSSMVenkateswarlu Feb 1, 2021
fc9428d
Added log statements
BKSSMVenkateswarlu Feb 2, 2021
55420da
1. Corrected the convertToDate algorithm to generate correct time and
BKSSMVenkateswarlu Feb 2, 2021
2dd1123
Merge branch 'master' into provision_support
BKSSMVenkateswarlu Feb 2, 2021
038f03c
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
1122897
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
922e031
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
713d385
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
85ce135
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
dec5ad0
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
f2758f7
Update README.md
BKSSMVenkateswarlu Feb 2, 2021
75aed87
Corrected the tag EARLY_BOOT_ENDED to EARLY_BOOT_ONLY
BKSSMVenkateswarlu Feb 3, 2021
ee4eb07
Merge pull request #16 from BKSSMVenkateswarlu/master
Feb 3, 2021
a6029bf
store secrets as keyobjects instead as byte arrays.
BKSSMVenkateswarlu Feb 5, 2021
c87b191
Updated the documentation comments
BKSSMVenkateswarlu Feb 6, 2021
d2f293e
Changed the key derivation alogorithm to hmac sign
BKSSMVenkateswarlu Feb 6, 2021
eb81a27
1. Removed unused functions in KMAESKey.java
BKSSMVenkateswarlu Feb 7, 2021
56928b4
Update JavacardKeymaster4Device.cpp
BKSSMVenkateswarlu Feb 7, 2021
2ee46b7
Added Copyright comment
BKSSMVenkateswarlu Feb 7, 2021
096edcb
Removed commented code
BKSSMVenkateswarlu Feb 7, 2021
379047a
Merge pull request #47 from BKSSMVenkateswarlu/secrets_as_keyobjects
BKSSMVenkateswarlu Feb 7, 2021
eca6fea
Added few debug statements
BKSSMVenkateswarlu Feb 8, 2021
c7225b1
Fixed the issue with RSA private and public key buffer while copying
BKSSMVenkateswarlu Feb 9, 2021
3089115
Added testDesEcbPkcs7PaddingCorrupted test function
BKSSMVenkateswarlu Feb 9, 2021
967da4d
Removed unused imports
BKSSMVenkateswarlu Feb 9, 2021
4fe050b
Removed unused/commented code.
BKSSMVenkateswarlu Feb 9, 2021
6c096a7
Merge pull request #48 from BKSSMVenkateswarlu/test_master
BKSSMVenkateswarlu Feb 9, 2021
ec9721d
Merge pull request #17 from BKSSMVenkateswarlu/master
Feb 9, 2021
9b75c62
Merge pull request #2 from BKSSMVenkateswarlu/master
mdwivedi Feb 9, 2021
d4d41c6
Update KMInteger.java
mdwivedi Feb 9, 2021
8a87c80
move_unsigned_compare to common code
Feb 9, 2021
31abc35
move_unsigned_compare to common code
Feb 9, 2021
05ffe43
code cleanup
Feb 10, 2021
3364e31
Removed public key operations from Applet and provider code
BKSSMVenkateswarlu Feb 10, 2021
f909c4c
updated readROT function
BKSSMVenkateswarlu Feb 10, 2021
b3eeb3d
Added validation for block mode
BKSSMVenkateswarlu Feb 10, 2021
5809a2d
Removed unwanted exceptions from KMFunctionTest
BKSSMVenkateswarlu Feb 10, 2021
d97435e
Merge pull request #3 from BKSSMVenkateswarlu/remove_public_operations
mdwivedi Feb 10, 2021
55ab872
Merge branch 'master' into move_unsigned_compare
mdwivedi Feb 10, 2021
88c384d
Merge pull request #4 from mdwivedi/move_unsigned_compare
mdwivedi Feb 10, 2021
a4e14bf
Revert "Move unsigned compare"
mdwivedi Feb 10, 2021
e056be7
Merge pull request #5 from mdwivedi/revert-4-move_unsigned_compare
mdwivedi Feb 10, 2021
5e18231
Moving unsigned compare to KMInteger
Feb 10, 2021
cc1735f
Removing error code
Feb 10, 2021
5f7d2c4
code reformatting
Feb 10, 2021
797074d
Added test unsupported block mode
BKSSMVenkateswarlu Feb 11, 2021
bbcf627
Merge pull request #52 from mdwivedi/master
BKSSMVenkateswarlu Feb 11, 2021
b107d30
Merge pull request #54 from BKSSMVenkateswarlu/remove_public_operations
BKSSMVenkateswarlu Feb 11, 2021
22226d5
Updated KMFunctionalTest
BKSSMVenkateswarlu Feb 11, 2021
a8f17db
Merge branch 'master' into code_formatting
BKSSMVenkateswarlu Feb 11, 2021
3c5cbe8
Merge pull request #53 from mdwivedi/code_formatting
BKSSMVenkateswarlu Feb 11, 2021
bcb224c
1. return INVALID_KEY_BLOB incase if parEncryptedKeyblob fails for any
BKSSMVenkateswarlu Feb 12, 2021
a5a9024
Merge pull request #19 from BKSSMVenkateswarlu/master
Feb 16, 2021
3b20c9d
Sending extending length APDU always
BKSSMVenkateswarlu Feb 16, 2021
3f66192
Merge pull request #20 from BKSSMVenkateswarlu/master
Feb 16, 2021
c544421
Merge pull request #56 from divegeek/master
BKSSMVenkateswarlu Feb 20, 2021
6e61b90
A Strongbox implementation need not support support DEVICE_UNIQUE_ATT…
BKSSMVenkateswarlu Feb 26, 2021
ed09700
Merge pull request #21 from BKSSMVenkateswarlu/master
Feb 26, 2021
8144c2d
Clear all the operation state in setBootParams
BKSSMVenkateswarlu Mar 3, 2021
b1327a1
update the variable name from var to oprHandleBuf
BKSSMVenkateswarlu Mar 4, 2021
49225ce
Merge pull request #57 from BKSSMVenkateswarlu/clear_all_operations
BKSSMVenkateswarlu Mar 4, 2021
6d79994
1. In releaseOperation, renamed the variable name 'var'
BKSSMVenkateswarlu Mar 4, 2021
e07954b
Merge pull request #22 from BKSSMVenkateswarlu/master
mdwivedi Mar 4, 2021
7256f98
Added sample certificates and keys required while using provisioning …
BKSSMVenkateswarlu Mar 9, 2021
626522e
Update README.md
BKSSMVenkateswarlu Mar 9, 2021
d442d70
Update README.md
BKSSMVenkateswarlu Mar 9, 2021
4d21da9
Renamed source file names
BKSSMVenkateswarlu Mar 9, 2021
a7063e0
Added JCProxy souce.
BKSSMVenkateswarlu Mar 9, 2021
474eb97
Create README.md
BKSSMVenkateswarlu Mar 9, 2021
6ee72bc
Update README.md
BKSSMVenkateswarlu Mar 9, 2021
2a20900
Update README.md
BKSSMVenkateswarlu Mar 9, 2021
b6515bf
Update README.md
BKSSMVenkateswarlu Mar 9, 2021
f817664
Merge pull request #58 from BKSSMVenkateswarlu/sample_test
BKSSMVenkateswarlu Mar 9, 2021
ed7a94e
Merge pull request #23 from BKSSMVenkateswarlu/master
mdwivedi Mar 9, 2021
61c3bd3
Merge pull request #59 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Mar 11, 2021
2262e72
Fix the issue in the upgrade key command.
BKSSMVenkateswarlu Mar 18, 2021
4f51a1b
Optimized the upgradeKey command flow
BKSSMVenkateswarlu Mar 19, 2021
739b128
Incorporated review comments
BKSSMVenkateswarlu Mar 21, 2021
99a6562
Updated the comment
BKSSMVenkateswarlu Mar 21, 2021
a44c6ad
Performance fix: Reduced NVM writes
BKSSMVenkateswarlu Mar 21, 2021
a7eb86c
Renamed the keyRequiresUpgrade function with a meaningful name
BKSSMVenkateswarlu Mar 22, 2021
c795848
Modified KMKeymasterApplet code to reduce NVM writes
BKSSMVenkateswarlu Mar 23, 2021
03be142
Fix issue with Applet upgrade after NVM write optimization
BKSSMVenkateswarlu Mar 23, 2021
a04d378
Merge pull request #24 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Mar 23, 2021
aed66db
Merge pull request #26 from divegeek/jc_keymaster_41_android_11
mdwivedi Mar 23, 2021
c6c656b
Fixed the issue with Applet upgrade
BKSSMVenkateswarlu Mar 24, 2021
1c2a065
Merge pull request #61 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Mar 24, 2021
e2a625e
Merge pull request #62 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
BKSSMVenkateswarlu Mar 24, 2021
1d118f7
created an instanceTable inside KMType and remvoved instPtr from each
BKSSMVenkateswarlu Mar 25, 2021
44c41b5
Removed unused imports
BKSSMVenkateswarlu Mar 25, 2021
21d563b
Applet should be able to upgrade even if provision is not done.
BKSSMVenkateswarlu Mar 25, 2021
c68ddd7
Updated comment
BKSSMVenkateswarlu Mar 28, 2021
1335b3e
Merge pull request #27 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Mar 31, 2021
dee3887
Merge pull request #28 from divegeek/jc_keymaster_41_android_11
mdwivedi Mar 31, 2021
adbf262
Merge pull request #63 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Apr 1, 2021
beeeb9a
Applet should be able to upgrade even if provision is not done.
BKSSMVenkateswarlu Mar 25, 2021
7eb0ab2
Updated comment
BKSSMVenkateswarlu Mar 28, 2021
4cb4f16
Reduced NVM writes inside KMOperationImpl of AndroidSEProvider
BKSSMVenkateswarlu Apr 8, 2021
294eddf
Fixed compilation errors
BKSSMVenkateswarlu Apr 8, 2021
4bae71f
Proper indentation for KMOPerationImpl.java source file
BKSSMVenkateswarlu Apr 8, 2021
3dae038
Changed the variable name from dFlag to isDataUpdated.
BKSSMVenkateswarlu Apr 9, 2021
38f6113
Memory optimization in operation table.
BKSSMVenkateswarlu Apr 12, 2021
0779542
Removed begin/commit transaction from not required places
BKSSMVenkateswarlu Apr 12, 2021
db03f57
Lock provision should not depend on setBoot parameters
BKSSMVenkateswarlu Apr 12, 2021
4e2b366
Reverted operationStateTable NVM changes
BKSSMVenkateswarlu Apr 13, 2021
e27fd89
Removed set boot params from lock provision
BKSSMVenkateswarlu Apr 13, 2021
e68bc22
Merge pull request #30 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Apr 13, 2021
c6dad80
Merge pull request #31 from divegeek/jc_keymaster_41_android_11
mdwivedi Apr 13, 2021
768816a
Merge pull request #29 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Apr 13, 2021
a1f4f34
Merge pull request #32 from divegeek/jc_keymaster_41_android_11
mdwivedi Apr 13, 2021
852bfb4
Merge pull request #66 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Apr 13, 2021
8efa44f
Fix for the issue instance gets cleared when device resets
BKSSMVenkateswarlu Apr 13, 2021
ffc0aa9
Fixed compilation error
BKSSMVenkateswarlu Apr 14, 2021
7b9eee4
Update KMOperationImpl.java
BKSSMVenkateswarlu Apr 14, 2021
6d22e79
Merge pull request #33 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Apr 14, 2021
d844852
Merge pull request #34 from divegeek/jc_keymaster_41_android_11
mdwivedi Apr 14, 2021
4b0c52e
Merge pull request #67 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Apr 16, 2021
d8ecfbd
Merge pull request #68 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
BKSSMVenkateswarlu Apr 16, 2021
d8d2a77
Move operationtable to RAM and notifiy back to HAL about se reset
BKSSMVenkateswarlu Apr 16, 2021
de63559
Handle the reset event from Applet
Apr 16, 2021
76935ac
Move operationtable to RAM
BKSSMVenkateswarlu Apr 16, 2021
2aecff6
Card Reset change
BKSSMVenkateswarlu Apr 19, 2021
4653b23
Added a new test case to test the card reset functionality
BKSSMVenkateswarlu Apr 19, 2021
cc65979
Added a new test case to test reset events
BKSSMVenkateswarlu Apr 19, 2021
cb0826a
Updated the unit test
BKSSMVenkateswarlu Apr 19, 2021
95668a2
updated the unittest
BKSSMVenkateswarlu Apr 19, 2021
b96c735
Fixed the issue observed while executing vts
BKSSMVenkateswarlu Apr 20, 2021
acb2f2d
Added comment and fixed one issue
BKSSMVenkateswarlu Apr 20, 2021
db2dc2d
Clear the operation data associated with operation handle
Apr 21, 2021
633893e
1. Handled the reset event in provision tool.
Apr 22, 2021
da6135f
Corrected the testcase
BKSSMVenkateswarlu Apr 22, 2021
8b2adc9
separate os_version, os_patchlevel and vendor_patchlevel from other b…
Apr 23, 2021
0895817
separate os_version, os_patchlevel and vendor_patchlevel from other b…
Apr 23, 2021
9d51ab8
send systemproperties at initialization time if it fails then try to
BKSSMVenkateswarlu Apr 23, 2021
51e6c07
1. Removed VTS_EMULATOR and instead used USE_OMAPI and USE_SEHAL
Apr 26, 2021
82e5aba
Added logs for reset event
BKSSMVenkateswarlu Apr 26, 2021
c947d89
Enable VTS_EMULATOR for x86 and x86_64 builds
Apr 27, 2021
7453eb1
clear system properties in setBootParameters
BKSSMVenkateswarlu Apr 27, 2021
2d4548a
Addressed review comments in the Applet code
BKSSMVenkateswarlu Apr 27, 2021
edc0cc3
renamed the function names appropriately
BKSSMVenkateswarlu Apr 28, 2021
ac1e918
Updated the comment
Apr 28, 2021
4c6f532
Renamed canary bit name to power reset status
BKSSMVenkateswarlu Apr 28, 2021
c65ce39
Merge pull request #37 from BKSSMVenkateswarlu/separate_vbmeta_sysprop
mdwivedi Apr 28, 2021
e255510
Merge pull request #38 from divegeek/jc_keymaster_41_android_11
mdwivedi Apr 28, 2021
7c2a3ed
renamed function and variables names appropriately
BKSSMVenkateswarlu Apr 28, 2021
e1f1663
renamed function names and added comments.
BKSSMVenkateswarlu Apr 28, 2021
bc30d09
variable names changed properly
Apr 28, 2021
b2bae76
Merge pull request #36 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Apr 28, 2021
3d7b493
Merge pull request #70 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Apr 29, 2021
75a14fc
Fixed the failure in Unittest
BKSSMVenkateswarlu Apr 29, 2021
39ac041
Fixed the erros after merging branch
Apr 29, 2021
25d36f4
Allow checking of boot signal event for setting boot parameters only …
BKSSMVenkateswarlu Apr 29, 2021
062e2c3
Merge pull request #39 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Apr 29, 2021
e2b64fc
Merge pull request #40 from divegeek/jc_keymaster_41_android_11
mdwivedi Apr 29, 2021
1cd724f
Merge pull request #72 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Apr 30, 2021
7f0d11f
Merge pull request #1 from divegeek/master
nyamagoud Apr 30, 2021
dfff631
Added debug and error logs in hal apis.
nyamagoud May 4, 2021
209456a
Added debug and error logs in hal apis.
nyamagoud May 4, 2021
d56df36
Added debug and error logs in hal apis.
nyamagoud May 4, 2021
d0a5965
Merge pull request #42 from nyamagoud/devel
mdwivedi May 5, 2021
abb73ee
Merge pull request #43 from divegeek/master
mdwivedi May 5, 2021
d60b6e9
Merge branch 'divegeek:jc_keymaster_41_android_11' into jc_keymaster_…
BKSSMVenkateswarlu May 7, 2021
832a986
Fix for attestation failures in VTS.
BKSSMVenkateswarlu Jun 25, 2021
b1a912c
Fix for attestation failures in VTS.
BKSSMVenkateswarlu Jun 26, 2021
7d7259b
Updated the README and sample json files
BKSSMVenkateswarlu Jun 26, 2021
5c400a4
Update README.md
BKSSMVenkateswarlu Jun 26, 2021
5d88ba3
added comments
BKSSMVenkateswarlu Jun 26, 2021
0c0358d
Changed the version of keymaster in attestation
BKSSMVenkateswarlu Jun 26, 2021
ac7f3ec
1. Removed rollback_resistance from attest tags
Jun 29, 2021
d95c9c5
Merge pull request #44 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Jun 29, 2021
bbbccf4
Merge pull request #45 from divegeek/jc_keymaster_41_android_11
mdwivedi Jun 29, 2021
42d7a9a
Merge pull request #73 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Jul 6, 2021
517637d
Merge pull request #73 from divegeek/jc_keymaster_41_android_11
BKSSMVenkateswarlu Jul 6, 2021
dc4cd43
Fixed issue inside isEmpty function
Jul 6, 2021
dba8334
Fixed issue inside isEmpty function
Jul 6, 2021
6353876
Merge pull request #46 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Jul 7, 2021
8bab43e
Merge pull request #46 from BKSSMVenkateswarlu/jc_keymaster_41_androi…
mdwivedi Jul 7, 2021
fadea0c
Merge pull request #48 from divegeek/jc_keymaster_41_android_11
mdwivedi Jul 7, 2021
678627e
Merge pull request #48 from divegeek/jc_keymaster_41_android_11
mdwivedi Jul 7, 2021
4451480
Merge branch 'divegeek:master' into master
subrahmanyaman Aug 26, 2021
86f1320
Removed gpapi-upgrade.jar. Refer to README.txt to see how to download
Aug 26, 2021
e8a7779
Merge pull request #59 from BKSSMVenkateswarlu/jc_km41_android_11_rem…
mdwivedi Aug 26, 2021
b3b9d1f
Merge pull request #60 from BKSSMVenkateswarlu/jc_km41_android_11_rem…
mdwivedi Aug 26, 2021
b6a5f1a
Fix for the issue that operation handle(i.e Challenge), inside the Ha…
Aug 26, 2021
81371dc
Merge pull request #61 from BKSSMVenkateswarlu/jc_km41_android11_halfix
mdwivedi Aug 26, 2021
e874fe0
Merge pull request #7 from divegeek/master
subrahmanyaman Dec 7, 2021
4f93707
Merged changes from Keymaster 41
subrahmanyaman Dec 7, 2021
90bc480
Merge KM41 to master
subrahmanyaman Dec 8, 2021
2d20af8
Merge branch 'Javacard_KM_41_AOSP_UPMERGE_0630' into divegeek_master
subrahmanyaman Dec 8, 2021
a963919
Merge pull request #76 from subrahmanyaman/divegeek_master
mdwivedi Dec 8, 2021
d20e4b2
Revert "Merged changes from Keymaster 41"
subrahmanyaman Dec 8, 2021
3cd9497
Merge pull request #8 from divegeek/master
subrahmanyaman Dec 8, 2021
2aa4c47
Changed the version to 2.0
subrahmanyaman Dec 8, 2021
ec7a9a0
Merge pull request #79 from subrahmanyaman/master
mdwivedi Dec 8, 2021
8f76e3e
Merge pull request #12 from divegeek/master
subrahmanyaman Dec 8, 2021
f76c91e
Updated the cts keystore patch
subrahmanyaman Dec 9, 2021
04b523b
Updated KMFunctionalTest
subrahmanyaman Dec 9, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file removed Applet/AndroidSEProvider/lib/gpapi-upgrade.jar
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ public void onRestore(Element element) {
keymasterState = element.readByte();
repository.onRestore(element, packageVersion, CURRENT_PACKAGE_VERSION);
seProvider.onRestore(element, packageVersion, CURRENT_PACKAGE_VERSION);
handleDataUpgradeToVersion1_1();
handleDataUpgradeToVersion2_0();
}

@Override
Expand Down Expand Up @@ -101,10 +101,10 @@ private short computePrimitveDataSize() {
private short computeObjectCount() {
return (short) 0;
}

public boolean isUpgradeAllowed(short version) {
boolean upgradeAllowed = false;
short oldMajorVersion = (short) (version >> 8 & 0x00FF);
short oldMajorVersion = (short) ((version >> 8) & 0x00FF);
short oldMinorVersion = (short) (version & 0x00FF);
short currentMajorVersion = (short) (CURRENT_PACKAGE_VERSION >> 8 & 0x00FF);
short currentMinorVersion = (short) (CURRENT_PACKAGE_VERSION & 0x00FF);
Expand All @@ -121,8 +121,8 @@ public boolean isUpgradeAllowed(short version) {
}
return upgradeAllowed;
}
public void handleDataUpgradeToVersion1_1() {

public void handleDataUpgradeToVersion2_0() {

if (packageVersion != 0) {
// No Data upgrade required.
Expand Down Expand Up @@ -185,7 +185,6 @@ public void handleDataUpgradeToVersion1_1() {
issuerLen,
(short) (certChaionOff + certChainLen + issuerLen), // cert expiry offset
certExpiryLen);


// Update computed HMAC key.
short blob = repository.getComputedHmacKey();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1241,7 +1241,7 @@ public void onRestore(Element element, short oldVersion, short currentVersion) {
preSharedKey = KMHmacKey.onRestore(element);
if (oldVersion == 0) {
// Previous versions does not contain version information.
handleDataUpgradeToVersion1_1();
handleDataUpgradeToVersion2_0();
} else {
computedHmacKey = KMHmacKey.onRestore(element);
}
Expand Down Expand Up @@ -1362,7 +1362,7 @@ public KMComputedHmacKey getComputedHmacKey() {
return computedHmacKey;
}

private void handleDataUpgradeToVersion1_1() {
private void handleDataUpgradeToVersion2_0() {
short totalLen = (short) (6 + KMConfigurations.CERT_CHAIN_MAX_SIZE +
KMConfigurations.CERT_ISSUER_MAX_SIZE + KMConfigurations.CERT_EXPIRY_MAX_SIZE);
byte[] oldBuffer = provisionData;
Expand Down
Binary file removed Applet/JCardSimProvider/lib/gpapi-upgrade.jar
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public class KMKeymasterApplet extends Applet implements AppletEvent, ExtendedLe
private static final short POWER_RESET_MASK_FLAG = (short) 0x4000;
// Magic number version
public static final byte KM_MAGIC_NUMBER = (byte) 0x81;
public static final short CURRENT_PACKAGE_VERSION = 0x0101; // 1.1
// MSB byte is for Major version and LSB byte is for Minor version.
public static final short CURRENT_PACKAGE_VERSION = 0x0200; // 2.0

// "Keymaster HMAC Verification" - used for HMAC key verification.
public static final byte[] sharingCheck = {
Expand Down Expand Up @@ -1516,7 +1517,7 @@ private boolean isEmpty(byte[] buf, short offset, short len) {
boolean empty = true;
short index = 0;
while (index < len) {
if (buf[index] != 0) {
if (buf[(short) (index + offset)] != 0) {
empty = false;
break;
}
Expand Down
4 changes: 2 additions & 2 deletions Applet/src/com/android/javacard/keymaster/KMRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -940,7 +940,7 @@ public void onRestore(Element ele, short oldVersion, short currentVersion) {
dataTable = (byte[]) ele.readObject();
if (oldVersion == 0) {
// Previous versions does not contain version information.
handleDataUpgradeToVersion1_1();
handleDataUpgradeToVersion2_0();
} else {
attestIdsIndex = ele.readShort();
}
Expand Down Expand Up @@ -994,7 +994,7 @@ public void setEarlyBootEndedStatus(boolean flag) {
writeDataEntry(EARLY_BOOT_ENDED_STATUS, getHeap(), start, EARLY_BOOT_ENDED_FLAG_SIZE);
}

public void handleDataUpgradeToVersion1_1() {
public void handleDataUpgradeToVersion2_0() {
byte[] oldDataTable = dataTable;
dataTable = new byte[2048];
attestIdsIndex = (short) (DATA_INDEX_SIZE * DATA_INDEX_ENTRY_SIZE);
Expand Down
5 changes: 2 additions & 3 deletions HAL/keymaster/4.1/JavacardKeymaster4Device.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ static void clearStrongboxOprHandleEntries(const std::unique_ptr<OperationContex
<< "Secure Element reset or applet upgrade detected. Removing existing operation handles";
auto it = operationTable.begin();
while (it != operationTable.end()) {
if (it->second == OperationType::PRIVATE_OPERATION) { // Strongbox operation
if (it->second == OperationType::PRIVATE_OPERATION) { // Strongbox operation
LOG(INFO) << "operation handle: " << it->first << " is removed";
oprCtx->clearOperationData(it->first);
it = operationTable.erase(it);
Expand Down Expand Up @@ -968,8 +968,7 @@ Return<void> JavacardKeymaster4Device::begin(KeyPurpose purpose, const hidl_vec<
errorCode = handleBeginOperation(purpose, keyBlob, inParams, authToken, outParams,
operationHandle, operType);
if (errorCode == ErrorCode::OK && isOperationHandleExists(operationHandle)) {
LOG(DEBUG) << "Operation handle " << operationHandle
<< "already exists"
LOG(DEBUG) << "Operation handle " << operationHandle << "already exists"
"in the opertion table. so aborting this opertaion.";
// abort the operation.
errorCode = abortOperation(operationHandle, operType);
Expand Down
Loading