Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,7 @@ and the `libssh-rs` crate which provides safe bindings based on `libssh-rs-sys`.

The `vendored` feature causes a static version of libssh to be compiled and linked into your program.
If no system `libssh` is detected at build time, or that system library is too old, then the vendored
`libssh` implementation will be used automatically. Note that the `libssh-rs` bindings make use of
a couple of new interfaces that have not made it into a released version of `libssh` at the time
of writing this note, so all users will be effectively running with `vendored` enabled until libssh
releases version `0.9.7`.
`libssh` implementation will be used automatically.

The `vendored-openssl` feature causes a vendored copy of `openssl` to be compiled and linked into your program.

Expand All @@ -35,4 +32,3 @@ viral clause in the case where you modify `libssh`. The license is explained
that simply using an unmodified `libssh-rs-sys` crate will not trigger that
viral clause, and you are thus able to use this crate under the terms of the
MIT license.

6 changes: 1 addition & 5 deletions libssh-rs-sys/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ Native bindings to [libssh](https://www.libssh.org/).

The `vendored` feature causes a static version of libssh to be compiled and linked into your program.
If no system `libssh` is detected at build time, or that system library is too old, then the vendored
`libssh` implementation will be used automatically. Note that the `libssh-rs` bindings make use of
a couple of new interfaces that have not made it into a released version of `libssh` at the time
of writing this note, so all users will be effectively running with `vendored` enabled until libssh
releases version `0.9.7`.
`libssh` implementation will be used automatically.

The `vendored-openssl` feature causes a vendored copy of `openssl` to be compiled and linked into your program.

Expand All @@ -32,4 +29,3 @@ viral clause in the case where you modify `libssh`. The license is explained
that simply using an unmodified `libssh-rs-sys` crate will not trigger that
viral clause, and you are thus able to use this crate under the terms of the
MIT license.

16 changes: 11 additions & 5 deletions libssh-rs-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ use std::path::PathBuf;
fn main() {
if std::env::var_os("CARGO_FEATURE_VENDORED").is_none()
&& pkg_config::Config::new()
// ssh_userauth_publickey_auto_get_current_identity
// is not yet in a released version of libssh
.atleast_version("0.9.7")
.atleast_version("0.12.2")
.probe("libssh")
.is_ok()
{
Expand Down Expand Up @@ -135,8 +133,8 @@ fn main() {
let version = std::fs::read_to_string("vendored/include/libssh/libssh_version.h.cmake")
.unwrap()
.replace("@libssh_VERSION_MAJOR@", "0")
.replace("@libssh_VERSION_MINOR@", "8")
.replace("@libssh_VERSION_PATCH@", "90");
.replace("@libssh_VERSION_MINOR@", "12")
.replace("@libssh_VERSION_PATCH@", "2");

std::fs::create_dir_all(include.join("libssh")).unwrap();
std::fs::write(include.join("libssh/libssh_version.h"), version).unwrap();
Expand Down Expand Up @@ -196,6 +194,7 @@ fn main() {
"connector.c",
"crypto_common.c",
"curve25519.c",
"curve25519_crypto.c",
"dh-gex.c",
"dh.c",
"dh_crypto.c",
Expand All @@ -209,11 +208,14 @@ fn main() {
"external/ed25519.c",
"external/fe25519.c",
"external/ge25519.c",
"external/libcrux_mlkem768_sha3.c",
"external/poly1305.c",
"external/sc25519.c",
"external/sntrup761.c",
"getpass.c",
"getrandom_crypto.c",
"gzip.c",
"hybrid_mlkem.c",
"init.c",
"kdf.c",
"kex.c",
Expand All @@ -226,12 +228,15 @@ fn main() {
"md_crypto.c",
"messages.c",
"misc.c",
"mlkem.c",
"mlkem_native.c",
"options.c",
"packet.c",
"packet_cb.c",
"packet_crypt.c",
"pcap.c",
"pki.c",
"pki_context.c",
"pki_container_openssh.c",
"pki_crypto.c",
// "pki_ed25519.c", gcrypt only
Expand All @@ -245,6 +250,7 @@ fn main() {
"sftp_common.c",
"sftp_aio.c",
"socket.c",
"sntrup761.c",
"string.c",
"threads.c",
"threads/libcrypto.c",
Expand Down
Loading