Skip to content

Commit

Permalink
(wip)
Browse files Browse the repository at this point in the history
  • Loading branch information
h4x3rotab committed Sep 28, 2020
1 parent 6c42ac4 commit aef0ffd
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pruntime/enclave/src/lib.rs
Expand Up @@ -1047,10 +1047,9 @@ fn init_runtime(input: InitRuntimeReq) -> Result<Value, Value> {

// load identity
if let Some(key) = input.debug_set_key {
let ecdsa_raw_key = hex::decode_hex(&key);
let ecdsa_key = SecretKey::parse_slice(ecdsa_raw_key.as_slice())
.map_err(|_| error_msg("can't parse private key"))?;
let raw_key = hex::decode_hex(&key);
let ecdsa_key = SecretKey::parse_slice(raw_key.as_slice())
.map_err(|_| error_msg("can't parse private key"))?;
let ecdh_key = ecdh::create_key(raw_key.as_slice())
.map_err(|_| error_msg("can't create ecdh key"))?;
init_secret_keys(Some((ecdsa_key, ecdh_key)))
Expand Down

0 comments on commit aef0ffd

Please sign in to comment.