Coder Social home page Coder Social logo

rust-openssl's Introduction

rust-openssl

crates.io

OpenSSL bindings for the Rust programming language.

Documentation.

Release Support

The current supported release of openssl is 0.10 and openssl-sys is 0.9.

New major versions will be published at most once per year. After a new release, the previous major version will be partially supported with bug fixes for 3 months, after which support will be dropped entirely.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed under the terms of both the Apache License, Version 2.0 and the MIT license without any additional terms or conditions.

rust-openssl's People

Contributors

alex avatar alexcrichton avatar andygauge avatar apeduru avatar bkchr avatar bkstein avatar bluejekyll avatar botovq avatar cjcole avatar codyps avatar coolreader18 avatar davidben avatar erickt avatar johnthagen avatar jonas-schievink avatar jplatte avatar lilyball avatar manuels avatar max-heller avatar ralith avatar reaperhulk avatar rohit-lshift avatar sfackler avatar skepfyr avatar sladecek avatar stbuehler avatar vhbit avatar vishwin avatar wiktor-k avatar zh-jq avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rust-openssl's Issues

Not possible to use SslContext in closure environment?

It's possible (even probable) that this is due to my rust inexperience, but do I have to create a new SslContext for each handled TcpStream?

https://github.com/johnpmayer/rust-ws-server/blob/d7141e85f8064e31a5b42e0917e238d1ccc78b7f/src/main.rs#L40

