This repository was archived by the owner on May 24, 2026. It is now read-only.
- Notifications
You must be signed in to change notification settings - Fork 27
Keymaster bug fixes#131
Merged
mdwivedi
merged 4 commits into
divegeek:Javacard_KM_41_AOSP_UPMERGE_0630
from
subrahmanyaman:keymaster_bug_fixesMay 19, 2022
Uh oh!
There was an error while loading. Please reload this page.
Merged
Keymaster bug fixes #131
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
6894a1a
Merge pull request #63 from divegeek/Javacard_KM_41_AOSP_UPMERGE_0630
subrahmanyaman bbdb12a
Merge pull request #64 from divegeek/Javacard_KM_41_AOSP_UPMERGE_0630
subrahmanyaman b45a2f4
1. Renamed the PACKAGE_VERSION to DATA_BASE_VERSION
subrahmanyaman 960ea3e
Add CREATION_DATETIME tag in generateKey, import and importWrappedKey
subrahmanyaman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Jump to file
Failed to load files.
Loading
Uh oh!
There was an error while loading. Please reload this page.
Diff view
Diff view
There are no files selected for viewing
10 changes: 5 additions & 5 deletions
10 Applet/AndroidSEProvider/src/com/android/javacard/keymaster/KMAndroidSEApplet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 4 additions & 4 deletions
8 Applet/AndroidSEProvider/src/com/android/javacard/keymaster/KMAttestationCertImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -75,11 +75,10 @@ public class KMAttestationCertImpl implements KMAttestationCert { | ||
| private static final short[] swTagIds = { | ||
| KMType.ATTESTATION_APPLICATION_ID, | ||
| KMType.CREATION_DATETIME, | ||
| KMType.ALLOW_WHILE_ON_BODY, | ||
| KMType.USAGE_EXPIRE_DATETIME, | ||
| KMType.ORIGINATION_EXPIRE_DATETIME, | ||
| KMType.ACTIVE_DATETIME, | ||
| KMType.UNLOCKED_DEVICE_REQUIRED, | ||
| KMType.ALLOW_WHILE_ON_BODY | ||
| KMType.ACTIVE_DATETIME | ||
| }; | ||
| // Below are the allowed hardwareEnforced Authorization tags inside the attestation certificate's extension. | ||
| @@ -90,7 +89,8 @@ public class KMAttestationCertImpl implements KMAttestationCert { | ||
| KMType.ATTESTATION_ID_SERIAL, KMType.ATTESTATION_ID_PRODUCT, | ||
| KMType.ATTESTATION_ID_DEVICE, KMType.ATTESTATION_ID_BRAND, | ||
| KMType.OS_PATCH_LEVEL, KMType.OS_VERSION, KMType.ROOT_OF_TRUST, | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Double check all the attesatation record all the order in both keymint and keymaster. | ||
| KMType.ORIGIN, KMType.TRUSTED_CONFIRMATION_REQUIRED, KMType.AUTH_TIMEOUT, | ||
| KMType.ORIGIN, KMType.UNLOCKED_DEVICE_REQUIRED, | ||
| KMType.TRUSTED_CONFIRMATION_REQUIRED, KMType.AUTH_TIMEOUT, | ||
| KMType.USER_AUTH_TYPE, KMType.NO_AUTH_REQUIRED, | ||
| KMType.RSA_PUBLIC_EXPONENT, KMType.ECCURVE, KMType.MIN_MAC_LENGTH, | ||
| KMType.CALLER_NONCE, KMType.PADDING, KMType.DIGEST, KMType.BLOCK_MODE, | ||
3 changes: 0 additions & 3 deletions
3 Applet/AndroidSEProvider/src/com/android/javacard/keymaster/KMConfigurations.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -26,7 +26,4 @@ public class KMConfigurations { | ||
| public static final short CERT_ISSUER_MAX_SIZE = 250; | ||
| public static final short CERT_EXPIRY_MAX_SIZE = 20; | ||
| public static final short TOTAL_ATTEST_IDS_SIZE = 300; | ||
| // If the size of the attestation ids is known and lesser than 64 | ||
ContributorAuthor There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This attest ids max size should not change between the upgrades. | ||
| // then reduce the size here. It reduces the heap memory usage. | ||
| public static final byte MAX_ATTESTATION_IDS_SIZE = 64; | ||
| } | ||
9 changes: 5 additions & 4 deletions
9 Applet/JCardSimProvider/src/com/android/javacard/keymaster/KMAttestationCertImpl.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 0 additions & 3 deletions
3 Applet/JCardSimProvider/src/com/android/javacard/keymaster/KMConfigurations.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 3 additions & 6 deletions
9 Applet/src/com/android/javacard/keymaster/KMKeymasterApplet.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do not change the order.