Skip to content

Commit

Permalink
encoder: display parent in the text output
Browse files Browse the repository at this point in the history
  • Loading branch information
gotthardp committed Oct 30, 2023
1 parent c773cd6 commit bf4c7d6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/)
## [1.3.0] - 2023-xx-yy
### Added
- Added support for RSA-OAEP decryption
- Added Parent to textual information printed by 'openssl pkey -text'

## [1.2.0] - 2023-10-14
### Added
Expand Down
2 changes: 2 additions & 0 deletions src/tpm2-provider-encoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -510,6 +510,7 @@ tpm2_rsa_encoder_encode_text(void *ctx, OSSL_CORE_BIO *cout, const void *key,

BIO_printf(bout, "Private-Key: (RSA %i bit, TPM 2.0)\n",
TPM2_PKEY_RSA_BITS(pkey));
BIO_printf(bout, "Parent: 0x%x\n", pkey->data.parent);

print_labeled_buf(bout, "Modulus:",
pkey->data.pub.publicArea.unique.rsa.buffer,
Expand Down Expand Up @@ -559,6 +560,7 @@ tpm2_ec_encoder_encode_text(void *ctx, OSSL_CORE_BIO *cout, const void *key,

curve_nid = tpm2_ecc_curve_to_nid(TPM2_PKEY_EC_CURVE(pkey));
BIO_printf(bout, "Private-Key: (EC %s, TPM 2.0)\n", EC_curve_nid2nist(curve_nid));
BIO_printf(bout, "Parent: 0x%x\n", pkey->data.parent);

size = tpm2_ecc_point_to_uncompressed(
&pkey->data.pub.publicArea.unique.ecc.x,
Expand Down

0 comments on commit bf4c7d6

Please sign in to comment.