Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added import key command to tpm2_ptool and updated test script #64

Closed
wants to merge 3 commits into from

Conversation

ichetty
Copy link
Contributor

@ichetty ichetty commented Oct 29, 2018

Refactored the import and addkey commandlet code and fixed other issues reported in the earlier PR

Copy link
Contributor Author

@ichetty ichetty left a comment

Choose a reason for hiding this comment

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

Fixed the error that was causing the make check to fail

tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Show resolved Hide resolved
test/integration/scripts/create_pkcs_store.sh Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Show resolved Hide resolved
tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Outdated Show resolved Hide resolved
tools/tpm2_ptool.py Show resolved Hide resolved
@williamcroberts
Copy link
Member

You still have make check failures.

@williamcroberts
Copy link
Member

williamcroberts commented Nov 5, 2018 via email

@williamcroberts
Copy link
Member

williamcroberts commented Nov 5, 2018 via email

@williamcroberts
Copy link
Member

williamcroberts commented Nov 5, 2018 via email

@ichetty
Copy link
Contributor Author

ichetty commented Nov 5, 2018

-----Original Message----- From: Jay Chetty @.*** Sent: Monday, November 5, 2018 12:02 PM To: tpm2-software/tpm2-pkcs11 @.> Cc: Roberts, William C @.>; Comment @.***> Subject: Re: [tpm2-software/tpm2-pkcs11] Added import key command to tpm2_ptool and updated test script (#64) @ichetty commented on this pull request. ________________________________ In tools/tpm2_ptool.py <https://github.com/tpm2-software/tpm2- pkcs11/pull/64#discussion_r230892435> : > group_parser.add_argument( '--label', help='The tokens label to add a key too.\n', required=True) + group_parser.add_argument( + '--key-label', + help='The label of the key imported.\n') The super class method is doing that for both addkey and import command. if key_label is not provided it will use the id as key_label, is that what you are saying?
Yes keylabel is either user specified or the row id in the db. I never thought about this, But in the db.c code if CKA_LABEL is not found one could just get the id and set it there, But I found it useful to inform the user of how they can find their key via the API.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub <https://github.com/tpm2- software/tpm2-pkcs11/pull/64#discussion_r230892435> , or mute the thread <https://github.com/notifications/unsubscribe- auth/AQ7bBxheFlpWvW3u7FTnm6zbr1Mk5CHYks5usJlVgaJpZM4YARjS> . <https://github.com/notifications/beacon/AQ7bB- UQr8sKwmY_Hd8BnNH0BV32Pujaks5usJlVgaJpZM4YARjS.gif>

I see that the addkey command is defaulting the keylabel to str(id) if the keylable is not specified and the same will be done for import. Once the command is complete I'll check for the ketlabel option and if it is not specified then will use the id to print the message.

@williamcroberts
Copy link
Member

williamcroberts commented Nov 6, 2018 via email

@ichetty ichetty force-pushed the import_rsa_take_2 branch 3 times, most recently from a42dd49 to 9f4eb96 Compare November 6, 2018 23:23
Signed-off-by: Jay Chetty <jay.chetty@intel.com>
@ichetty ichetty closed this Nov 29, 2018
@ichetty
Copy link
Contributor Author

ichetty commented Nov 29, 2018

All checks passed all issues resolved with no conflicts so closing this PR.

@ichetty ichetty reopened this Nov 29, 2018
@williamcroberts
Copy link
Member

All checks passed all issues resolved with no conflicts so closing this PR.

And I quote:

This branch cannot be rebased due to conflicts
Rebasing the commits of this branch on top of the base branch cannot be performed automatically due to conflicts encountered while reapplying the individual commits from the head branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants