All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andy Purcell <andy_purcell at keysight.com>
To: tpm2@lists.01.org
Subject: [tpm2] Want to use c++ to get TPM Serial Number - how do it?
Date: Tue, 20 Jul 2021 17:18:43 +0000	[thread overview]
Message-ID: < <SA1PR17MB5432DD01C2498B7B1F50486E9FE29@SA1PR17MB5432.namprd17.prod.outlook.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 884 bytes --]

I have a need to use C++ to obtain the unique TPM information - like a Serial Number.
My system is running Windows 10/64. This is on an HP Desktop PC with TPM 2.0 chip.

I can use PowerShell
Get-TpmEndorsementKeyInfo -hashalgorithm sha256

To get this output:
                ...
ManufacturerCertificates : {[Subject]
                             TPMVersion=id:073E, TPMModel=SLB 9670 TPM2.0, TPMManufacturer=id:49465800
                           [Issuer]
                             CN=Infineon OPTIGA(TM) RSA Manufacturing CA 034, OU=OPTIGA(TM) TPM2.0, O=Infineon Technologies AG, C=DE
      ...
                           [Serial Number]
                             4880DE8E
                           [Thumbprint]
                             B8395DA6A1D661C8CCD35D47E3DA6E9532EFFEC4

But how can I get this same Serial Number information using C++?

ap


[-- Attachment #2: attachment.htm --]
[-- Type: text/html, Size: 2657 bytes --]

                 reply	other threads:[~2021-07-20 17:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=' <SA1PR17MB5432DD01C2498B7B1F50486E9FE29@SA1PR17MB5432.namprd17.prod.outlook.com' \
    --to=tpm2@lists.01.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.