Skip to content
This repository was archived by the owner on May 24, 2026. It is now read-only.

Keymaster RMA support - #132

Merged
mdwivedi merged 2 commits into
divegeek:Javacard_KM_41_AOSP_UPMERGE_0630from
subrahmanyaman:keymaster_rma_support
May 24, 2022
Merged

Keymaster RMA support#132
mdwivedi merged 2 commits into
divegeek:Javacard_KM_41_AOSP_UPMERGE_0630from
subrahmanyaman:keymaster_rma_support

Conversation

@subrahmanyaman

Copy link
Copy Markdown
Contributor

No description provided.

@subrahmanyaman
subrahmanyamanforce-pushed the keymaster_rma_support branch 8 times, most recently from f9b87df to 51b2ab2CompareMay 20, 2022 06:15
short packageVersion_ = 0x100;
byte provisionStatus_ = firstByte;
if (firstByte == KMKeymasterApplet.KM_MAGIC_NUMBER) {
packageVersion_ = element.readShort();

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to oldpackageVersion.
packageVersion_ change to 0.
if KM_MAGIC_NUMBER is not there return upgrade not allowed.

switch(packageVersion) {
case 0x100: // 1.0
// Never comes here when KM_PERSISTENT_DATA_STORAGE_VERSION = 0x201
handleDataUpgradeToVersion2_0();

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this code for 1.0 to 2.0 from all the classes. repository and seProvider.
Make the release to 3.0 and renamed the name to KM_PERSISTENT_DATA_STORAGE_VERSION to KM_APPLET_PACKAGE_VERSION.
Write a comment when ever an applet upgrade is there please change the version either to minor and major.

private void handleDataUpgradeToVersion2_1() {
// Please note that this is a dummy key. Replace below key with a real OEM Root
// public key while upgrading the Applet from data version 2.0 to 2.1. This change
// is not required if the Applet is installed first time with version 2.1.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Write the type of key. EC Key P256 curve.

}

@Override
public byte[] getOEMRootPublicKey() {

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Follow the same pattern pass the buffer as input to copy

@subrahmanyaman
subrahmanyamanforce-pushed the keymaster_rma_support branch 2 times, most recently from a0c071a to a839d44CompareMay 24, 2022 02:11
@mdwivedi
mdwivedi merged commit a350b4d into divegeek:Javacard_KM_41_AOSP_UPMERGE_0630May 24, 2022
@subrahmanyaman
subrahmanyaman deleted the keymaster_rma_support branch May 25, 2022 01:13
AvinashHedage pushed a commit to AvinashHedage/JavaCardKeymaster that referenced this pull request Jan 25, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@subrahmanyaman@mdwivedi