From c3bd2bf9b4ef4de43bfd9a0709b4ff22112951a7 Mon Sep 17 00:00:00 2001 From: GroovieGermanikus Date: Wed, 20 Mar 2024 15:26:51 +0100 Subject: [PATCH] add cert bin --- benchrunner-service/src/bin/cert.rs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 benchrunner-service/src/bin/cert.rs diff --git a/benchrunner-service/src/bin/cert.rs b/benchrunner-service/src/bin/cert.rs new file mode 100644 index 00000000..a5bc170c --- /dev/null +++ b/benchrunner-service/src/bin/cert.rs @@ -0,0 +1,17 @@ +use std::path::PathBuf; +use std::str::FromStr; +use native_tls::Identity; +use solana_lite_rpc_util::encoding::BinaryEncoding; +use anyhow::Context; + +pub fn main() { + let client_pks_b64 = std::fs::read_to_string(PathBuf::from_str("client_pks_b64.txt").unwrap()).unwrap(); + + let client_pks = BinaryEncoding::Base64 + .decode(client_pks_b64) + .context("client pks decode").unwrap(); + + let client_pks = + Identity::from_pkcs12(&client_pks, "p").unwrap(); + +} \ No newline at end of file