Skip to content

Commit

Permalink
disabled TLS
Browse files Browse the repository at this point in the history
  • Loading branch information
mario-eth committed May 24, 2024
1 parent f4416ee commit ee79bca
Show file tree
Hide file tree
Showing 5 changed files with 109 additions and 4 deletions.
100 changes: 100 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ clap = {version = "4.5.4", features = ["derive"]}
email-address-parser = "2.0.0"
lazy_static = "1.4.0"
regex = "1.10.4"
reqwest = {version = "0.12.3", features = ["blocking", "json", "multipart"]}
reqwest = {version = "0.12.3", features = ["blocking", "json", "multipart"], default-features = false}
rpassword = "7.3.1"
serde = "1.0.197"
serde_derive = "1.0.197"
Expand Down Expand Up @@ -46,3 +46,7 @@ path = "src/lib.rs"
[[bin]]
name = "soldeer"
path = "src/main.rs"

[features]
default = ["rustls"]
rustls = ["reqwest/rustls-tls"]
2 changes: 2 additions & 0 deletions src/auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ pub async fn login() -> Result<(), LoginError> {
let req = Client::new().post(url).json(&login);

let login_response = req.send().await;

let security_file = define_security_file_location();
if let Ok(response) = login_response {
if response.status().is_success() {
Expand Down Expand Up @@ -100,6 +101,7 @@ pub async fn login() -> Result<(), LoginError> {
});
}
}

Err(LoginError {
cause: "Authentication failed. Unknown error.".to_string(),
})
Expand Down
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@ use std::path::PathBuf;
use yansi::Paint;

pub const BASE_URL: &str = "https://api.soldeer.xyz";

// pub static DEPENDENCY_DIR: PathBuf = Lazy::new(|| env::current_dir().unwrap());

lazy_static! {
pub static ref DEPENDENCY_DIR: PathBuf =
get_current_working_dir().unwrap().join("dependencies/");
Expand Down
2 changes: 2 additions & 0 deletions src/versioning.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,8 @@ pub async fn push_version(
return Err(error);
}
}
// deleting zip archive
let _ = remove_file(zip_archive);

Ok(())
}
Expand Down

0 comments on commit ee79bca

Please sign in to comment.