Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
liorbond committed Nov 28, 2022
1 parent 1cdb13d commit 4036e66
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,6 @@ localsecret:
--build-arg SGX_MODE=SW \
--build-arg SECRET_NODE_TYPE=BOOTSTRAP \
--build-arg CHAIN_ID=secretdev-1 \
--load \
-f deployment/dockerfiles/Dockerfile \
--target build-localsecret \
-t ghcr.io/scrtlabs/localsecret:${DOCKER_TAG} .
Expand Down
13 changes: 7 additions & 6 deletions cosmwasm/enclaves/shared/crypto/src/key_manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ use crate::{AESKey, KeyPair, Seed};
use enclave_ffi_types::EnclaveError;
use lazy_static::lazy_static;
use log::*;

use sgx_types::c_int;
use std::net::SocketAddr;
use std::os::unix::io::IntoRawFd;
Expand Down Expand Up @@ -243,7 +242,7 @@ impl Keychain {
"Sealing current consensus seed in {}",
*CURRENT_CONSENSUS_SEED_SEALING_PATH
);
if let Err(e) = genesis.seal(&CURRENT_CONSENSUS_SEED_SEALING_PATH.as_str()) {
if let Err(e) = current.seal(&CURRENT_CONSENSUS_SEED_SEALING_PATH.as_str()) {
error!("Error sealing current consensus_seed - error code 0xC14");
return Err(e);
}
Expand Down Expand Up @@ -397,6 +396,7 @@ impl Keychain {
trace!("Error while trying to convert to socket addrs {:?}", err);
CryptoError::SocketCreationError
})?;

for a in addrs {
if let SocketAddr::V4(_) = a {
addr = Some(a);
Expand All @@ -423,10 +423,11 @@ impl Keychain {
fn get_challange_from_service(fd: c_int, host_name: &str) -> Result<Vec<u8>, CryptoError> {
pub const CHALLANGE_ENDPOINT: &str = "/authenticate";

let req = format!(
"GET {} HTTP/1.1\r\nHOST: {}\r\nConnection: close\r\n\r\n",
CHALLANGE_ENDPOINT, host_name,
);
let req = format!("GET {} HTTP/1.1\r\nHOST: {}\r\nContent-Length:{}\r\nContent-Type: application/json\r\nConnection: close\r\n\r\n{}",
CHALLANGE_ENDPOINT,
host_name,
encoded_json.len(),
encoded_json);

trace!("{}", req);
let config = Keychain::make_client_config();
Expand Down
1 change: 1 addition & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ services:
- CHAINID=confidential-1
- RPC_URL=bootstrap:26657
- PERSISTENT_PEERS=115aa0a629f5d70dd1d464bc7e42799e00f4edae@bootstrap:26656
- FAUCET_URL=bootstrap:5000
deploy:
restart_policy:
condition: on-failure
Expand Down

0 comments on commit 4036e66

Please sign in to comment.