tpm2-software / tpm2-tss-engine

OpenSSL Engine for TPM2 devices
https://tpm2-software.github.io
BSD 3-Clause "New" or "Revised" License
150 stars 100 forks source link

Add support for using a parent key password #134

Closed khwaaj closed 5 years ago

khwaaj commented 5 years ago

This PR adds support for providing a parent key password to tpm2tss-genkey and extends the engine to support setting it using an ENGINE_ctrl() command (TPM2TSS_SET_PARENTAUTH or "SET_PARENTAUTH").

codecov[bot] commented 5 years ago

Codecov Report

Merging #134 into master will increase coverage by 0.09%. The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   67.44%   67.54%   +0.09%     
==========================================
  Files           9        9              
  Lines        1195     1211      +16     
==========================================
+ Hits          806      818      +12     
- Misses        389      393       +4
Impacted Files Coverage Δ
src/tpm2-tss-engine-common.c 78.82% <100%> (+0.16%) :arrow_up:
src/tpm2tss-genkey.c 57.79% <66.66%> (-0.32%) :arrow_down:
src/tpm2-tss-engine.c 60.44% <87.5%> (+1.71%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4ba57cb...48294b8. Read the comment docs.

codecov[bot] commented 5 years ago

Codecov Report

Merging #134 into master will increase coverage by 0.09%. The diff coverage is 81.25%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
+ Coverage   67.44%   67.54%   +0.09%     
==========================================
  Files           9        9              
  Lines        1195     1211      +16     
==========================================
+ Hits          806      818      +12     
- Misses        389      393       +4
Impacted Files Coverage Δ
src/tpm2-tss-engine-common.c 78.82% <100%> (+0.16%) :arrow_up:
src/tpm2tss-genkey.c 57.79% <66.66%> (-0.32%) :arrow_down:
src/tpm2-tss-engine.c 60.44% <87.5%> (+1.71%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 36ae50f...98232cb. Read the comment docs.

khwaaj commented 5 years ago

I fixed the code as per your comments, and a little more besides, e.g. bash-completion.

AndreasFuchsTPM commented 5 years ago

Cool... If you could reorder/squash the fixes into the original commit, I could merge the stuff...

khwaaj commented 5 years ago

Rebased on master and squashed all commits into one.