mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-06 19:41:15 +01:00
sr: add the base16 RSA identity digest to commit
Keep the base16 representation of the RSA identity digest in the commit object so we can use it without using hex_str() or dynamically encoding it everytime we need it. It's used extensively in the logs for instance. Fixes #19561 Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
@@ -140,6 +140,8 @@ commit_new(const char *rsa_identity)
|
||||
commit = tor_malloc_zero(sizeof(*commit));
|
||||
commit->alg = SR_DIGEST_ALG;
|
||||
memcpy(commit->rsa_identity, rsa_identity, sizeof(commit->rsa_identity));
|
||||
base16_encode(commit->rsa_identity_hex, sizeof(commit->rsa_identity_hex),
|
||||
commit->rsa_identity, sizeof(commit->rsa_identity));
|
||||
return commit;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user