Skip to content

Commit

Permalink
Refactor tinybit
Browse files Browse the repository at this point in the history
  • Loading branch information
pinkforest committed Apr 28, 2024
1 parent 5088150 commit 454d10d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
1 change: 0 additions & 1 deletion validation/local_ping_pong_openssl/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ mod test {

let mut ssl_stream =
openssl_util::accept_next(listener, path_ca_cert, path_cert, path_key);
ssl_stream.accept().unwrap();

let mut buf_in = vec![0; 1024];
let siz = ssl_stream.ssl_read(&mut buf_in);
Expand Down
7 changes: 3 additions & 4 deletions validation/local_ping_pong_openssl/src/openssl_util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,9 @@ pub fn accept_next(
ssl_context_build.check_private_key().unwrap();
let ctx = ssl_context_build.build();
let ssl = openssl::ssl::Ssl::new(&ctx).unwrap();
return SslStream::new(ssl, stream).unwrap();
//let mut ssl_stream = SslStream::new(ssl, stream).unwrap();
//ssl_stream.accept().unwrap();
//return ssl_stream;
let mut ssl_stream = SslStream::new(ssl, stream).unwrap();
ssl_stream.accept().unwrap();
return ssl_stream;
}
Err(_) => panic!("Failed OpenSSL accept_next()"),
}
Expand Down

0 comments on commit 454d10d

Please sign in to comment.