HomePhabricator
Diffusion Comm e7fa7d37a224

[native/rust_library] Adding unit test for the `sign_string_with_private_key`…

Description

[native/rust_library] Adding unit test for the sign_string_with_private_key function

Summary:
This diff introduces the unit test for the sign_string_with_private_key function. This function gets the string to be signed and the private key and returns a sha256 signature. We will use this function in the Tunnelbroker client's new session creation because we need to provide the signed string to the Tunnelbroker to prove the ownership of the keys.

In this unit test, we will generate the keypair and sign the string, then we will verify the signature by the OpenSSL verifier.

Linear task: ENG-1333

Test Plan:
Run cargo unit tests by nix develop --accept-flake-config -c bash -c "cargo t".
All tests should pass.

Reviewers: jon, bartek

Reviewed By: jon

Subscribers: ashoat, tomek, atul

Differential Revision: https://phab.comm.dev/D6000