Skip to content

Commit

Permalink
Updated backing SSL impl
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobtread committed Jan 1, 2024
1 parent 99dd353 commit f88c381
Show file tree
Hide file tree
Showing 3 changed files with 122 additions and 101 deletions.
215 changes: 118 additions & 97 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ log = { version = "0.4", features = ["serde"] }
log-panics = { version = "2", features = ["with-backtrace"] }

# SSLv3 async impl
blaze-ssl-async = "^0.3"
blaze-ssl-async = "^0.4"

# Resource embedding
embeddy = "0.1"
Expand Down
6 changes: 3 additions & 3 deletions src/services/retriever/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use crate::{
},
utils::components::redirector,
};
use blaze_ssl_async::{stream::BlazeStream, BlazeError};
use blaze_ssl_async::BlazeStream;
use futures_util::{SinkExt, StreamExt};
use log::{debug, error, log_enabled};
use models::InstanceRequest;
Expand Down Expand Up @@ -71,7 +71,7 @@ pub enum InstanceError {
#[error("Failed to lookup server response empty")]
MissingValue,
#[error("Failed to connect to server: {0}")]
Blaze(#[from] BlazeError),
Io(#[from] std::io::Error),
#[error("Failed to retrieve instance: {0}")]
InstanceRequest(#[from] RetrieverError),
#[error("Server response missing address")]
Expand Down Expand Up @@ -299,7 +299,7 @@ pub type RetrieverResult<T> = Result<T, RetrieverError>;
impl OfficialSession {
/// Creates a session with an official server at the provided
/// `host` and `port`
async fn connect(host: &str, port: Port) -> Result<OfficialSession, BlazeError> {
async fn connect(host: &str, port: Port) -> std::io::Result<OfficialSession> {
let stream = BlazeStream::connect((host, port)).await?;
Ok(Self {
id: 0,
Expand Down

0 comments on commit f88c381

Please sign in to comment.