File tree 2 files changed +16
-1
lines changed
2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change 1
1
[package ]
2
2
name = " libssh-rs"
3
- version = " 0.1.6 "
3
+ version = " 0.1.7 "
4
4
edition = " 2018"
5
5
repository = " https://github.com/wez/libssh-rs"
6
6
description = " Bindings to the libssh library"
@@ -12,6 +12,10 @@ license = "MIT"
12
12
bitflags = " 1.3"
13
13
libssh-rs-sys = { version = " 0.1.3" , path = " ../libssh-rs-sys" }
14
14
thiserror = " 1.0"
15
+ # Pinned on this last version with openssl-src-300 until a newer release
16
+ # is made that unblocks it.
17
+ # <https://github.com/sfackler/rust-openssl/pull/1578>
18
+ openssl-sys = " =0.9.71"
15
19
16
20
[features ]
17
21
vendored = [" libssh-rs-sys/vendored" ]
Original file line number Diff line number Diff line change @@ -31,6 +31,17 @@ pub use crate::sftp::*;
31
31
struct LibraryState { }
32
32
impl LibraryState {
33
33
pub fn new ( ) -> Option < Self > {
34
+ // Force openssl to initialize.
35
+ // In theory, we don't need this, but in practice we do because of
36
+ // this bug:
37
+ // <https://github.com/openssl/openssl/issues/6214>
38
+ // which weirdly requires that *all* openssl threads be joined before
39
+ // the process exits, which is an unrealistic expectation on behalf
40
+ // of that library.
41
+ // That was worked around in openssl_sys:
42
+ // <https://github.com/sfackler/rust-openssl/pull/1324>
43
+ // which tells openssl to skip the process-wide shutdown.
44
+ openssl_sys:: init ( ) ;
34
45
let res = unsafe { sys:: ssh_init ( ) } ;
35
46
if res != sys:: SSH_OK as i32 {
36
47
None
You can’t perform that action at this time.
0 commit comments