hashgraph/hedera-services

yahcli should use UTF-8 encoding of hexed cert hash in DAB updates

Closed this issue · 1 comments

Description

On using yahcli to perform a NodeUpdate or NodeCreate the gRPC cert hashes are computed as the SHA-384 hash of the X.509 DER encoding.

However, the legacy representation of a gRPC cert hash in 0.0.101/102 uses the hash of the UTF-8 encoding of a PEM file containing this certificate. So we should preserve this behavior.

Steps to reproduce

As above.

Additional context

No response

Hedera network

No response

Version

multiple

Operating system

None

We just tested this and it works! ✅

Testing details:

  • 0.56.5 genesis reset
  • yahcli nodes update transactions to 7 nodes on the network
  • downloaded 101/node-details with yahcli
  • trigger upgrade with hedera.config.version=1, same version 0.56.5
  • downloaded 101/node-details with yahcli
  • certHash fields all match now, whereas previously before this PR, they did not match
    • they also are correct sha384sum of the .crt file