Skip to content

Commit

Permalink
Merge pull request #1471 from oasisprotocol/kostko/feature/orc-mrsigner
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Aug 31, 2023
2 parents 74cee60 + 84c431e commit 08c596d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tools/orc/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,13 @@ var (
if bnd.Manifest.SGX.Signature != "" {
fmt.Printf("SGXS signature: %s\n", bnd.Manifest.SGX.Signature)

_, sigStruct, err := sigstruct.Verify(bnd.Data[bnd.Manifest.SGX.Signature])
sigPk, sigStruct, err := sigstruct.Verify(bnd.Data[bnd.Manifest.SGX.Signature])
cobra.CheckErr(err) // Already checked during Open so it should never fail.

var mrSigner sgx.MrSigner
err = mrSigner.FromPublicKey(sigPk)
cobra.CheckErr(err)

fmt.Printf("SGXS SIGSTRUCT:\n")
fmt.Printf(" Build date: %s\n", sigStruct.BuildDate)
fmt.Printf(" MiscSelect: %08X\n", sigStruct.MiscSelect)
Expand All @@ -316,6 +320,7 @@ var (
fmt.Printf(" Attributes XFRM: %016X\n", sigStruct.Attributes.Xfrm)
fmt.Printf(" Attributes mask: %016X %016X\n", sigStruct.AttributesMask[0], sigStruct.AttributesMask[1])
fmt.Printf(" MRENCLAVE: %s\n", sigStruct.EnclaveHash)
fmt.Printf(" MRSIGNER: %s\n", mrSigner)
fmt.Printf(" ISV product ID: %d\n", sigStruct.ISVProdID)
fmt.Printf(" ISV SVN: %d\n", sigStruct.ISVSVN)
} else {
Expand Down

0 comments on commit 08c596d

Please sign in to comment.