cargo build
   Compiling ws-server v0.1.0 (file:///home/johnpmayer/ws-server)
/home/johnpmayer/ws-server/src/main.rs:40:58: 40:61 error: capture of moved value: `ctx`
/home/johnpmayer/ws-server/src/main.rs:40                         let ssl_result = SslStream::new(&ctx, stream);
                                                                                                   ^~~
/home/johnpmayer/ws-server/src/main.rs:38:45: 49:22 note: `ctx` moved into closure environment here because it has type `proc():Send`, which is non-copyable (perhaps you meant to use clone()?)
/home/johnpmayer/ws-server/src/main.rs:38                     Ok(mut stream) => spawn(proc() {
/home/johnpmayer/ws-server/src/main.rs:39                         println!("Securing client from {}", stream.peer_name());
/home/johnpmayer/ws-server/src/main.rs:40                         let ssl_result = SslStream::new(&ctx, stream);
/home/johnpmayer/ws-server/src/main.rs:41                         match ssl_result {
/home/johnpmayer/ws-server/src/main.rs:42                             Err(e) => {
/home/johnpmayer/ws-server/src/main.rs:43                                 println!("Ssl error: {}", e);
                                          ...
error: aborting due to previous error
Could not compile `ws-server`.

To learn more, run the command again with --verbose.
make: *** [all] Error 101

Fails to build on latest nightly

rustc 1.0.0-nightly (c89de2c56 2015-03-28) (built 2015-03-28)

   Compiling openssl v0.5.2
/home/yo/.multirust/toolchains/nightly/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.5.2/src/ssl/mod.rs:733:73: 733:87 error: use of unstable library feature 'collections': use &mut s[..] instead
/home/yo/.multirust/toolchains/nightly/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.5.2/src/ssl/mod.rs:733                     let len = try_ssl_stream!(self.stream.read(self.buf.as_mut_slice()));
                                                                                                                                                                                               ^~~~~~~~~~~~~~
/home/yo/.multirust/toolchains/nightly/cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.5.2/src/ssl/mod.rs:733:87: 733:87 help: add #![feature(collections)] to the crate attributes to enable
error: aborting due to previous error
Build failed, waiting for other jobs to finish...
Could not compile `openssl`.

`final` is now a reserved keyword in Rust

Latest nightly added abstract, final and override to reserved keyword list. Building rust-openssl fails with:

src/crypto/hash.rs:59:12: 59:17 error: `final` is a reserved keyword
src/crypto/hash.rs:59     pub fn final(&self) -> Vec<u8> {

rustc 0.12.0-nightly (63fe80e1f 2014-10-08 23:42:39 +0000)

What would be the best candidate for renaming? finish? finalize?

Fails to build on OS X

When building on OS X, I get the following error:

.../rust-openssl/src/bn/mod.rs:466:9: 470:10 error: method `neg` has an incompatible type for trait: expected &-ptr, found struct bn::BigNum [E0053]
.../rust-openssl/src/bn/mod.rs:466         fn neg(self) -> BigNum {
.../rust-openssl/src/bn/mod.rs:467             let mut n = self.clone();
.../rust-openssl/src/bn/mod.rs:468             n.negate();
.../rust-openssl/src/bn/mod.rs:469             n
.../rust-openssl/src/bn/mod.rs:470         }

Build issue on OSX

I've added Iron as a dependency on a brand new project, using rust 0.12-nightly installed with homebrew.

When I cargo build it beings updating git repos/dependencies. It fails when it gets to this repo.

Any help would be appreciated, thanks!

    Updating git repository `https://github.com/sfackler/rust-openssl.git`
Unable to update https://github.com/sfackler/rust-openssl.git

Caused by:
  ../../../.cargo/git/checkouts/rust-openssl-4145800ab3594a0f/master/Cargo.toml is not a valid manifest

Feature `tlsv1_1` includes `openssl-sys/tlsv1_1` which is neither a dependency nor another feature

Crypto Algorithms

How are we getting randomness, and is Elliptic Curve Crypto supported?

Work on sockets instead of MemBio

I was just investigating if I can implement a SslStream working on a SocketBio instead of MemBio to make SSL_pending work reliably. What is actually the reason why MemBio is used instead of directly a SocketBio? Is it to make the code more versatile.
Would you accept a pull request to add SocketBio (using AsRawFd) in addition to MemBio?

ICE

Compiling openssl-sys v0.5.1
/home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libstd/sync/mutex.rs:177:37: 180:2 error: internal compiler error: debuginfo: Could not find scope info for node NodeExpr(Expr { id: 4548, node: ExprStruct(Path { span: Span { lo: BytePos(4576204), hi: BytePos(4576215), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: StaticMutex#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }, [Field { ident: Spanned { node: lock#0, span: Span { lo: BytePos(1770102), hi: BytePos(1770106), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 4549, node: ExprPath(None, Path { span: Span { lo: BytePos(4576228), hi: BytePos(4576243), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: sys#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: MUTEX_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4576228), hi: BytePos(4576243), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4576222), hi: BytePos(4576243), expn_id: ExpnId(4294967295) } }, Field { ident: Spanned { node: poison#0, span: Span { lo: BytePos(1770129), hi: BytePos(1770135), expn_id: ExpnId(4294967295) } }, expr: Expr { id: 4550, node: ExprPath(None, Path { span: Span { lo: BytePos(4576257), hi: BytePos(4576274), expn_id: ExpnId(4294967295) }, global: false, segments: [PathSegment { identifier: poison#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }, PathSegment { identifier: FLAG_INIT#0, parameters: AngleBracketedParameters(AngleBracketedParameterData { lifetimes: [], types: [], bindings: [] }) }] }), span: Span { lo: BytePos(4576257), hi: BytePos(4576274), expn_id: ExpnId(4294967295) } }, span: Span { lo: BytePos(4576249), hi: BytePos(4576274), expn_id: ExpnId(4294967295) } }], None), span: Span { lo: BytePos(4576204), hi: BytePos(4576277), expn_id: ExpnId(4294967295) } })
note: the compiler unexpectedly panicked. this is a bug.
note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports
note: run with RUST_BACKTRACE=1 for a backtrace
thread 'rustc' panicked at 'Box', /home/rustbuild/src/rust-buildbot/slave/nightly-dist-rustc-linux/build/src/libsyntax/diagnostic.rs:129

mike@mike-T410s:~/workspace/bamboors$ rustc -V
rustc 1.0.0-nightly (3b3bb0e68 2015-03-04) (built 2015-03-05)

AES test vectors fail

Somehow rust-openssl makes two output blocks from one 16 byte input block which seems to create issues. Demoed by NIST test vectors in this gist

Segmentation fault possible on PKey methods

When calling PKey::encrypt(..) without a public key set, a Segmentation fault occurs. This also happens when first calling load_pub with an invalid key and then calling encrypt.

Unfortunately there is no way to detect if the set keys are valid or not before calling the de/encrypt methods. The load_ methods should probably return a Result

crate_id should specify different filename

The crate_id right now is "github.com/sfackler/rust-openssl". This means the resulting filename is librust-openssl-4fdb0f34-0.0.dylib. This also means that in order to reference this crate, you need to say something like

extern mod openssl = "rust-openssl";

because rust-openssl is not a valid identifier.

I would recommend that the library name be changed to just "openssl", but modifying the crate_id to

#[crate_id="github.com/sfackler/rust-openssl#openssl:0.0"];

You may also want to pick a non-0.0 version number as well.

SslMethod cfg features

I appreciate your open source project. I found this code in src/ssl/mod.rs. I am curious about this cfg features. May I ask you about this? Why should we put these macros to use some advanced(?) ssl methods?

#[cfg(feature = "tlsv1_1")]
#[cfg(feature = "tlsv1_2")]
#[cfg(feature = "dtlsv1")]
#[cfg(feature = "dtlsv1_2")]

Build troubles on Windows [Fixed?]

libcrypto.a and libssl.a are not available in the OpenSSL distribution for Windows, causing linker failures like "-lcrypto not found". However, the symbols rust-openssl needs are exported in libeay32.a and ssleay32.a. I found a quick fix.

  1. Download the latest OpenSSL installer for Win32 from http://slproweb.com/products/Win32OpenSSL.html
  2. Run the installer. I elected to install the libs to OpenSSL /bin instead of the Windows directory. (See screenshot)

openssl installer

  1. Copy libeay32.a and ssleay32.a from C:\OpenSSL-Win32\lib\MinGW\ to the MinGW libs directory. (E.g. C:\Program Files (x86)\mingw-builds\x32-4.8.1-win32-dwarf-rev5\mingw32\lib)
  2. Rename the two files to libcrypto.a and libssl.a, respectively.
  3. Then cargo build or cargo test for rust-openssl.

Most of the tests pass. Several fail, but it appears due to errors unrelated to this problem:

failures:

---- ssl::tests::test_read stdout ----
    task 'ssl::tests::test_read' failed at 'called `Result::unwrap()` on an
`Err` value: connection refused (OS Error 10061 (FormatMessageW() returned error
 317))', C:\bot\slave\nightly-win32\build\src\libcore\result.rs:608


---- ssl::tests::test_new_sslstream stdout ----
    task 'ssl::tests::test_new_sslstream' failed at 'called `Result::unwrap(
)` on an `Err` value: connection refused (OS Error 10061 (FormatMessageW() retur
ned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\result.rs:608


---- ssl::tests::test_verify_callback_load_certs stdout ----
    task 'ssl::tests::test_verify_callback_load_certs' failed at 'called `Re
sult::unwrap()` on an `Err` value: connection refused (OS Error 10061 (FormatMes
sageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\resu
lt.rs:608


---- ssl::tests::test_verify_trusted_callback_override_bad stdout ----
    task 'ssl::tests::test_verify_trusted_callback_override_bad' failed at '
called `Result::unwrap()` on an `Err` value: connection refused (OS Error 10061
(FormatMessageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\li
bcore\result.rs:608


---- ssl::tests::test_verify_trusted stdout ----
    task 'ssl::tests::test_verify_trusted' failed at 'called `Result::unwrap
()` on an `Err` value: connection refused (OS Error 10061 (FormatMessageW() retu
rned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\result.rs:608


---- ssl::tests::test_verify_trusted_callback_override_ok stdout ----
    task 'ssl::tests::test_verify_trusted_callback_override_ok' failed at 'c
alled `Result::unwrap()` on an `Err` value: connection refused (OS Error 10061 (
FormatMessageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\lib
core\result.rs:608


---- ssl::tests::test_verify_trusted_get_error_err stdout ----
    task 'ssl::tests::test_verify_trusted_get_error_err' failed at 'called `
Result::unwrap()` on an `Err` value: connection refused (OS Error 10061 (FormatM
essageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\re
sult.rs:608


---- ssl::tests::test_verify_trusted_get_error_ok stdout ----
    task 'ssl::tests::test_verify_trusted_get_error_ok' failed at 'called `R
esult::unwrap()` on an `Err` value: connection refused (OS Error 10061 (FormatMe
ssageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\res
ult.rs:608


---- ssl::tests::test_verify_untrusted stdout ----
    task 'ssl::tests::test_verify_untrusted' failed at 'called `Result::unwr
ap()` on an `Err` value: connection refused (OS Error 10061 (FormatMessageW() re
turned error 317))', C:\bot\slave\nightly-win32\build\src\libcore\result.rs:608


---- ssl::tests::test_verify_untrusted_callback_override_ok stdout ----
    task 'ssl::tests::test_verify_untrusted_callback_override_ok' failed at
'called `Result::unwrap()` on an `Err` value: connection refused (OS Error 10061
 (FormatMessageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\l
ibcore\result.rs:608


---- ssl::tests::test_write stdout ----
    task 'ssl::tests::test_write' failed at 'called `Result::unwrap()` on an
 `Err` value: connection refused (OS Error 10061 (FormatMessageW() returned erro
r 317))', C:\bot\slave\nightly-win32\build\src\libcore\result.rs:608


---- ssl::tests::test_verify_untrusted_callback_override_bad stdout ----
    task 'ssl::tests::test_verify_untrusted_callback_override_bad' failed at
 'called `Result::unwrap()` on an `Err` value: connection refused (OS Error 1006
1 (FormatMessageW() returned error 317))', C:\bot\slave\nightly-win32\build\src\
libcore\result.rs:608



failures:
    ssl::tests::test_new_sslstream
    ssl::tests::test_read
    ssl::tests::test_verify_callback_load_certs
    ssl::tests::test_verify_trusted
    ssl::tests::test_verify_trusted_callback_override_bad
    ssl::tests::test_verify_trusted_callback_override_ok
    ssl::tests::test_verify_trusted_get_error_err
    ssl::tests::test_verify_trusted_get_error_ok
    ssl::tests::test_verify_untrusted
    ssl::tests::test_verify_untrusted_callback_override_bad
    ssl::tests::test_verify_untrusted_callback_override_ok
    ssl::tests::test_write

I think it's expecting a local test server to be running or something, because those connections are to 127.0.0.1:15418. Those fail on my Linux machine too, using libssl-dev instead of this fix. The rest of the tests pass, which suggests that the linking was successful.

There's libeay32.dll and libssl32.dll in the OpenSSL install directory. Those could be used as well, but dynamic linking is gross.

SslStream does not implement clone

openssl::ssl::SslStream<std::io::net::tcp::TcpStream> does not implement any method in scope named clone

TcpStream implements clone; my use case would be to clone to use the object in a spawned task:

let stream = stream.clone();
task::task().spawn(proc() {
    let mut stream = stream;
    []
});

tests.rs: 201:15 error: obsolete syntax: `proc` expression

C:\rust-openssl [master...origin/master]> cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling pkg-config v0.1.1
   Compiling openssl-sys v0.2.3 (file:///C:/rust-openssl)
   Compiling openssl v0.2.3 (file:///C:/rust-openssl)
C:\rust-openssl\src\ssl\tests.rs:201:11: 201:15 error: obsolete syntax: `proc` expression
C:\rust-openssl\src\ssl\tests.rs:201     spawn(proc() {
                                               ^~~~
note: use a `move ||` expression instead
error: aborting due to previous error
Could not compile `openssl`.

To learn more, run the command again with --verbose.

rustc 0.13.0-nightly (126db549b 2014-12-15 00:07:35 +0000)
cargo 0.0.1-pre-nightly (0f6667c 2014-12-08 21:19:01 +0000)

librustrt got removed

rust-lang/rust#19654 got merged recently and the change is already in the latest nightly (rustc 0.13.0-nightly (cc19e3380 2014-12-20 20:00:36 +0000)). This breaks the build with the following error:

$ cargo build
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling pkg-config v0.1.2
   Compiling openssl-sys v0.2.6 (file:///home/zbyszek/Development/Rust/rust-openssl)
/home/zbyszek/Development/Rust/rust-openssl/openssl-sys/src/lib.rs:5:1: 5:21 error: can't find crate for `rustrt`
/home/zbyszek/Development/Rust/rust-openssl/openssl-sys/src/lib.rs:5 extern crate rustrt;
                                                                     ^~~~~~~~~~~~~~~~~~~~
error: aborting due to previous error
Could not compile `openssl-sys`.

Failure to link

Using Windows 8.1 x64. May be related to having updated MSYS2 or new version of this library. Still investigating.

error: linking with `gcc` failed: exit code: 1
note: gcc '-Wl,--enable-long-section-names' '-fno-use-linker-plugin' '-Wl,--nxcompat' '-static-libgcc' '-m64' '-L' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib' '-o' 'A:\msys64\home\retep998\ftb-rs\target\ftb.exe' 'A:\msys64\home\retep998\ftb-rs\target\ftb.o' '-Wl,--gc-sections' 'A:\msys64\home\retep998\ftb-rs\target\deps\libhyper-df0a13a9a4d5292c.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libmucell-15aa001c80416321.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libimage-7eb5ebf8d51405f6.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libcookie-03a3f41cb989f010.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\liburl-8ddaf8ba263d29f8.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libtime-8bde1abd230448f0.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libserialize-4e7c5e5c.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libunsafe-any-3d2f45b7c92200ea.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-sys-486f58cec0e7cd9b.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libflate-4e7c5e5c.rlib' 'A:\msys64\home\retep998\ftb-rs\target\deps\libmime-4b114bc7d7856ad5.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\liblog-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libregex-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libstd-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\librustrt-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libcollections-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\liballoc-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\liblibc-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\librand-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libunicode-4e7c5e5c.rlib' 'A:\rust64\bin\rustlib\x86_64-pc-windows-gnu\lib\libcore-4e7c5e5c.rlib' '-L' 'A:\msys64\home\retep998\ftb-rs\target' '-L' 'A:\msys64\home\retep998\ftb-rs\target\deps' '-L' 'A:\msys64\home\retep998\ftb-rs\target\build\time-8bde1abd230448f0\out' '-L' 'A:\msys64\home\retep998\ftb-rs\.rust' '-L' 'A:\msys64\home\retep998\ftb-rs' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lws2_32' '-lcompiler-rt'
note: A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::asn1::Asn1Time::new_with_period':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src/macros.rs:27: undefined reference to `X509_gmtime_adj'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::error::SslError::get':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/error.rs:71: undefined reference to `ERR_get_error'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::asn1::Asn1Time.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\asn1/mod.rs:46: undefined reference to `ASN1_TIME_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src/macros.rs:76: undefined reference to `BN_new'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:400: undefined reference to `BN_clear_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(5465)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:83: undefined reference to `BN_set_word'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(5469)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src/macros.rs:90: undefined reference to `BN_bin2bn'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_sqr':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:97: undefined reference to `BN_sqr'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_nnmod':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:103: undefined reference to `BN_nnmod'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_add':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:109: undefined reference to `BN_mod_add'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_sub':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:115: undefined reference to `BN_mod_sub'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_mul':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:121: undefined reference to `BN_mod_mul'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_sqr':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:127: undefined reference to `BN_mod_sqr'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_exp':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:133: undefined reference to `BN_exp'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_exp':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:139: undefined reference to `BN_mod_exp'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod_inv':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:145: undefined reference to `BN_mod_inverse'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_gcd':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:151: undefined reference to `BN_gcd'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_generate_prime':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:161: undefined reference to `BN_generate_prime_ex'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::is_prime':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:20: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:169: undefined reference to `BN_is_prime_ex'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:25: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::is_prime_fast':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:20: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:177: undefined reference to `BN_is_prime_fasttest_ex'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:25: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_new_random':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:184: undefined reference to `BN_rand'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_new_pseudo_random':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:190: undefined reference to `BN_pseudo_rand'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_rand_in_range':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:196: undefined reference to `BN_rand_range'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_pseudo_rand_in_range':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:202: undefined reference to `BN_pseudo_rand_range'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::set_bit':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:208: undefined reference to `BN_set_bit'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::clear_bit':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:218: undefined reference to `BN_clear_bit'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::is_bit_set':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:228: undefined reference to `BN_is_bit_set'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::mask_bits':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:234: undefined reference to `BN_mask_bits'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_shl1':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:244: undefined reference to `BN_lshift1'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_shr1':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:250: undefined reference to `BN_rshift1'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_add':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:256: undefined reference to `BN_add'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_sub':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:262: undefined reference to `BN_sub'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mul':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:268: undefined reference to `BN_mul'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_div':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:274: undefined reference to `BN_div'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_mod':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:52: undefined reference to `BN_CTX_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:280: undefined reference to `BN_div'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:62: undefined reference to `BN_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_shl':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:286: undefined reference to `BN_lshift'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::checked_shr':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:292: undefined reference to `BN_rshift'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::negate':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:298: undefined reference to `BN_set_negative'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::abs_cmp':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:304: undefined reference to `BN_ucmp'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::num_bits':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:323: undefined reference to `BN_num_bits'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::to_vec':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:340: undefined reference to `BN_bn2bin'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum::to_dec_str':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:348: undefined reference to `BN_bn2dec'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:352: undefined reference to `CRYPTO_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum.PartialEq::eq':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:368: undefined reference to `BN_cmp'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::BigNum.PartialOrd::partial_cmp':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:382: undefined reference to `BN_cmp'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bn::unchecked::BigNum.Clone::clone':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bn/mod.rs:455: undefined reference to `BN_dup'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bio::MemBio.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bio/mod.rs:18: undefined reference to `BIO_free_all'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bio::MemBio::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bio/mod.rs:29: undefined reference to `BIO_s_mem'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bio/mod.rs:29: undefined reference to `BIO_new'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bio::MemBio.Reader::read':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bio/mod.rs:64: undefined reference to `BIO_read'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::bio::MemBio.Writer::write':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\bio/mod.rs:93: undefined reference to `BIO_write'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::evpmd':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:21: undefined reference to `EVP_md5'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:22: undefined reference to `EVP_sha1'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:23: undefined reference to `EVP_sha224'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:24: undefined reference to `EVP_sha256'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:25: undefined reference to `EVP_sha384'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:26: undefined reference to `EVP_sha512'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:27: undefined reference to `EVP_ripemd160'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::HasherContext::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:41: undefined reference to `EVP_MD_CTX_create'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::HasherContext.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:49: undefined reference to `EVP_MD_CTX_destroy'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::Hasher::update':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:86: undefined reference to `EVP_DigestUpdate'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::Hasher::with_context':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:77: undefined reference to `EVP_DigestInit_ex'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hash::Hasher::finalize_reuse':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hash.rs:106: undefined reference to `EVP_DigestFinal_ex'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hmac::HMAC':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hmac.rs:34: undefined reference to `HMAC_CTX_init'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hmac.rs:40: undefined reference to `HMAC_Init_ex'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hmac::HMAC::update':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hmac.rs:49: undefined reference to `HMAC_Update'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hmac::HMAC::finalize':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hmac.rs:57: undefined reference to `HMAC_Final'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::hmac::HMAC.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/hmac.rs:65: undefined reference to `HMAC_CTX_cleanup'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkcs5::pbkdf2_hmac_sha1':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkcs5.rs:18: undefined reference to `PKCS5_PBKDF2_HMAC_SHA1'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:63: undefined reference to `EVP_PKEY_new'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::_tostr':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:71: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::_fromstr':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:87: undefined reference to `EVP_PKEY_set1_RSA'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::gen':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:97: undefined reference to `RSA_generate_key'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:104: undefined reference to `EVP_PKEY_assign'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::save_pub':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:114: undefined reference to `i2d_RSA_PUBKEY'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::load_pub':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:121: undefined reference to `d2i_RSA_PUBKEY'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::save_priv':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:130: undefined reference to `i2d_RSAPrivateKey'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::load_priv':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:137: undefined reference to `d2i_RSAPrivateKey'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::write_pem':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:147: undefined reference to `PEM_write_bio_PrivateKey'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::size':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:159: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:159: undefined reference to `RSA_size'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::max_data':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:197: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:197: undefined reference to `RSA_size'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::encrypt_with_padding':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:207: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:208: undefined reference to `RSA_size'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:219: undefined reference to `RSA_public_encrypt'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::decrypt_with_padding':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:232: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:233: undefined reference to `RSA_size'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::decrypt_with_padding':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/<std macros>:235: undefined reference to `RSA_size'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::decrypt_with_padding':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:244: undefined reference to `RSA_private_decrypt'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::sign_with_hash':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:280: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:280: undefined reference to `RSA_size'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:290: undefined reference to `RSA_sign'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey::verify_with_hash':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:303: undefined reference to `EVP_PKEY_get1_RSA'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:311: undefined reference to `RSA_verify'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::pkey::PKey.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/pkey.rs:326: undefined reference to `EVP_PKEY_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::rand::rand_bytes':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/rand.rs:9: undefined reference to `RAND_bytes'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::evpc':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:36: undefined reference to `EVP_aes_128_ecb'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:37: undefined reference to `EVP_aes_128_cbc'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:43: undefined reference to `EVP_aes_256_ecb'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:44: undefined reference to `EVP_aes_256_cbc'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:50: undefined reference to `EVP_rc4'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:67: undefined reference to `EVP_CIPHER_CTX_new'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter::pad':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:80: undefined reference to `EVP_CIPHER_CTX_set_padding'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter::init':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:101: undefined reference to `EVP_CipherInit'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter::update':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:120: undefined reference to `EVP_CipherUpdate'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter::finalize':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:137: undefined reference to `EVP_CipherFinal'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::symm::Crypter.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/symm.rs:149: undefined reference to `EVP_CIPHER_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::crypto::memcmp::eq':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\crypto/memcmp.rs:18: undefined reference to `CRYPTO_memcmp'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::error::get_lib':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/error.rs:53: undefined reference to `ERR_lib_error_string'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::error::get_func':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/error.rs:57: undefined reference to `ERR_func_error_string'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::error::get_reason':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/error.rs:61: undefined reference to `ERR_reason_error_string'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6125)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:26: undefined reference to `SSL_CTX_get_ex_new_index'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::SslMethod::to_raw':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:60: undefined reference to `SSLv3_method'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:61: undefined reference to `TLSv1_method'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:62: undefined reference to `SSLv23_method'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::raw_verify':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:108: undefined reference to `SSL_get_ex_data_X509_STORE_CTX_idx'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:109: undefined reference to `X509_STORE_CTX_get_ex_data'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:109: undefined reference to `SSL_get_SSL_CTX'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:111: undefined reference to `SSL_CTX_get_ex_data'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::SslContext.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:179: undefined reference to `SSL_CTX_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::SslContext::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:188: undefined reference to `SSL_CTX_new'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::SslContext::set_verify':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:201: undefined reference to `SSL_CTX_set_ex_data'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:202: undefined reference to `SSL_CTX_set_verify'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::SslContext::set_verify_depth':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:226: undefined reference to `SSL_CTX_set_verify_depth'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6177)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:235: undefined reference to `SSL_CTX_load_verify_locations'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6181)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:245: undefined reference to `SSL_CTX_use_certificate_file'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6185)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:255: undefined reference to `SSL_CTX_use_PrivateKey_file'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6193)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:263: undefined reference to `SSL_CTX_set_cipher_list'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:291: undefined reference to `SSL_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::new':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:297: undefined reference to `SSL_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:306: undefined reference to `SSL_set_bio'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::get_rbio':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:311: undefined reference to `SSL_get_rbio'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::get_wbio':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:315: undefined reference to `SSL_get_wbio'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::connect':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:327: undefined reference to `SSL_connect'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::accept':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:331: undefined reference to `SSL_accept'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::read':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:336: undefined reference to `SSL_read'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::write':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:341: undefined reference to `SSL_write'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::get_error':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:345: undefined reference to `SSL_get_error'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6554)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:362: undefined reference to `SSL_ctrl'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::ssl::Ssl::get_peer_certificate':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\ssl/mod.rs:376: undefined reference to `SSL_get_peer_certificate'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509StoreContext::get_error':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:39: undefined reference to `X509_STORE_CTX_get_error'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509StoreContext::get_current_cert':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:44: undefined reference to `X509_STORE_CTX_get_current_cert'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509Generator::add_extension':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:242: undefined reference to `X509V3_set_ctx'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:251: undefined reference to `X509_add_ext'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:252: undefined reference to `X509_EXTENSION_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6594)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:247: undefined reference to `X509V3_EXT_conf_nid'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `fn"fn"(6602)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:263: undefined reference to `X509_NAME_add_entry_by_txt'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509Generator::generate':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:291: undefined reference to `X509_new'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:296: undefined reference to `X509_set_version'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:297: undefined reference to `X509_get_serialNumber'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:297: undefined reference to `ASN1_INTEGER_set'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:302: undefined reference to `X509_set_notBefore'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:306: undefined reference to `X509_set_notAfter'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:310: undefined reference to `X509_set_pubkey'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:312: undefined reference to `X509_get_subject_name'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:316: undefined reference to `X509_set_issuer_name'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:329: undefined reference to `X509_sign'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509<'ctx>.Drop::drop':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:422: undefined reference to `X509_free'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509<'ctx>::subject_name':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:379: undefined reference to `X509_get_subject_name'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-272aad458f3b7dd6.rlib(openssl-272aad458f3b7dd6.o): In function `openssl::x509::X509<'ctx>::fingerprint':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master/src\x509/mod.rs:390: undefined reference to `X509_digest'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-sys-486f58cec0e7cd9b.rlib(openssl-sys-486f58cec0e7cd9b.o): In function `fn"fn"(2637)':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master\openssl-sys/src/lib.rs:214: undefined reference to `SSL_library_init'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master\openssl-sys/src/lib.rs:216: undefined reference to `SSL_load_error_strings'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master\openssl-sys/src/lib.rs:218: undefined reference to `CRYPTO_num_locks'
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master\openssl-sys/src/lib.rs:220: undefined reference to `CRYPTO_set_locking_callback'
A:\msys64\home\retep998\ftb-rs\target\deps\libopenssl-sys-486f58cec0e7cd9b.rlib(openssl-sys-486f58cec0e7cd9b.o): In function `openssl-sys::BIO_eof':
A:\msys64\home\retep998\.cargo\git\checkouts\rust-openssl-4145800ab3594a0f\master\openssl-sys/src/lib.rs:229: undefined reference to `BIO_ctrl'
collect2.exe: error: ld returned 1 exit status

error: aborting due to previous error
Could not compile `ftb`.

Caused by:
  Process didn't exit successfully: `rustc A:\msys64\home\retep998\ftb-rs\src\main.rs --crate-name ftb --crate-type bin -g --out-dir A:\msys64\home\retep998\ftb-rs\target --dep-info A:\msys64\home\retep998\ftb-rs\target\.fingerprint\ftb-a4b4295f7a3e143f\dep-bin-ftb -L A:\msys64\home\retep998\ftb-rs\target -L A:\msys64\home\retep998\ftb-rs\target\deps --extern hyper=A:\msys64\home\retep998\ftb-rs\target\deps/libhyper-df0a13a9a4d5292c.rlib --extern image=A:\msys64\home\retep998\ftb-rs\target\deps/libimage-7eb5ebf8d51405f6.rlib -L A:\msys64\home\retep998\ftb-rs\target\build\time-8bde1abd230448f0\out` (status=101)

"entered unreachable code" when connecting to rust-openssl server

Doing this:

  • Run HTTPS server on Hyper with self-signed certificate
  • Connect to server using Firefox (34.0.5) with the certificate not accepted (Firefox shows warning screen)

I get this panic:
thread '' panicked at 'internal error: entered unreachable code', /home/cyndis/src/rust-openssl/openssl/src/ssl/mod.rs:562
Specifically, the matched value is "Err(OpenSslErrors([UnknownError { library: "SSL routines", function: "SSL3_READ_BYTES", reason: "tlsv1 alert unknown ca" }]))". I don't know why you would get this on the server side, but anyway.

When I tell Firefox to accept the self-signed certificate, the renewed SSL negotiation succeeds without errors. As such this is not really breaking anything.

~[T] has been removed from rust-master, causing a build failure

This is the error for reference:

rustc -O --cfg ndebug  --dep-info build/openssl.d --out-dir build lib.rs
crypto/symm.rs:174:41: 174:42 error: obsolete syntax: `~[T]` is no longer a type
crypto/symm.rs:174 pub fn encrypt(t: Type, key: &[u8], iv: ~[u8], data: &[u8]) -> Vec<u8> {
                                                           ^
note: use the `Vec` type instead
crypto/symm.rs:186:41: 186:42 error: obsolete syntax: `~[T]` is no longer a type
crypto/symm.rs:186 pub fn decrypt(t: Type, key: &[u8], iv: ~[u8], data: &[u8]) -> Vec<u8> {
                                                           ^
error: aborting due to 2 previous errors

Undefined symbols for architecture x86_64: _HMAC_CTX_copy

Hello @sfackler. I'm trying to build the compiler plugin deuterium-orm. Build fails with this log:

➜  deuterium-orm git:(master) cargo test
   Compiling deuterium_orm v0.2.0 (file:///Users/panferov/Workspace/my/deuterium-orm)
error: linking with `cc` failed: exit code: 1
note: "cc" '"-m64"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-o"' '"/Users/panferov/Workspace/my/deuterium-orm/target/libdeuterium_orm-896d72fca5c9bc95.dylib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deuterium_orm-896d72fca5c9bc95.o"' '"-Wl,-force_load,/usr/local/lib/rustlib/x86_64-apple-darwin/lib/libmorestack.a"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deuterium_orm-896d72fca5c9bc95.metadata.o"' '"-Wl,-dead_strip"' '"-nodefaultlibs"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps"' '"-lregex_macros-bdbdbfedad0748ac"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libr2d2_postgres-bce14e0ec6da6f74.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libr2d2-79d6da19cbaa6712.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libdeuterium-7d832dbdcf306b58.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libpostgres-72a46dcfcd1d6bc3.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libopenssl-c72d965efb0fb62c.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libtime-69a93874bd2e0ce7.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/liblibc-6b537f2898b2a028.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libopenssl-sys-87fa09339616a329.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libbyteorder-b47315f260e49ab0.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/liblog-6ccd07f1f8244a62.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libphf-80bc73aa3f1046ec.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libphf_shared-00040893c78e25d2.rlib"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lrustc-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lflate-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lrbml-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lgetopts-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lrustc_back-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lsyntax-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lfmt_macros-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lserialize-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-larena-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lterm-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-llog-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lgraphviz-4e7c5e5c"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/libuuid-22396cb56d655bab.rlib"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps/librustc-serialize-db8cde5690079042.rlib"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lrustc_llvm-4e7c5e5c"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-lstd-4e7c5e5c"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/target"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/target/deps"' '"-L"' '"/usr/lib"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/target/build/time-69a93874bd2e0ce7/out"' '"-L"' '"/usr/local/lib/rustlib/x86_64-apple-darwin/lib"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/.rust/lib/x86_64-apple-darwin"' '"-L"' '"/Users/panferov/Workspace/my/deuterium-orm/lib/x86_64-apple-darwin"' '"-lc"' '"-lm"' '"-lssl"' '"-lcrypto"' '"-lz"' '"-lpthread"' '"-ledit"' '"-lm"' '"-lc++"' '"-lSystem"' '"-lpthread"' '"-lc"' '"-lm"' '"-dynamiclib"' '"-Wl,-dylib"' '"-lcompiler-rt"'
note: ld: warning: directory not found for option '-L/Users/panferov/Workspace/my/deuterium-orm/.rust/lib/x86_64-apple-darwin'
ld: warning: directory not found for option '-L/Users/panferov/Workspace/my/deuterium-orm/lib/x86_64-apple-darwin'
Undefined symbols for architecture x86_64:
  "_HMAC_CTX_copy", referenced from:
      crypto::hmac::HMAC.Clone::clone::h44da8c2482d0bb63wKb in libopenssl-c72d965efb0fb62c.rlib(openssl-c72d965efb0fb62c.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

I would be grateful for any help with this because I stuck and don't know what to do.

undefined reference to `bn_is_zero'

My builds of iron-based projects are still failing with something related to the BN_is_zero problem, despite running cargo update:

Installing Rust and Cargo
62.41s$ curl -sL https://static.rust-lang.org/dist/rust-nightly-x86_64-unknown-linux-gnu.tar.gz | tar --strip-components=1 -C ~/rust -xzf -
7.53s$ curl -sL https://static.rust-lang.org/cargo-dist/cargo-nightly-x86_64-unknown-linux-gnu.tar.gz | tar --strip-components=1 -C ~/rust -xzf -
0.01s0.01s0.13s$ rustc --version
rustc 0.12.0-nightly (dc987adfc 2014-10-04 23:42:07 +0000)
0.03s$ cargo --version
cargo 0.0.1-pre-nightly (f0762df 2014-10-03 01:57:14 +0000)
before_script
9.14s$ cargo update
    Updating git repository `https://github.com/iron/router.git`
    Updating git repository `https://github.com/iron/logger.git`
    Updating git repository `https://github.com/iron/iron.git`
    Updating git repository `https://github.com/conduit-rust/route-recognizer.rs.git`
    Updating git repository `https://github.com/servo/rust-url.git`
    Updating git repository `https://github.com/lifthrasiir/rust-encoding`
    Updating git repository `https://github.com/reem/rust-error.git`
    Updating git repository `https://github.com/reem/rust-typeable.git`
    Updating git repository `https://github.com/reem/rust-replace-map.git`
    Updating git repository `https://github.com/reem/rust-typemap.git`
    Updating git repository `https://github.com/reem/rust-phantom.git`
    Updating git repository `https://github.com/reem/rust-unsafe-any.git`
    Updating git repository `https://github.com/reem/rust-http-content-type.git`
    Updating git repository `https://github.com/sfackler/rust-phf.git`
    Updating git repository `https://github.com/chris-morgan/rust-http.git`
    Updating git repository `https://github.com/sfackler/rust-openssl.git`
    Updating git repository `https://github.com/reem/rust-plugin.git`
37.53s$ cargo build
   Compiling phantom v0.0.0 (https://github.com/reem/rust-phantom.git#deb5acfe)
   Compiling route-recognizer v0.1.0 (https://github.com/conduit-rust/route-recognizer.rs.git#9dfb3413)
   Compiling encoding v0.1.0 (https://github.com/lifthrasiir/rust-encoding#97e5a566)
   Compiling phf_mac v0.0.0 (https://github.com/sfackler/rust-phf.git#a1b50302)
   Compiling typeable v0.0.1 (https://github.com/reem/rust-typeable.git#55154e18)
   Compiling replace-map v0.0.1 (https://github.com/reem/rust-replace-map.git#140217a7)
   Compiling unsafe-any v0.1.0 (https://github.com/reem/rust-unsafe-any.git#75cff194)
   Compiling openssl v0.0.0 (https://github.com/sfackler/rust-openssl.git#40c69488)
   Compiling phf v0.0.0 (https://github.com/sfackler/rust-phf.git#a1b50302)
   Compiling error v0.0.0 (https://github.com/reem/rust-error.git#a04b3213)
   Compiling typemap v0.0.0 (https://github.com/reem/rust-typemap.git#895f26e2)
   Compiling plugin v0.0.0 (https://github.com/reem/rust-plugin.git#19b97b79)
   Compiling url v0.1.0 (https://github.com/servo/rust-url.git#55b18b79)
   Compiling http v0.1.0-pre (https://github.com/chris-morgan/rust-http.git#bd06bef0)
   Compiling generator v0.1.0 (https://github.com/reem/rust-http-content-type.git#6f656bbe)
   Compiling content_type v0.1.0 (https://github.com/reem/rust-http-content-type.git#6f656bbe)
   Compiling iron v0.0.1 (https://github.com/iron/iron.git#2cefd9a0)
   Compiling router v0.1.0 (https://github.com/iron/router.git#6911bf35)
   Compiling logger v0.1.0 (https://github.com/iron/logger.git#7ace037e)
   Compiling heroku-rust-cargo-hello v1.0.0 (file:///home/travis/build/emk/heroku-rust-cargo-hello)
error: linking with `cc` failed: exit code: 1
note: cc '-m64' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-o' '/home/travis/build/emk/heroku-rust-cargo-hello/target/hello' '/home/travis/build/emk/heroku-rust-cargo-hello/target/hello.o' '-Wl,--whole-archive' '-lmorestack' '-Wl,--no-whole-archive' '-nodefaultlibs' '-fno-lto' '-Wl,--gc-sections' '-pie' '-Wl,--as-needed' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/librouter-6398087b87453241.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libroute-recognizer-e21fcedb311c4a38.rlib' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lnative-4e7c5e5c' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/liblogger-6a39d0e2c1e16083.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libiron-94e197af3c7f7b9d.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libcontent_type-b3fc4f01bc3dcbfb.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libphf-4fc01267f85abb4e.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/liberror-e5e02eafec1ab2f1.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libtypeable-d0d1baca4b0d6107.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libreplace-map-d1de898a4eb569a5.rlib' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-lgenerator-e170cac01c08bdc6' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-lphf_mac-78b8694be35c3487' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgraphviz-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-ltime-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lgetopts-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lflate-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_back-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lsyntax-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lfmt_macros-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-ldebug-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-larena-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lterm-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustc_llvm-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrbml-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lserialize-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-llog-4e7c5e5c' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libplugin-f845a6ab531c9346.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libtypemap-3fdac74be380d9e4.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libunsafe-any-411b26d39a73c121.rlib' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libphantom-da5bb593d3eb3a9e.rlib' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lregex-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lstd-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lsync-4e7c5e5c' '-L' '/home/travis/rust/lib/rustlib/x86_64-unknown-linux-gnu/lib' '-lrustrt-4e7c5e5c' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/deps' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/native/http-b27c1e7938f5a5d0' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/target/native/openssl-fbe75530f7eda428' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello/.rust' '-L' '/home/travis/build/emk/heroku-rust-cargo-hello' '-Wl,--whole-archive' '-Wl,-Bstatic' '-Wl,--no-whole-archive' '-Wl,-Bdynamic' '-lssl' '-lcrypto' '-lrt' '-lpthread' '-lrt' '-ldl' '-lm' '-ldl' '-lpthread' '-lgcc_s' '-lpthread' '-lc' '-lm' '-lcompiler-rt'
note: /home/travis/build/emk/heroku-rust-cargo-hello/target/deps/libgenerator-e170cac01c08bdc6.so: undefined reference to `bn_is_zero'
collect2: ld returned 1 exit status

It looks like @reem is following up at the Rust level, but in case it helps, my toy project is here.

Thank you for the lovely library!

Doesn't build on Windows

Cargo.toml doesn't specify how to obtain the openssl-sys dependency on Windows yet src/lib.rs unconditionally depends on the openssl-sys crate, thereby making rust-openssl unbuildable.

Is it possible to link libssl statically when using cargo?

I cannot figure out how to pass environment variables to openssl-sys's build script when using cargo to manage dependencies. openssl is listed as a dependency in my Cargo.toml.
I tried, at the level of my crate, "OPENSSL_STATIC="" cargo build" but the binary still linked dynamically against libssl.
Is it possible to produce a statically-linked binary without calling rustc directly?

ssl::error::test_uknown_error_should_have_correct_messages is broken

---- ssl::error::test_uknown_error_should_have_correct_messages stdout ----
    task 'ssl::error::test_uknown_error_should_have_correct_messages' failed at 'assertion failed: !buf.is_null()', /home/rustbuild/src/rust-buildbot/slave/nightly-linux/build/src/librustrt/c_str.rs:148

    stack backtrace:
       1:     0x7fd5bbc2f2f0 - rt::backtrace::imp::write::hb1f1803d8941cd7dEAq
       2:     0x7fd5bbc32440 - failure::on_fail::h9fbd63160481d8b76Vq
       3:     0x7fd5bbc41840 - unwind::begin_unwind_inner::h7014ce12ee89c8aeIxd
       4:     0x7fd5bbc413a0 - unwind::begin_unwind_fmt::he4c1486c0bbeb9bfavd
       5:     0x7fd5bbc41360 - rust_begin_unwind
       6:     0x7fd5bbc72890 - failure::fail_fmt::h892d2ccdc9c8098aoqk
       7:     0x7fd5bbc72670 - failure::fail::h12cf1f3b76d231e9snk
       8:     0x7fd5bbc3ee10 - c_str::CString::new::h5987181fa7462b07yXa
       9:     0x7fd5bbb304b0 - ssl::error::get_lib::hde64f42ee1603620yWd
      10:     0x7fd5bbb30880 - ssl::error::test_uknown_error_should_have_correct_messages::h39ff90db5371a58aqXd
      11:     0x7fd5bbbb08e0 - task::TaskBuilder<S>::try_future::closure.8277
      12:     0x7fd5bbbb06d0 - task::TaskBuilder<S>::spawn_internal::closure.8248
      13:     0x7fd5bbb80170 - task::spawn_opts::closure.8455
      14:     0x7fd5bbc423c0 - rust_try_inner
      15:     0x7fd5bbc423b0 - rust_try
      16:     0x7fd5bbc3fb70 - unwind::try::h562b1387da651c61qmd
      17:     0x7fd5bbc3fa10 - task::Task::run::h50cf282b32182c7f4Bc
      18:     0x7fd5bbb7fee0 - task::spawn_opts::closure.8395
      19:     0x7fd5bbc40a30 - thread::thread_start::hbc67389ff8ce258afWc
      20:     0x7fd5bac37250 - start_thread
      21:     0x7fd5ba75f3b9 - clone
      22:                0x0 - <unknown>

Can't compile

Hi,
i'm new in rust programming and i'm trying to use the native lib postgres for rust. But i can't compile this openssl lib.
I used this version http://gnuwin32.sourceforge.net/packages/openssl.htm and the last. Same error in both cases. Is missing some libraries in the make file?

(Windows 7 / msys / mingw 32 bits)

$ make
mkdir -p build
rustc -O --cfg ndebug  --dep-info build/openssl.d --out-dir build lib.rs
←[31merror: ←[0m←[1mlinking with `gcc` failed: exit code: 1
←[0m←[32mnote: ←[0m←[1mgcc arguments: '-m32' '-LC:\Program Files (x86)\Rust\bin\
rustlib\i686-pc-mingw32\lib' '-o' 'build\openssl-06cd96fd-0.0.dll' 'build\openss
l.o' '-lmorestack' 'build\openssl.metadata.o' '-shared-libgcc' '-Wl,--enable-lon
g-section-names' '-LC:\Program Files (x86)\Rust\bin\rustlib\i686-pc-mingw32\lib'
 '-lsync-e32f1ba2-0.11-pre' '-LC:\Program Files (x86)\Rust\bin\rustlib\i686-pc-m
ingw32\lib' '-lstd-aad93cea-0.11-pre' '-LC:\Program Files (x86)\Rust\bin\rustlib
\i686-pc-mingw32\lib' '-llibc-3574b280-0.11-pre' '-LC:\Programming\rust-postgres
\submodules\rust-openssl\.rust' '-LC:\Programming\rust-postgres\submodules\rust-
openssl' '-Wl,-Bdynamic' '-lssl' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lc
rypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-l
crypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-lcrypto' '-Wl,-Bdynamic' '-
lgcc_s' '-shared' '-lcompiler-rt'
←[0m←[32mnote: ←[0m←[1mC:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:
(.text+0xca): undefined reference to `shutdown@8'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0xd4): undefined
 reference to `closesocket@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x1b1): undefine
d reference to `shutdown@8'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x1bb): undefine
d reference to `closesocket@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x231): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x287): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x29b): undefine
d reference to `recv@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x2c9): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x30c): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x324): undefine
d reference to `send@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x359): undefine
d reference to `WSAGetLastError@0'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3ae): undefine
d reference to `WSASetLastError@4'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3be): undefine
d reference to `send@16'
C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o):bss_sock.c:(.text+0x3e9): undefine
d reference to `WSAGetLastError@0'
c:/Programming/MinGw/bin/../lib/gcc/i686-w64-mingw32/4.8.2/../../../../i686-w64-
mingw32/bin/ld.exe: C:/OpenSSL/lib/../lib/libcrypto.a(bss_sock.o): bad reloc add
ress 0x4 in section `.data'
collect2.exe: error: ld returned 1 exit status

←[0m←[31merror: ←[0m←[1maborting due to previous error
←[0mmake: *** [build/openssl-06cd96fd-0.0.dll] Error 101

Regards,

Compile on cygwin ?

When I try to compiled openssl-sys on cygwin I've got this error.

Compiling openssl-sys v0.5.0 (file:///C:/Users/ctjhoa/rust/rust-openssl/openssl-sys)
failed to run custom build command for `openssl-sys v0.5.0 (file:///C:/Users/ctjhoa/rust/rust-openssl/openssl-sys)`
Process didn't exit successfully: `C:\Users\ctjhoa\rust\rust-openssl\openssl-sys\target\build\openssl-sys-4f8c0d5752fc409a\build-script-build.exe` (exit code: 101)
--- stdout
cargo:rustc-flags=-l dylib=eay32 -l dylib=ssl32
TARGET = Some("x86_64-pc-windows-gnu")
CARGO_MANIFEST_DIR = Some("C:\\Users\\ctjhoa\\rust\\rust-openssl\\openssl-sys")
OUT_DIR = Some("C:\\Users\\ctjhoa\\rust\\rust-openssl\\openssl-sys\\target\\build\\openssl-sys-4f8c0d5752fc409a\\out")
TARGET = Some("x86_64-pc-windows-gnu")
OPT_LEVEL = Some("0")
PROFILE = Some("compile")
compile 0
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CFLAGS_x86_64-pc-windows-gnu = None
CFLAGS_x86_64_pc_windows_gnu = None
HOST_CFLAGS = None
CFLAGS = None
TARGET = Some("x86_64-pc-windows-gnu")
HOST = Some("x86_64-pc-windows-gnu")
CC_x86_64-pc-windows-gnu = None
CC_x86_64_pc_windows_gnu = None
HOST_CC = None
CC = None
running: "gcc" "-O0" "-c" "-ffunction-sections" "-fdata-sections" "-mwin32" "-m64" "-fPIC" "C:\Users\ctjhoa\rust\rust-openssl\openssl-sys\src/old_openssl_shim.c" "-o" "C:\Users\ctjhoa\rust\rust-openssl\openssl-sys\target\build\openssl-sys-4f8c0d5752fc409a\out\src\old_openssl_shim.o"
command did not execute successfully, got: exit code: 1

--- stderr
C:\Users\ctjhoa\rust\rust-openssl\openssl-sys\src/old_openssl_shim.c:1:0: warning: -fPIC ignored for target (all code is position independent) [enabled by default]
 #include <openssl/hmac.h>
 ^
C:\Users\ctjhoa\rust\rust-openssl\openssl-sys\src/old_openssl_shim.c:1:26: fatal error: openssl/hmac.h: No such file or directory
 #include <openssl/hmac.h>
                          ^
compilation terminated.

I think it is related to the note on windows compilation in README.
I have openssl package install on cygwin of course.

So I've got a couple of questions (I'm not a system developper so don't blame me if I'm wrong)

  • At openssl-sys compilation you shouldn't be able to detect cygwin and act like linux because I think that the goal of cygwin is to act like a linux no ?
  • I tried to find lib in the cygwin tree with no luck. Have you got an idea where to find those ?

Thanks

OSX build fails: "/old_openssl_shim.c:39:12: error: returning 'void' from a function with incompatible result type 'int'"

Doing some digging revealed that Xcode headers* have a different function return type than openssl installed by brew**.

A dirty fix is just to change the function return types in old_openssl_shim.c (i.e. https://gist.github.com/Adenilson/a60a1a2a5415e7929e6b) but for sure it will case problems if there is a failure.

Inspecting the stdout flags used by cargo reveals that the CFLAGS variable is empty***, but running 'pkg-config --cflags openssl' returns the right include dirs (e.g. -I/opt/local/include).

As a test, I was able to compile the file by hand running:
gcc -c -I/opt/local/include -ffunction-sections -fdata-sections -m64 -fPIC /Users/a.cavalcanti/apps/servo/openssl/openssl-sys/src/old_openssl_shim.c -o /Users/a.cavalcanti/apps/servo/openssl/openssl/target/build/openssl-sys-8534a153cdebdd74/out/src/old_openssl_shim.o

I'm unfamiliar how cargo calls pkg-config while building something, but maybe it is being invoked with some missing environment flags? (e.g. PKG_CONFIG_PATH, etc).

I know rust-openssl doesn't officially supports OSX, but we use it in Servo (that supports OSX). I would like to hear some feedback on what you think about the subject and what you feel would be the right fix?

Regards

Savago

  • located at: /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/openssl/hmac.

** located at:
/opt/local/include/openssl/hmac.h

*** flags:

a.cavalcanti ~/apps/servo/openssl/openssl $ cargo build
Compiling openssl-sys v0.3.6 (file:///Users/a.cavalcanti/apps/servo/openssl/openssl)
failed to run custom build command for openssl-sys v0.3.6 (file:///Users/a.cavalcanti/apps/servo/openssl/openssl)
Process didn't exit successfully: /Users/a.cavalcanti/apps/servo/openssl/openssl/target/build/openssl-sys-8534a153cdebdd74/build-script-build (status=101)
--- stdout
cargo:rustc-flags=-L native=/opt/local/lib
cargo:rustc-flags=-l ssl
cargo:rustc-flags=-l crypto
TARGET = Some("x86_64-apple-darwin")
OPT_LEVEL = Some("0")
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CC_x86_64-apple-darwin = None
CC_x86_64_apple_darwin = None
HOST_CC = None
CC = None
TARGET = Some("x86_64-apple-darwin")
HOST = Some("x86_64-apple-darwin")
CFLAGS_x86_64-apple-darwin = None
CFLAGS_x86_64_apple_darwin = None
HOST_CFLAGS = None
CFLAGS = None
CARGO_MANIFEST_DIR = Some("/Users/a.cavalcanti/apps/servo/openssl/openssl-sys")
OUT_DIR = Some("/Users/a.cavalcanti/apps/servo/openssl/openssl/target/build/openssl-sys-8534a153cdebdd74/out")
running: "cc" '"-O0"' '"-c"' '"-ffunction-sections"' '"-fdata-sections"' '"-m64"' '"-fPIC"' '"/Users/a.cavalcanti/apps/servo/openssl/openssl-sys/src/old_openssl_shim.c"' '"-o"' '"/Users/a.cavalcanti/apps/servo/openssl/openssl/target/build/openssl-sys-8534a153cdebdd74/out/src/old_openssl_shim.o"'

Doesn't build with nightly

Error is in src/ssl/error.rs:

error: the trait core::fmt::String is not implemented for the type ssl::error::SslError [E0277]

Rare double free on OSX

I see this very occasionally, and only on OSX.

#0  0x00007fff8bc4f866 in __pthread_kill ()
#1  0x00007fff8ad1335c in pthread_kill ()
#2  0x00007fff8a6b6b1a in abort ()
#3  0x00007fff85cf707f in free ()
#4  0x00007fff8c422785 in CRYPTO_free ()
#5  0x00007fff8c476e3d in ERR_get_state ()
#6  0x00007fff8c456efc in ERR_clear_error ()
#7  0x00007fff8a254305 in ssl3_connect ()
#8  0x000000010703c315 in ssl::Ssl::connect::h4efbf217fc545c3bOOa ()
#9  0x0000000106ef01c1 in ssl::SslStream$LT$S$GT$::try_new::closure.14973 ()
#10 0x0000000106eef624 in ssl::SslStream$LT$S$GT$::in_retry_wrapper::h12999514499880975226 ()
#11 0x0000000106eef176 in ssl::SslStream$LT$S$GT$::try_new::h6687477312414663712 ()
#12 0x0000000106ee8119 in io::initialize_stream::hd6487f05fd66b6f2t5e ()
#13 0x0000000106da7e76 in InnerPostgresConnection::connect::h10561767229896696499 ()
#14 0x0000000106da231f in PostgresConnection::connect::h3426735992348837256 ()
#15 0x0000000106e92fe0 in test_require_ssl_conn::haeea3e609318a4fbyom ()
#16 0x0000000106fdb71b in task::TaskBuilder$LT$S$GT$::try_future::closure.8282 ()
#17 0x0000000106fdb625 in task::TaskBuilder$LT$S$GT$::spawn_internal::closure.8259 ()
#18 0x0000000106ecb0ec in task::spawn_opts::closure.8403 ()
#19 0x0000000107088a2c in rust_try ()
#20 0x000000010708587b in task::Task::run::h62b62082011af65de2c ()
#21 0x0000000106ecaf4a in task::spawn_opts::closure.8345 ()
#22 0x0000000107086e66 in thread::thread_start::h55c901263d44eb98oqd ()
#23 0x00007fff8ad12899 in _pthread_body ()
#24 0x00007fff8ad1272a in _pthread_start ()
#25 0x00007fff8ad16fc9 in thread_start ()

Compilation Failure on Arch Linux

Attempting to compile on Arch Linux with cargo build --verbose results in:

   Compiling openssl v0.0.0 (file:///old_media/projects/rust/rust-openssl)
     Running `rustc src/lib.rs --crate-name openssl --crate-type lib -g -C metadata=4d6dc7134d9336ad -C extra-filename=-4d6dc7134d9336ad --out-dir /old_media/projects/rust/rust-openssl/target --dep-info /old_media/projects/rust/rust-openssl/target/.fingerprint/openssl-4d6dc7134d9336ad/dep-lib-openssl -L /old_media/projects/rust/rust-openssl/target -L /old_media/projects/rust/rust-openssl/target/deps`
src/ssl/mod.rs:135:19: 135:32 error: unresolved name `ptr::null_mut`.
src/ssl/mod.rs:135         if ctx == ptr::null_mut() {
                                     ^~~~~~~~~~~~~
src/ssl/mod.rs:299:19: 299:32 error: unresolved name `ptr::null_mut`.
src/ssl/mod.rs:299         if ssl == ptr::null_mut() {
                                     ^~~~~~~~~~~~~
src/ssl/mod.rs:305:20: 305:33 error: unresolved name `ptr::null_mut`.
src/ssl/mod.rs:305         if rbio == ptr::null_mut() {
                                      ^~~~~~~~~~~~~
src/ssl/mod.rs:310:20: 310:33 error: unresolved name `ptr::null_mut`.
src/ssl/mod.rs:310         if wbio == ptr::null_mut() {
                                      ^~~~~~~~~~~~~
src/crypto/hash.rs:99:57: 99:70 error: unresolved name `ptr::null_mut`.
src/crypto/hash.rs:99             EVP_DigestFinal(self.ctx, res.as_mut_ptr(), ptr::null_mut());
                                                                              ^~~~~~~~~~~~~
src/crypto/pkey.rs:110:23: 110:36 error: unresolved name `ptr::null_mut`.
src/crypto/pkey.rs:110             let rsa = ptr::null_mut();
                                             ^~~~~~~~~~~~~
error: aborting due to 6 previous errors
Could not compile `openssl`.

Caused by:
  Process didn't exit successfully: `rustc src/lib.rs --crate-name openssl --crate-type lib -g -C metadata=4d6dc7134d9336ad -C extra-filename=-4d6dc7134d9336ad --out-dir /old_media/projects/rust/rust-openssl/target --dep-info /old_media/projects/rust/rust-openssl/target/.fingerprint/openssl-4d6dc7134d9336ad/dep-lib-openssl -L /old_media/projects/rust/rust-openssl/target -L /old_media/projects/rust/rust-openssl/target/deps` (status=101)

rustc -v:

rustc 0.12.0-pre (ceb9bbfbf 2014-09-16 21:36:08 +0000)

cargo -V:

cargo 0.0.1-pre (168bcab 2014-09-17 00:28:36 +0000)

uname -a:

Linux helium 3.16.2-1-ARCH #1 SMP PREEMPT Sat Sep 6 13:12:51 CEST 2014 x86_64 GNU/Linux

OpenSSL version:

OpenSSL 1.0.1i 6 Aug 2014

Doesn't build on Android

Fails with something like this

note: /home/servo/ndk-toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lssl
/home/servo/ndk-toolchain/bin/../lib/gcc/arm-linux-androideabi/4.6/../../../../arm-linux-androideabi/bin/ld: error: cannot find -lcrypto

Would it be possible to compile libssl and libcrypto in build.rs for android-based targets?

AES-128-ECB decryption returns empty vector

Test case:

extern crate openssl;
extern crate serialize;
use openssl::crypto::symm::{AES_128_ECB, Crypter, Encrypt, Decrypt};
use serialize::hex::ToHex;

fn main() {
  let plaintext = "AAAAAAAAAAAAAAAA".as_bytes();
  let key = "BBBBBBBBBBBBBBBB".as_bytes();

  let encrypter = Crypter::new(AES_128_ECB);
  encrypter.pad(false);
  encrypter.init(Encrypt, key.as_slice(), Vec::from_elem(16,0));

  let ciphertext = encrypter.update(plaintext.as_slice());

  let decrypter = Crypter::new(AES_128_ECB);
  decrypter.pad(false);
  decrypter.init(Decrypt, key.as_slice(), Vec::from_elem(16,0));

  let decrypted = decrypter.update(ciphertext.as_slice());

  println!("{:s}", plaintext.as_slice().to_hex());
  println!("{:s}", ciphertext.as_slice().to_hex());
  println!("{:s}", decrypted.as_slice().to_hex());

  println!("{:u}", plaintext.len());
  println!("{:u}", ciphertext.len());
  println!("{:u}", decrypted.len());
}

What I would expect:

41414141414141414141414141414141
1266733444730cb9c584a2e9bf3f7352
41414141414141414141414141414141
16
16
16

What I get:

41414141414141414141414141414141
1266733444730cb9c584a2e9bf3f7352

16
16
0

I've repeated the same process using Ruby's OpenSSL wrapper and I get the correct result, so I don't think the problem is with my version of OpenSSL (although I could be wrong).

My Rust build:
rustc 0.12.0-pre-nightly (82c052794 2014-09-05 17:36:25 +0000)
I'm using the latest rust-openssl (e7e6ef5d at the time of writing)

Switch Ssl Stream to new IO

No rush, just wish to track as it blocks hyper from updating as well.

(or I guess I could make newtype wrappers and unblock myself...)

Building as dependency fails because of multiple candidates

On my Arch Linux box, trying to build using Cargo, setting openssl as a dependency, I always get this kind of errors:

   Compiling openssl-sys v0.0.2
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1:1: 1:1 error: multiple dylib candidates for `std` found
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1 #![allow(non_camel_case_types, non_upper_case_globals, no
n_snake_case)]
                                                                                     ^
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1:1: 1:1 note: candidate #1: /usr/lib/rustlib/x86_64-unknow
n-linux-gnu/lib/libstd-4e7c5e5c.so
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1 #![allow(non_camel_case_types, non_upper_case_globals, no
n_snake_case)]
                                                                                     ^
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1:1: 1:1 note: candidate #2: /usr/lib/libstd-4e7c5e5c.so
/home/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-sys-0.0.2/src/lib.rs:1 #![allow(non_camel_case_types, non_upper_case_globals, no
n_snake_case)]
                                                                                     ^

I omitted similar errors for sync and rustrt. I do not see any of these errors for any other dependency.

Rust version:

cargo 0.0.1-pre-nightly (1bdfb25 2014-11-20 19:29:22 +0000)

rustc 0.13.0-nightly (2274996a1 2014-11-23 00:36:43 +0000)
binary: rustc
commit-hash: 2274996a1d1092d513ac5df74524b30cb8928961
commit-date: 2014-11-23 00:36:43 +0000
host: x86_64-unknown-linux-gnu
release: 0.13.0-nightly

Uname:

Linux archbook 3.17.3-1-ARCH #1 SMP PREEMPT Fri Nov 14 23:13:48 CET 2014 x86_64 GNU/Linux

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.