GithubHelp home page GithubHelp logo

mesalock-linux / mesalink Goto Github PK

View Code? Open in Web Editor NEW
1.5K 1.5K 67.0 3.48 MB

OpenSSL compatibility layer for the Rust SSL/TLS stack

Home Page: https://mesalink.io

License: Other

Makefile 0.31% Shell 0.80% Rust 75.94% M4 8.17% C 9.26% C++ 0.07% CMake 5.45%
rust tls

mesalink's Introduction

An OpenSSL compatibility layer for the Rust SSL/TLS stack.

Build Status Build Status Coverage Status Documentation Status Release License

MesaLink is an OpenSSL compatibility layer for the Rust SSL/TLS stack, namely rustls, webpki, and ring.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Release history

  • 1.0.0/0.10.0 (Apr 2, 2019)
    • CMake support; see the updated CROSS_COMPILE.md for cross-compilation instructions
    • Windows builds (MSVC and MinGW)
    • CI/CD migrated to Azure Pipelines
    • NSIS installer for Win64 available
    • Mutex/RwLock from parking_lot
    • Session caches with hashbrown
    • Optional jemalloc memory allocator with jemallocator
    • Renovated website
  • 0.8.0 (Jan 25, 2019)
    • 40 new OpenSSL APIs, covering BIO, EVP_PKEY, PEM and X509
    • SSL_CTX and SSL are thread-safe
    • Configurable session cache
    • SHA1 signatures discontinued
    • Tested with rust-san memory and leak sanitizers
    • Rust 2018 edition
    • Based on rustls 0.15, webpki 0.19, and *ring* 0.14
    • TLS backend for curl since 7.62.0
    • TLS backend for brpc, an industrial-grade RPC framework; see the patches directory
    • Experimental SGX Remote Attestation for Untrusted Enclaves (see SGX_README.md)

See OLD_CHANGES.md for further change history.

Supported ciphersuites

  • TLS13-CHACHA20-POLY1305-SHA256
  • TLS13-AES-256-GCM-SHA384
  • TLS13-AES-128-GCM_SHA256
  • TLS-ECDHE-ECDSA-WITH-CHACHA20-POLY1305-SHA256
  • TLS-ECDHE-RSA-WITH-CHACHA20-POLY1305-SHA256
  • TLS-ECDHE-ECDSA-WITH-AES-256-GCM-SHA384
  • TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
  • TLS-ECDHE-RSA-WITH-AES-256-GCM-SHA384
  • TLS-ECDHE-RSA-WITH-AES-128-GCM-SHA256

Building instructions for Autotools

$ sudo apt-get install m4 autoconf automake libtool make gcc curl
$ curl https://sh.rustup.rs -sSf | sh

$ git clone https://github.com/mesalock-linux/mesalink.git
$ ./autogen.sh --enable-examples
$ make

Building instructions for CMake

$ sudo apt-get install cmake make gcc curl
$ curl https://sh.rustup.rs -sSf | sh

$ git clone https://github.com/mesalock-linux/mesalink.git
$ mkdir build && cd build
$ cmake ..
$ cmake --build .

Examples

MesaLink comes with two examples that demonstrate a TLS client and a TLS server. Both of them are located at examples/.

The client example connects to a remote HTTPS server and prints the server's response.

$ ./examples/client/client api.ipify.org
[+] Negotiated ciphersuite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, enc_length=16, version=TLS1.2
[+] Subject name: /OU=Domain Control Validated/OU=PositiveSSL Wildcard/CN=*.ipify.org
[+] Subject alternative names:*.ipify.org ipify.org
[+] Sent 85 bytes

GET / HTTP/1.0
Host: api.ipify.org
Connection: close
Accept-Encoding: identity


HTTP/1.1 200 OK
Server: Cowboy
Connection: close
Content-Type: text/plain
Vary: Origin
Date: Thu, 09 Aug 2018 21:44:35 GMT
Content-Length: 10
Via: 1.1 vegur

1.2.3.4
[+] TLS protocol version: TLS1.2

[+] Received 177 bytes

The server example comes with a pair of certificate and private key. The certificate file is in the PEM format and contains a chain of certificates from the server's certificate to the root CA certificate. The private key file contains a PKCS8-encoded private key in the PEM format. Once the server is up and running, open https://127.0.0.1:8443 and expect to see the hello message.

$ ./examples/server/server
Usage: ./examples/server/server <portnum> <cert_file> <private_key_file>
$ cd examples/server/server
$ ./server 8443 certificates private_key
[+] Listening at 0.0.0.0:8443
[+] Negotiated ciphersuite: TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256, enc_length=16, version=TLS1.2
[+] Received:
GET / HTTP/1.1
Host: 127.0.0.1:8443
Connection: keep-alive
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_2) AppleWebKit/537.36
(KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36
Upgrade-Insecure-Requests: 1
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng
Accept-Encoding: gzip, deflate, br
Accept-Language: en-US,en;q=0.9

Unit tests

MesaLink uses cargo for unit tests. Simply run cargo test.

$ cargo test

BoringSSL SSL tests

BoGo is BoringSSL's protocol level test suite. We have ported BoGo for testing the functionality and compatibility of MesaLink. To run BoGo test cases, run the following:

$ cd bogo && ./runme

Maintainer

License

MesaLink is provided under the 3-Clause BSD license. For a copy, see the LICENSE file.

mesalink's People

Contributors

376temp avatar dingelish avatar iria1 avatar sagebind avatar ymjing 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  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

mesalink's Issues

Website broken

mesalink.io is associated to the project in google search and social media as a website associated to the project. Invalid certificate when visiting, and appears to be hosted on Netlify? Ignoring the security warning, results in a "Not Found" response/content.

Potential uninitialized memory access in `mesalink_BIO_new_mem_buf`

Hi, I found that the function mesalink_BIO_new_mem_buf might incorrectly assume buf_ptr points to any type that has non-zero length (all the example cases also show the assumption); however, it ignores the case that buf_ptr could also point to struct type.

pub extern "C" fn mesalink_BIO_new_mem_buf<'a>(
buf_ptr: *mut c_void,
len: c_int,
) -> *mut MESALINK_BIO<'a> {
if buf_ptr.is_null() {
return ptr::null_mut();
}
let buflen = if len < 0 {
unsafe { libc::strlen(buf_ptr as *const c_char) }
} else {
len as usize
};
let buf_ptr = buf_ptr as *mut u8;
let buf = unsafe { slice::from_raw_parts_mut(buf_ptr, buflen) };

Even in C, the struct could also contain padding bytes, which means the slice created at line 733 might point to uninitialized padding bytes. We consider that the function could add pre-condition check to make sure buf_ptr is kind of plain old data.

Test suite failures in network-restricted environments

Under Gentoo's build tooling, network IO can be inhibited/restricted, because its generally viewed dimly that any build-time process can "phone home".

Its also in general bad practice to rely on the availability of network IO, because it makes assertions about your expectations about the build environment ( eg: it could be running on a firewalled / airgapped host ).

The recommendation is to first ascertain if network IO in the general sense can be expected to work, before executing tests that inherently require it to give valid output.

test libssl::ssl::tests::dummy_openssl_compatible_apis_always_return_success ... ok
test libssl::ssl::tests::get_ssl_fd ... FAILED
test libssl::ssl::tests::get_and_set_ssl_ctx ... ok
test libssl::ssl::tests::invalid_private_key ... ok
test libssl::ssl::tests::legacy_tls_versions_not_supported ... ok
test libssl::ssl::tests::load_verify_locations ... ok
test libssl::ssl::tests::mesalink_ssl_ctx_session_cache_mode_and_size ... ok
test libssl::ssl::tests::mesalink_ssl_set_good_host_name ... ok
test libssl::ssl::tests::mesalink_ssl_set_invalid_host_name ... ok
test libssl::ssl::tests::mesalink_ssl_set_null_host_name ... ok
test libssl::ssl::tests::private_key_not_found ... ok
test libssl::ssl::tests::ssl_ctx_is_not_null ... ok
test libssl::ssl::tests::invalid_certificate ... ok
test libssl::ssl::tests::ssl_ctx_is_thread_safe ... ok
test libssl::ssl::tests::ssl_ctx_load_certificate_and_private_key_asn1 ... ok
test libssl::ssl::tests::ssl_io_on_bad_file_descriptor ... ok
test libssl::ssl::tests::ssl_is_not_null ... ok
test libssl::ssl::tests::ssl_is_thread_safe ... ok
test libssl::ssl::tests::ssl_load_certificate_and_private_key_asn1 ... ok
test libssl::ssl::tests::supported_tls_versions ... ok
test libssl::ssl::tests::test_io_before_full_handshake ... ok
test libssl::ssl::tests::test_null_pointers_as_arguments ... ok
test libssl::ssl::tests::verify_certificate_and_key ... ok
test libssl::ssl::tests::verify_key_and_certificate_1 ... ok
test libssl::ssl::tests::verify_key_and_certificate_2 ... ok
test libssl::x509::tests::x509_null_pointer ... ok
test libssl::ssl::tests::ssl_on_nonblocking_socket ... FAILED
test libssl::ssl::tests::early_data_to_mesalink_io ... FAILED
test libssl::ssl::tests::cross_version_tests ... ok

failures:
---- libssl::ssl::tests::get_ssl_fd stdout ----
thread 'libssl::ssl::tests::get_ssl_fd' panicked at 'Connect error: Os { code: 101, kind: Other, message: "Network is unreachable" }', src/libcore/result.rs:1084:5
stack backtrace:
   0:     0x55813a931de1 - std::sys_common::backtrace::print::hba9498aea52b0a4c
   1:     0x55813a936a12 - std::panicking::default_hook::{{closure}}::h28904950cd69f5ae
   2:     0x55813a93675c - std::panicking::default_hook::h37de51f3afebd886
   3:     0x55813a9370fd - std::panicking::rust_panic_with_hook::hc888d5b8ee53f3c2
   4:     0x55813a936c92 - std::panicking::continue_panic_fmt::h4994c8523413f426
   5:     0x55813a936b76 - rust_begin_unwind
   6:     0x55813a947f7d - core::panicking::panic_fmt::h0f33ccf7fc2a1201
   7:     0x55813a94b627 - core::result::unwrap_failed::h5f2f3948a0c719bd
   8:     0x55813a82d4eb - core::result::Result<T,E>::expect::h6e0dc25503701241
                               at /var/tmp/portage/dev-lang/rust-1.38.0/work/rustc-1.38.0-src/src/libcore/result.rs:879
   9:     0x55813a82d4eb - mesalink::libssl::ssl::tests::get_ssl_fd::h0c0f21d37a37c246
                               at src/libssl/ssl.rs:3381
  10:     0x55813a853c2f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h8e266f4baa94b6a7
  11:     0x55813a93794a - __rust_maybe_catch_panic
  12:     0x55813a85f26d - std::sys_common::backtrace::__rust_begin_short_backtrace::h7eec479e3b313f58
  13:     0x55813a8605b5 - std::panicking::try::do_call::h9921ee074f4070c3
  14:     0x55813a93794a - __rust_maybe_catch_panic
  15:     0x55813a865cd2 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf525dbe56a508edf
  16:     0x55813a93451f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h4c1084bf7672115a
  17:     0x55813a9377a0 - std::sys::unix::thread::Thread::new::thread_start::h9505cc4fd13f1815
  18:     0x7f36abd683a7 - start_thread
                               at /var/tmp/portage/sys-libs/glibc-2.29-r5/work/glibc-2.29/nptl/pthread_create.c:486
  19:     0x7f36abc7d0ff - __clone
  20:                0x0 - <unknown>

---- libssl::ssl::tests::early_data_to_mesalink_io stdout ----
thread 'libssl::ssl::tests::early_data_to_mesalink_io' panicked at 'Failed to connect: Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" }', src/libcore/result.rs:1084:5
stack backtrace:
   0:     0x55813a931de1 - std::sys_common::backtrace::print::hba9498aea52b0a4c
   1:     0x55813a936a12 - std::panicking::default_hook::{{closure}}::h28904950cd69f5ae
   2:     0x55813a93675c - std::panicking::default_hook::h37de51f3afebd886
   3:     0x55813a9370fd - std::panicking::rust_panic_with_hook::hc888d5b8ee53f3c2
   4:     0x55813a936c92 - std::panicking::continue_panic_fmt::h4994c8523413f426
   5:     0x55813a936b76 - rust_begin_unwind
   6:     0x55813a947f7d - core::panicking::panic_fmt::h0f33ccf7fc2a1201
   7:     0x55813a94b627 - core::result::unwrap_failed::h5f2f3948a0c719bd
   8:     0x55813a82eead - core::result::Result<T,E>::expect::h6e0dc25503701241
                               at /var/tmp/portage/dev-lang/rust-1.38.0/work/rustc-1.38.0-src/src/libcore/result.rs:879
   9:     0x55813a82eead - mesalink::libssl::ssl::tests::early_data_to_mesalink_io::h348b7703c02fa9aa
                               at src/libssl/ssl.rs:3550
  10:     0x55813a853c2f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h8e266f4baa94b6a7
  11:     0x55813a93794a - __rust_maybe_catch_panic
  12:     0x55813a85f26d - std::sys_common::backtrace::__rust_begin_short_backtrace::h7eec479e3b313f58
  13:     0x55813a8605b5 - std::panicking::try::do_call::h9921ee074f4070c3
  14:     0x55813a93794a - __rust_maybe_catch_panic
  15:     0x55813a865cd2 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf525dbe56a508edf
  16:     0x55813a93451f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h4c1084bf7672115a
  17:     0x55813a9377a0 - std::sys::unix::thread::Thread::new::thread_start::h9505cc4fd13f1815
  18:     0x7f36abd683a7 - start_thread
                               at /var/tmp/portage/sys-libs/glibc-2.29-r5/work/glibc-2.29/nptl/pthread_create.c:486
  19:     0x7f36abc7d0ff - __clone
  20:                0x0 - <unknown>

---- libssl::ssl::tests::ssl_on_nonblocking_socket stdout ----
thread 'libssl::ssl::tests::ssl_on_nonblocking_socket' panicked at 'Conenction failed: Custom { kind: Other, error: "failed to lookup address information: Temporary failure in name resolution" }', src/libcore/result.rs:1084:5
stack backtrace:
   0:     0x55813a931de1 - std::sys_common::backtrace::print::hba9498aea52b0a4c
   1:     0x55813a936a12 - std::panicking::default_hook::{{closure}}::h28904950cd69f5ae
   2:     0x55813a93675c - std::panicking::default_hook::h37de51f3afebd886
   3:     0x55813a9370fd - std::panicking::rust_panic_with_hook::hc888d5b8ee53f3c2
   4:     0x55813a936c92 - std::panicking::continue_panic_fmt::h4994c8523413f426
   5:     0x55813a936b76 - rust_begin_unwind
   6:     0x55813a947f7d - core::panicking::panic_fmt::h0f33ccf7fc2a1201
   7:     0x55813a94b627 - core::result::unwrap_failed::h5f2f3948a0c719bd
   8:     0x55813a82ba26 - core::result::Result<T,E>::expect::h6e0dc25503701241
                               at /var/tmp/portage/dev-lang/rust-1.38.0/work/rustc-1.38.0-src/src/libcore/result.rs:879
   9:     0x55813a82ba26 - mesalink::libssl::ssl::tests::ssl_on_nonblocking_socket::h1483b5459a0c207e
                               at src/libssl/ssl.rs:3037
  10:     0x55813a853c2f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h8e266f4baa94b6a7
  11:     0x55813a93794a - __rust_maybe_catch_panic
  12:     0x55813a85f26d - std::sys_common::backtrace::__rust_begin_short_backtrace::h7eec479e3b313f58
  13:     0x55813a8605b5 - std::panicking::try::do_call::h9921ee074f4070c3
  14:     0x55813a93794a - __rust_maybe_catch_panic
  15:     0x55813a865cd2 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hf525dbe56a508edf
  16:     0x55813a93451f - <alloc::boxed::Box<F> as core::ops::function::FnOnce<A>>::call_once::h4c1084bf7672115a
  17:     0x55813a9377a0 - std::sys::unix::thread::Thread::new::thread_start::h9505cc4fd13f1815
  18:     0x7f36abd683a7 - start_thread
                               at /var/tmp/portage/sys-libs/glibc-2.29-r5/work/glibc-2.29/nptl/pthread_create.c:486
  19:     0x7f36abc7d0ff - __clone
  20:                0x0 - <unknown>


failures:
    libssl::ssl::tests::early_data_to_mesalink_io
    libssl::ssl::tests::get_ssl_fd
    libssl::ssl::tests::ssl_on_nonblocking_socket

test result: FAILED. 61 passed; 3 failed; 0 ignored; 0 measured; 0 filtered out

Bump rustls to 0.20.0

Bump rustls to 0.20.0, as well as ring and webpki.
I'm wondering that GitHub Dependabot might be very helpful in updating these dependencies. Sadly I failed to file a PR for this as I have mere experience in rust :-(

Mesalink interface deviates from OpenSSL (SSL_CTX_use_certificate_chain_file, SSL_CTX_use_certificate_file)

Mesalink doesn't provide an equivalent interface to SSL_CTX_use_certificate_file.
Furthermore, the function mesalink_SSL_CTX_use_certificate_chain_file takes these arguments:

  • MESALINK_CTX *
  • const char *
  • int

Whereas the analogous OpenSSL function SSL_CTX_use_certificate_chain_file only takes two arguments:

  • SSL_CTX *ctx
  • const char *file

See the OpenSSL docs: https://www.openssl.org/docs/man1.0.2/man3/SSL_CTX_use_certificate_chain_file.html

连接smtps要时出错

连接smtps时出现
error:[0x3000907]:[mesalink]:[src/libssl/ssl.rs:344]:[TLSErrorAlertReceivedHandshakeFailure]

I have a problem for help.

In the examples directionary, there is a client program. When I compile the client program, the follows result is shown:
tim 20180411161005
I don't know the reason, can you give me some help? Thank you very much!

Problem with cmake rust detection

-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Cargo Home: /home/chaz/.cargo
-- Rust Compiler Version: rustc 1.33.0
CMake Error at CMakeLists.txt:26 (message):
  Rust is too old, please install at least 1.31 to support the Rust 2018
  edition

The host is running linux 3.10.0-957.5.1.el7.x86_64.

ALPN and SNI support

Are ALPN and SNI still supported? I noticed that they were removed from the "Feature Highlights" list, and HTTP/2 over TLS doesn't work when using mesalink with isahc + curl-rust.

[rustls] simplify feature selection for rustls

I am opening this issue here, since has no option to open issues in the mesalock-linux/rustls repository.

Looking at the first commit on the rustls fork that adds feature flags (currently fed32702b8d7afaec1271ef8494188d4f8ae688b), I can see there are some areas that can be simplified, and the feature selection can be performed with less code and more clearly.

As an example, in impl SupportedGroups for NamedGroups, there can be a single supported method, and each item in the vector can be conditioned directly on the related feature, which would make it much easier to see exactly what NamedGroups are included for which feature.

I would like to open a PR with these simplifications, and I would like to ask how do you think this should be handled: would you apply commits on top of the mesalink branch of the rustls fork, or would you apply it directly op top of fed32702b8d7afaec1271ef8494188d4f8ae688b and rebase on top of that ?

Examples don't compile on Windows with MSVC

InitializeBuildStatus:
  Touching "client.dir\Release\client.tlog\unsuccessfulbuild".
CustomBuild:
  All outputs are up-to-date.
VcpkgTripletSelection:
  Using triplet "x64-windows" from "C:\Users\User\vcpkg\installed\x64-windows\"
ClCompile:
  All outputs are up-to-date.
Link:
  C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.exe /ERR
  ORREPORT:QUEUE /OUT:"C:\Users\User\Source\Repos\mesalink\build\Release\client.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:"
  C:\Users\User\vcpkg\installed\x64-windows\lib" /LIBPATH:"C:\Users\User\vcpkg\installed\x64-windows\lib\manual-link" "
  mesalink-NOTFOUND" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg3
  2.lib advapi32.lib "C:\Users\User\vcpkg\installed\x64-windows\lib\*.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' ui
  Access='false'" /manifest:embed /PDB:"C:/Users/User/Source/Repos/mesalink/build/Release/client.pdb" /SUBSYSTEM:CONSOL
  E /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/User/Source/Repos/mesalink/build/Release/client.lib" /MACHINE:X64
    /machine:x64 client.dir\Release\client.obj
LINK : fatal error LNK1181: cannot open input file 'mesalink-NOTFOUND.obj' [C:\Users\User\Source\Repos\mesalink\build\c
lient.vcxproj]
Done Building Project "C:\Users\User\Source\Repos\mesalink\build\client.vcxproj" (default targets) -- FAILED.

Done Building Project "C:\Users\User\Source\Repos\mesalink\build\ALL_BUILD.vcxproj" (default targets) -- FAILED.


Build FAILED.

"C:\Users\User\Source\Repos\mesalink\build\ALL_BUILD.vcxproj" (default target) (1) ->
"C:\Users\User\Source\Repos\mesalink\build\client.vcxproj" (default target) (3) ->
(Link target) ->
  LINK : fatal error LNK1181: cannot open input file 'mesalink-NOTFOUND.obj' [C:\Users\User\Source\Repos\mesalink\build
\client.vcxproj]

    0 Warning(s)
    1 Error(s)

compiling with
cmake ../ -DCMAKE_BUILD_TYPE=Release
cmake --build . --config Release

CMakeCache:


########################
# EXTERNAL cache entries
########################

//Path to a program.
CARGO_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/cargo.exe

//Rust Cargo Home
CARGO_HOME:PATH=C:/Users/User/.cargo

//No help, variable specified on the command line.
CMAKE_BUILD_TYPE:UNINITIALIZED=Release

//Semicolon separated list of supported configuration types, only
// supports Debug, Release, MinSizeRel, and RelWithDebInfo, anything
// else will be ignored.
CMAKE_CONFIGURATION_TYPES:STRING=Debug;Release;MinSizeRel;RelWithDebInfo

//Flags used by the CXX compiler during all build types.
CMAKE_CXX_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3 /GR /EHsc

//Flags used by the CXX compiler during DEBUG builds.
CMAKE_CXX_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1

//Flags used by the CXX compiler during MINSIZEREL builds.
CMAKE_CXX_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG

//Flags used by the CXX compiler during RELEASE builds.
CMAKE_CXX_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG

//Flags used by the CXX compiler during RELWITHDEBINFO builds.
CMAKE_CXX_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG

//Libraries linked by default with all C++ applications.
CMAKE_CXX_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

//Flags used by the C compiler during all build types.
CMAKE_C_FLAGS:STRING=/DWIN32 /D_WINDOWS /W3

//Flags used by the C compiler during DEBUG builds.
CMAKE_C_FLAGS_DEBUG:STRING=/MDd /Zi /Ob0 /Od /RTC1

//Flags used by the C compiler during MINSIZEREL builds.
CMAKE_C_FLAGS_MINSIZEREL:STRING=/MD /O1 /Ob1 /DNDEBUG

//Flags used by the C compiler during RELEASE builds.
CMAKE_C_FLAGS_RELEASE:STRING=/MD /O2 /Ob2 /DNDEBUG

//Flags used by the C compiler during RELWITHDEBINFO builds.
CMAKE_C_FLAGS_RELWITHDEBINFO:STRING=/MD /Zi /O2 /Ob1 /DNDEBUG

//Libraries linked by default with all C applications.
CMAKE_C_STANDARD_LIBRARIES:STRING=kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg32.lib advapi32.lib

//Flags used by the linker during all build types.
CMAKE_EXE_LINKER_FLAGS:STRING=/machine:x64

//Flags used by the linker during DEBUG builds.
CMAKE_EXE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

//Flags used by the linker during MINSIZEREL builds.
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

//Flags used by the linker during RELEASE builds.
CMAKE_EXE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

//Flags used by the linker during RELWITHDEBINFO builds.
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

//User executables (bin)
CMAKE_INSTALL_BINDIR:PATH=bin

//Read-only architecture-independent data (DATAROOTDIR)
CMAKE_INSTALL_DATADIR:PATH=

//Read-only architecture-independent data root (share)
CMAKE_INSTALL_DATAROOTDIR:PATH=share

//Documentation root (DATAROOTDIR/doc/PROJECT_NAME)
CMAKE_INSTALL_DOCDIR:PATH=

//C header files (include)
CMAKE_INSTALL_INCLUDEDIR:PATH=include

//Info documentation (DATAROOTDIR/info)
CMAKE_INSTALL_INFODIR:PATH=

//Object code libraries (lib)
CMAKE_INSTALL_LIBDIR:PATH=lib

//Program executables (libexec)
CMAKE_INSTALL_LIBEXECDIR:PATH=libexec

//Locale-dependent data (DATAROOTDIR/locale)
CMAKE_INSTALL_LOCALEDIR:PATH=

//Modifiable single-machine data (var)
CMAKE_INSTALL_LOCALSTATEDIR:PATH=var

//Man documentation (DATAROOTDIR/man)
CMAKE_INSTALL_MANDIR:PATH=

//C header files for non-gcc (/usr/include)
CMAKE_INSTALL_OLDINCLUDEDIR:PATH=/usr/include

//Install path prefix, prepended onto install directories.
CMAKE_INSTALL_PREFIX:PATH=C:/Program Files (x86)/MesaLink

//Run-time variable data (LOCALSTATEDIR/run)
CMAKE_INSTALL_RUNSTATEDIR:PATH=

//System admin executables (sbin)
CMAKE_INSTALL_SBINDIR:PATH=sbin

//Modifiable architecture-independent data (com)
CMAKE_INSTALL_SHAREDSTATEDIR:PATH=com

//Read-only single-machine data (etc)
CMAKE_INSTALL_SYSCONFDIR:PATH=etc

//Path to a program.
CMAKE_LINKER:FILEPATH=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/link.exe

//Flags used by the linker during the creation of modules during
// all build types.
CMAKE_MODULE_LINKER_FLAGS:STRING=/machine:x64

//Flags used by the linker during the creation of modules during
// DEBUG builds.
CMAKE_MODULE_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

//Flags used by the linker during the creation of modules during
// MINSIZEREL builds.
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

//Flags used by the linker during the creation of modules during
// RELEASE builds.
CMAKE_MODULE_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

//Flags used by the linker during the creation of modules during
// RELWITHDEBINFO builds.
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

//Path to a program.
CMAKE_MT:FILEPATH=CMAKE_MT-NOTFOUND

//Value Computed by CMake
CMAKE_PROJECT_DESCRIPTION:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_HOMEPAGE_URL:STATIC=

//Value Computed by CMake
CMAKE_PROJECT_NAME:STATIC=MesaLink

//Value Computed by CMake
CMAKE_PROJECT_VERSION:STATIC=15.1.0

//Value Computed by CMake
CMAKE_PROJECT_VERSION_MAJOR:STATIC=15

//Value Computed by CMake
CMAKE_PROJECT_VERSION_MINOR:STATIC=1

//Value Computed by CMake
CMAKE_PROJECT_VERSION_PATCH:STATIC=0

//Value Computed by CMake
CMAKE_PROJECT_VERSION_TWEAK:STATIC=

//RC compiler
CMAKE_RC_COMPILER:FILEPATH=rc

//Flags for Windows Resource Compiler during all build types.
CMAKE_RC_FLAGS:STRING=-DWIN32

//Flags for Windows Resource Compiler during DEBUG builds.
CMAKE_RC_FLAGS_DEBUG:STRING=-D_DEBUG

//Flags for Windows Resource Compiler during MINSIZEREL builds.
CMAKE_RC_FLAGS_MINSIZEREL:STRING=

//Flags for Windows Resource Compiler during RELEASE builds.
CMAKE_RC_FLAGS_RELEASE:STRING=

//Flags for Windows Resource Compiler during RELWITHDEBINFO builds.
CMAKE_RC_FLAGS_RELWITHDEBINFO:STRING=

//Flags used by the linker during the creation of shared libraries
// during all build types.
CMAKE_SHARED_LINKER_FLAGS:STRING=/machine:x64

//Flags used by the linker during the creation of shared libraries
// during DEBUG builds.
CMAKE_SHARED_LINKER_FLAGS_DEBUG:STRING=/debug /INCREMENTAL

//Flags used by the linker during the creation of shared libraries
// during MINSIZEREL builds.
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL:STRING=/INCREMENTAL:NO

//Flags used by the linker during the creation of shared libraries
// during RELEASE builds.
CMAKE_SHARED_LINKER_FLAGS_RELEASE:STRING=/INCREMENTAL:NO

//Flags used by the linker during the creation of shared libraries
// during RELWITHDEBINFO builds.
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO:STRING=/debug /INCREMENTAL

//If set, runtime paths are not added when installing shared libraries,
// but are added when building.
CMAKE_SKIP_INSTALL_RPATH:BOOL=NO

//If set, runtime paths are not added when using shared libraries.
CMAKE_SKIP_RPATH:BOOL=NO

//Flags used by the linker during the creation of static libraries
// during all build types.
CMAKE_STATIC_LINKER_FLAGS:STRING=/machine:x64

//Flags used by the linker during the creation of static libraries
// during DEBUG builds.
CMAKE_STATIC_LINKER_FLAGS_DEBUG:STRING=

//Flags used by the linker during the creation of static libraries
// during MINSIZEREL builds.
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL:STRING=

//Flags used by the linker during the creation of static libraries
// during RELEASE builds.
CMAKE_STATIC_LINKER_FLAGS_RELEASE:STRING=

//Flags used by the linker during the creation of static libraries
// during RELWITHDEBINFO builds.
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO:STRING=

//If this value is on, makefiles will be generated without the
// .SILENT directive, and all commands will be echoed to the console
// during the make.  This is useful for debugging only. With Visual
// Studio IDE projects all commands are done without /nologo.
CMAKE_VERBOSE_MAKEFILE:BOOL=FALSE

//Enable to build 7-Zip source packages
CPACK_SOURCE_7Z:BOOL=ON

//Enable to build ZIP source packages
CPACK_SOURCE_ZIP:BOOL=ON

//Enable AES-GCM bulk encryption (default: enabled)
HAVE_AESGCM:BOOL=ON

//Enable Chacha20Poly1305 bulk encryption (default: enabled)
HAVE_CHACHAPOLY:BOOL=ON

//Enable client APIs (default: enabled)
HAVE_CLIENT:BOOL=ON

//Enable curve secp256r1 and secp384r1 for key exchange (default:
// enabled)
HAVE_ECDH:BOOL=ON

//Enable curve secp256r1 and secp384r1 for signature verification
// (default: enabled)
HAVE_ECDSA:BOOL=ON

//Enable error string table (default: enabled)
HAVE_ERROR_STRINGS:BOOL=ON

//Enable examples (default: disabled)
HAVE_EXAMPLES:BOOL=ON

//Enable Jemalloc
HAVE_JEMALLOC:BOOL=OFF

//Enable server APIs (default: enabled)
HAVE_SERVER:BOOL=ON

//Enable experimental SGX attestation (default: disabled)
HAVE_SGX:BOOL=OFF

//Enable SNI Support
HAVE_SNI:BOOL=OFF

//Enable TLS 1.3
HAVE_TLS13:BOOL=ON

//Enable Curve25519 for key exchange (default: enabled)
HAVE_X25519:BOOL=ON

//Value Computed by CMake
MesaLink_BINARY_DIR:STATIC=C:/Users/User/Source/Repos/mesalink/build

//Value Computed by CMake
MesaLink_SOURCE_DIR:STATIC=C:/Users/User/Source/Repos/mesalink

//Path to a program.
RUSTC_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/rustc.exe

//Path to a program.
RUSTDOC_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/rustdoc.exe

//Path to a program.
RUSTUP_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/rustup.exe

//Path to a program.
RUST_GDB_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/rust-gdb.exe

//Path to a program.
RUST_LLDB_EXECUTABLE:FILEPATH=C:/Users/User/.cargo/bin/rust-lldb.exe


########################
# INTERNAL cache entries
########################

//ADVANCED property for variable: CARGO_EXECUTABLE
CARGO_EXECUTABLE-ADVANCED:INTERNAL=1
//This is the directory where this CMakeCache.txt was created
CMAKE_CACHEFILE_DIR:INTERNAL=c:/Users/User/Source/Repos/mesalink/build
//Major version of cmake used to create the current loaded cache
CMAKE_CACHE_MAJOR_VERSION:INTERNAL=3
//Minor version of cmake used to create the current loaded cache
CMAKE_CACHE_MINOR_VERSION:INTERNAL=15
//Patch version of cmake used to create the current loaded cache
CMAKE_CACHE_PATCH_VERSION:INTERNAL=19080502
//Path to CMake executable.
CMAKE_COMMAND:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cmake.exe
//Path to cpack program executable.
CMAKE_CPACK_COMMAND:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/cpack.exe
//Path to ctest program executable.
CMAKE_CTEST_COMMAND:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/bin/ctest.exe
//ADVANCED property for variable: CMAKE_CXX_FLAGS
CMAKE_CXX_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_DEBUG
CMAKE_CXX_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_MINSIZEREL
CMAKE_CXX_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELEASE
CMAKE_CXX_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_FLAGS_RELWITHDEBINFO
CMAKE_CXX_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_CXX_STANDARD_LIBRARIES
CMAKE_CXX_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS
CMAKE_C_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_DEBUG
CMAKE_C_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_MINSIZEREL
CMAKE_C_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELEASE
CMAKE_C_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_FLAGS_RELWITHDEBINFO
CMAKE_C_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_C_STANDARD_LIBRARIES
CMAKE_C_STANDARD_LIBRARIES-ADVANCED:INTERNAL=1
//Executable file format
CMAKE_EXECUTABLE_FORMAT:INTERNAL=Unknown
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS
CMAKE_EXE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_DEBUG
CMAKE_EXE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_MINSIZEREL
CMAKE_EXE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELEASE
CMAKE_EXE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_EXE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Name of external makefile project generator.
CMAKE_EXTRA_GENERATOR:INTERNAL=
//Name of generator.
CMAKE_GENERATOR:INTERNAL=Visual Studio 16 2019
//Generator instance identifier.
CMAKE_GENERATOR_INSTANCE:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community
//Name of generator platform.
CMAKE_GENERATOR_PLATFORM:INTERNAL=
//Name of generator toolset.
CMAKE_GENERATOR_TOOLSET:INTERNAL=
//Source directory with the top level CMakeLists.txt file for this
// project
CMAKE_HOME_DIRECTORY:INTERNAL=C:/Users/User/Source/Repos/mesalink
//ADVANCED property for variable: CMAKE_INSTALL_BINDIR
CMAKE_INSTALL_BINDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_DATADIR
CMAKE_INSTALL_DATADIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_DATAROOTDIR
CMAKE_INSTALL_DATAROOTDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_DOCDIR
CMAKE_INSTALL_DOCDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_INCLUDEDIR
CMAKE_INSTALL_INCLUDEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_INFODIR
CMAKE_INSTALL_INFODIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_LIBDIR
CMAKE_INSTALL_LIBDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_LIBEXECDIR
CMAKE_INSTALL_LIBEXECDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_LOCALEDIR
CMAKE_INSTALL_LOCALEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_LOCALSTATEDIR
CMAKE_INSTALL_LOCALSTATEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_MANDIR
CMAKE_INSTALL_MANDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_OLDINCLUDEDIR
CMAKE_INSTALL_OLDINCLUDEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_RUNSTATEDIR
CMAKE_INSTALL_RUNSTATEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_SBINDIR
CMAKE_INSTALL_SBINDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_SHAREDSTATEDIR
CMAKE_INSTALL_SHAREDSTATEDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_INSTALL_SYSCONFDIR
CMAKE_INSTALL_SYSCONFDIR-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_LINKER
CMAKE_LINKER-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS
CMAKE_MODULE_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_DEBUG
CMAKE_MODULE_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL
CMAKE_MODULE_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELEASE
CMAKE_MODULE_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_MODULE_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_MT
CMAKE_MT-ADVANCED:INTERNAL=1
//number of local generators
CMAKE_NUMBER_OF_MAKEFILES:INTERNAL=1
//Platform information initialized
CMAKE_PLATFORM_INFO_INITIALIZED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_COMPILER
CMAKE_RC_COMPILER-ADVANCED:INTERNAL=1
CMAKE_RC_COMPILER_WORKS:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS
CMAKE_RC_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_DEBUG
CMAKE_RC_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_MINSIZEREL
CMAKE_RC_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELEASE
CMAKE_RC_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_RC_FLAGS_RELWITHDEBINFO
CMAKE_RC_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//Path to CMake installation.
CMAKE_ROOT:INTERNAL=C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/Common7/IDE/CommonExtensions/Microsoft/CMake/CMake/share/cmake-3.15
CMAKE_Rust_COMPILER_WORKS:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS
CMAKE_SHARED_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_DEBUG
CMAKE_SHARED_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL
CMAKE_SHARED_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELEASE
CMAKE_SHARED_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_SHARED_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_INSTALL_RPATH
CMAKE_SKIP_INSTALL_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_SKIP_RPATH
CMAKE_SKIP_RPATH-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS
CMAKE_STATIC_LINKER_FLAGS-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_DEBUG
CMAKE_STATIC_LINKER_FLAGS_DEBUG-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL
CMAKE_STATIC_LINKER_FLAGS_MINSIZEREL-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELEASE
CMAKE_STATIC_LINKER_FLAGS_RELEASE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO
CMAKE_STATIC_LINKER_FLAGS_RELWITHDEBINFO-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CMAKE_VERBOSE_MAKEFILE
CMAKE_VERBOSE_MAKEFILE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_7Z
CPACK_SOURCE_7Z-ADVANCED:INTERNAL=1
//ADVANCED property for variable: CPACK_SOURCE_ZIP
CPACK_SOURCE_ZIP-ADVANCED:INTERNAL=1
//ADVANCED property for variable: RUSTC_EXECUTABLE
RUSTC_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: RUSTDOC_EXECUTABLE
RUSTDOC_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: RUSTUP_EXECUTABLE
RUSTUP_EXECUTABLE-ADVANCED:INTERNAL=1
RUST_FOUND:INTERNAL=TRUE
//ADVANCED property for variable: RUST_GDB_EXECUTABLE
RUST_GDB_EXECUTABLE-ADVANCED:INTERNAL=1
//ADVANCED property for variable: RUST_LLDB_EXECUTABLE
RUST_LLDB_EXECUTABLE-ADVANCED:INTERNAL=1
//CMAKE_INSTALL_PREFIX during last run
_GNUInstallDirs_LAST_CMAKE_INSTALL_PREFIX:INTERNAL=C:/Program Files (x86)/MesaLink

CMakeCCompiler.cmake

set(CMAKE_C_COMPILER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/cl.exe")
set(CMAKE_C_COMPILER_ARG1 "")
set(CMAKE_C_COMPILER_ID "MSVC")
set(CMAKE_C_COMPILER_VERSION "19.23.28107.0")
set(CMAKE_C_COMPILER_VERSION_INTERNAL "")
set(CMAKE_C_COMPILER_WRAPPER "")
set(CMAKE_C_STANDARD_COMPUTED_DEFAULT "90")
set(CMAKE_C_COMPILE_FEATURES "c_std_90;c_std_99;c_std_11;c_function_prototypes;c_variadic_macros")
set(CMAKE_C90_COMPILE_FEATURES "c_std_90;c_function_prototypes")
set(CMAKE_C99_COMPILE_FEATURES "c_std_99;c_variadic_macros")
set(CMAKE_C11_COMPILE_FEATURES "c_std_11")

set(CMAKE_C_PLATFORM_ID "Windows")
set(CMAKE_C_SIMULATE_ID "")
set(CMAKE_C_COMPILER_FRONTEND_VARIANT "")
set(CMAKE_C_SIMULATE_VERSION "")
set(CMAKE_C_COMPILER_ARCHITECTURE_ID x64)
set(MSVC_C_ARCHITECTURE_ID x64)

set(CMAKE_AR "")
set(CMAKE_C_COMPILER_AR "")
set(CMAKE_RANLIB "")
set(CMAKE_C_COMPILER_RANLIB "")
set(CMAKE_LINKER "C:/Program Files (x86)/Microsoft Visual Studio/2019/Community/VC/Tools/MSVC/14.23.28105/bin/Hostx64/x64/link.exe")
set(CMAKE_MT "CMAKE_MT-NOTFOUND")
set(CMAKE_COMPILER_IS_GNUCC )
set(CMAKE_C_COMPILER_LOADED 1)
set(CMAKE_C_COMPILER_WORKS TRUE)
set(CMAKE_C_ABI_COMPILED TRUE)
set(CMAKE_COMPILER_IS_MINGW )
set(CMAKE_COMPILER_IS_CYGWIN )
if(CMAKE_COMPILER_IS_CYGWIN)
  set(CYGWIN 1)
  set(UNIX 1)
endif()

set(CMAKE_C_COMPILER_ENV_VAR "CC")

if(CMAKE_COMPILER_IS_MINGW)
  set(MINGW 1)
endif()
set(CMAKE_C_COMPILER_ID_RUN 1)
set(CMAKE_C_SOURCE_FILE_EXTENSIONS c;m)
set(CMAKE_C_IGNORE_EXTENSIONS h;H;o;O;obj;OBJ;def;DEF;rc;RC)
set(CMAKE_C_LINKER_PREFERENCE 10)

# Save compiler ABI information.
set(CMAKE_C_SIZEOF_DATA_PTR "8")
set(CMAKE_C_COMPILER_ABI "")
set(CMAKE_C_LIBRARY_ARCHITECTURE "")

if(CMAKE_C_SIZEOF_DATA_PTR)
  set(CMAKE_SIZEOF_VOID_P "${CMAKE_C_SIZEOF_DATA_PTR}")
endif()

if(CMAKE_C_COMPILER_ABI)
  set(CMAKE_INTERNAL_PLATFORM_ABI "${CMAKE_C_COMPILER_ABI}")
endif()

if(CMAKE_C_LIBRARY_ARCHITECTURE)
  set(CMAKE_LIBRARY_ARCHITECTURE "")
endif()

set(CMAKE_C_CL_SHOWINCLUDES_PREFIX "")
if(CMAKE_C_CL_SHOWINCLUDES_PREFIX)
  set(CMAKE_CL_SHOWINCLUDES_PREFIX "${CMAKE_C_CL_SHOWINCLUDES_PREFIX}")
endif()





set(CMAKE_C_IMPLICIT_INCLUDE_DIRECTORIES "")
set(CMAKE_C_IMPLICIT_LINK_LIBRARIES "")
set(CMAKE_C_IMPLICIT_LINK_DIRECTORIES "")
set(CMAKE_C_IMPLICIT_LINK_FRAMEWORK_DIRECTORIES "")

Publishing on Crates.io?

This is more of a question than a feature request. Currently MesaLink is not available on crates.io, which makes it difficult to use within a Rust application. I know that native Rust code is better to use Rustls directly, but I'm in a bit of a unique situation.

I am interested in adding to the curl-sys crate on crates.io the ability to statically link to MesaLink as the TLS implementation; this would allow Rust applications to use a statically linked libcurl that in turn uses a statically linked MesaLink for its TLS implementation. This would be a pretty big win for Rust applications that make use of curl (including cargo itself) as it eliminates the OpenSSL dependency and gains the safety of MesaLink + Rustls.

Doing this as-is is a challenge for several reasons:

  • curl-sys cannot be published to crates.io if it depends on crates that are not also on crates.io
  • We need to be careful to ensure that libraries are not duplicated (like libstd) when linking to MesaLink. Having Cargo aware of the mesalink crate is the best way to avoid this.

I see only a few ways of making this possible:

  • Publish mesalink to crates.io along with its forked dependencies (as mesalink-rustlsand so on).
  • Absorb all of mesalink's forked dependencies inside the mesalink crate (under modules or something) and publish that.
  • Pre-compile MesaLink without libstd for every platform, and ship that as a wrapper crate. (yuck)
  • Create a mesalink-sys crate that builds MesaLink inside a build script. (Awkward running Cargo inside a build script inside Cargo...)
  • Fork MesaLink and do one of the above.

I am interested to hear of better solutions, or if there is any interest in publishing to crates.io.

support Freebsd

Hello,

i tried mesalink on freebsd. the only thing that needs to change is to include netinet/in.h in server.c.

This does not break compile on linux, through I dont know about Mac.
If wanted I'll create a pull request.

autoreconf: automake failed with exit status: 1

./autogen.sh --enable-examples

automake: warnings are treated as errors
examples/0rtt_client/include.am:3: warning: compiling 'examples/0rtt_client/0rtt_client.c' in subdir requires 'AM_PROG_CC_C_O' in 'configure.ac'
Makefile.am:24: 'examples/include.am' included from here
examples/include.am:2: 'examples/0rtt_client/include.am' included from here

macos: Duplicate symbols

It looks like the duplication of LLVM compiler intrinsics. 30% chance that it's because autotooling assumes /usr/bin/gcc is GCC, when it's Apple's version of Clang/LLVM.

Environment

  • macOS 10.13.5
  • Xcode/CLT 9.4.1
  • Latest rust nightly - 1.28.0-nightly (e2348c2db 2018-06-07)
  • mesalink latest stable or master
  • Homebrew packages installed
    • rustup 1.11.0
    • autoconf 2.69
    • automake 1.16.1
    • libtool 2.4.6
    • coreutils 8.29
    • grep 3.1
    • gawk 4.2.1

C compiler

$ gcc --version # autogen's choice is gcc
Configured with: --prefix=/Library/Developer/CommandLineTools/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
Apple LLVM version 9.1.0 (clang-902.0.39.2)
Target: x86_64-apple-darwin17.6.0
Thread model: posix
InstalledDir: /Library/Developer/CommandLineTools/usr/bin

Build command

  curl -fsL https://github.com/mesalock-linux/mesalink/archive/master.tar.gz | tar zx && \
  (cd mesalink-master && ./autogen.sh && make -j); \
  rm -rf mesalink-master/

Build output

*** WARNING: I am going to run 'configure' with no arguments.
*** If you wish to pass any to it, please specify them on the
*** './autogen.sh' command line.

configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
/usr/local/share/aclocal/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
/usr/local/share/aclocal/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
aclocal: overwriting 'm4/ax_append_compile_flags.m4' with '/usr/local/share/aclocal/ax_append_compile_flags.m4'
aclocal: overwriting 'm4/ax_append_flag.m4' with '/usr/local/share/aclocal/ax_append_flag.m4'
aclocal: overwriting 'm4/ax_check_compile_flag.m4' with '/usr/local/share/aclocal/ax_check_compile_flag.m4'
aclocal: overwriting 'm4/ax_check_link_flag.m4' with '/usr/local/share/aclocal/ax_check_link_flag.m4'
aclocal: overwriting 'm4/ax_compiler_vendor.m4' with '/usr/local/share/aclocal/ax_compiler_vendor.m4'
aclocal: installing 'm4/ax_require_defined.m4' from '/usr/local/share/aclocal/ax_require_defined.m4'
aclocal: installing 'm4/libtool.m4' from '/usr/local/share/aclocal/libtool.m4'
aclocal: installing 'm4/ltoptions.m4' from '/usr/local/share/aclocal/ltoptions.m4'
aclocal: installing 'm4/ltsugar.m4' from '/usr/local/share/aclocal/ltsugar.m4'
aclocal: installing 'm4/ltversion.m4' from '/usr/local/share/aclocal/ltversion.m4'
aclocal: installing 'm4/lt~obsolete.m4' from '/usr/local/share/aclocal/lt~obsolete.m4'
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: configure.ac: tracing
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: configure.ac: creating directory build-aux
autoreconf: running: glibtoolize --copy --force
glibtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'build-aux'.
glibtoolize: copying file 'build-aux/ltmain.sh'
glibtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'.
glibtoolize: copying file 'm4/libtool.m4'
glibtoolize: copying file 'm4/ltoptions.m4'
glibtoolize: copying file 'm4/ltsugar.m4'
glibtoolize: copying file 'm4/ltversion.m4'
glibtoolize: copying file 'm4/lt~obsolete.m4'
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoheader --force
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
autoreconf: running: automake --add-missing --copy --force-missing
configure.ac:69: warning: AC_LANG_CONFTEST: no AC_LANG_SOURCE call detected in body
../../lib/autoconf/lang.m4:197: AC_LANG_CONFTEST is expanded from...
../../lib/autoconf/general.m4:2598: _AC_COMPILE_IFELSE is expanded from...
../../lib/autoconf/general.m4:2608: AC_COMPILE_IFELSE is expanded from...
../../lib/m4sugar/m4sh.m4:643: AS_IF is expanded from...
../../lib/autoconf/general.m4:2046: AC_CACHE_VAL is expanded from...
../../lib/autoconf/general.m4:2059: AC_CACHE_CHECK is expanded from...
m4/ax_check_compile_flag.m4:74: AX_CHECK_COMPILE_FLAG is expanded from...
m4/ax_append_compile_flags.m4:67: AX_APPEND_COMPILE_FLAGS is expanded from...
m4/ax_harden_compiler_flags.m4:160: AX_HARDEN_CC_COMPILER_FLAGS is expanded from...
configure.ac:69: the top level
configure.ac:21: installing 'build-aux/ar-lib'
configure.ac:18: installing 'build-aux/compile'
configure.ac:8: installing 'build-aux/config.guess'
configure.ac:8: installing 'build-aux/config.sub'
configure.ac:12: installing 'build-aux/install-sh'
configure.ac:12: installing 'build-aux/missing'
autoreconf: Leaving directory `.'
checking build system type... x86_64-apple-darwin17.6.0
checking host system type... x86_64-apple-darwin17.6.0
checking for a BSD-compatible install... /usr/local/bin/ginstall -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/local/bin/gmkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables... 
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking whether gcc and cc understand -c and -o together... yes
checking for ar... ar
checking the archiver (ar) interface... ar
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/local/bin/gsed
checking for grep that handles long lines and -e... /usr/local/bin/ggrep
checking for egrep... /usr/local/bin/ggrep -E
checking for fgrep... /usr/local/bin/ggrep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin17.6.0 file names to x86_64-apple-darwin17.6.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.6.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking how to run the C preprocessor... gcc -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.6.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for string.h... (cached) yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking for unistd.h... (cached) yes
checking for gethostbyname... yes
checking for memset... yes
checking for socket... yes
checking for cargo... yes
checking for rustc... yes
checking for C compiler vendor... clang
checking whether the linker accepts ... yes
checking for vcs system... none
checking for vcs checkout... no
checking for debug... no
checking whether the linker accepts -Werror... yes
checking whether the linker accepts -z relro -z now... no
checking whether the linker accepts -pie... no
checking whether C compiler accepts -Werror... yes
checking whether C compiler accepts -Wno-pragmas... yes
checking whether C compiler accepts -Wall... yes
checking whether C compiler accepts -Wno-strict-aliasing... no
checking whether C compiler accepts -Wextra... yes
checking whether C compiler accepts -Wunknown-pragmas... yes
checking whether C compiler accepts -Wthis-test-should-fail... no
checking whether C compiler accepts --param=ssp-buffer-size=1... yes
checking whether C compiler accepts -Waddress... yes
checking whether C compiler accepts -Warray-bounds... yes
checking whether C compiler accepts -Wbad-function-cast... yes
checking whether C compiler accepts -Wchar-subscripts... yes
checking whether C compiler accepts -Wcomment... yes
checking whether C compiler accepts -Wfloat-equal... yes
checking whether C compiler accepts -Wformat-security... yes
checking whether C compiler accepts -Wformat=2... yes
checking whether C compiler accepts -Wmaybe-uninitialized... no
checking whether C compiler accepts -Wmissing-field-initializers... yes
checking whether C compiler accepts -Wmissing-noreturn... yes
checking whether C compiler accepts -Wmissing-prototypes... yes
checking whether C compiler accepts -Wnested-externs... yes
checking whether C compiler accepts -Wnormalized=id... no
checking whether C compiler accepts -Woverride-init... no
checking whether C compiler accepts -Wpointer-arith... yes
checking whether C compiler accepts -Wpointer-sign... yes
checking whether C compiler accepts -Wredundant-decls... yes
checking whether C compiler accepts -Wshadow... yes
checking whether C compiler accepts -Wshorten-64-to-32... yes
checking whether C compiler accepts -Wsign-compare... yes
checking whether C compiler accepts -Wstrict-overflow=1... yes
checking whether C compiler accepts -Wstrict-prototypes... yes
checking whether C compiler accepts -Wswitch-enum... yes
checking whether C compiler accepts -Wundef... yes
checking whether C compiler accepts -Wunused... yes
checking whether C compiler accepts -Wunused-result... yes
checking whether C compiler accepts -Wunused-variable... yes
checking whether C compiler accepts -Wwrite-strings... yes
checking whether C compiler accepts -fwrapv... yes
checking whether the linker accepts -Werror... (cached) yes
checking whether the linker accepts -z relro -z now... (cached) no
checking whether the linker accepts -pie... (cached) no
checking for debug... no
creating mesalink-config - generic 0.6.0 for -lmesalink
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating mesalink/options.h
config.status: creating mesalink/version.h
config.status: creating config.h
config.status: executing libtool commands
---
Running make clean ...

---
Configuration summary for mesalink version 0.6.0

   * Installation prefix:        /usr/local
   * Host:                       x86_64-apple-darwin17.6.0
   * Rust Host:                  
   * C Compiler:                 gcc
   * C Compiler vendor:          clang
   * C Flags:                    -Os -fvisibility=hidden -ffunction-sections -fdata-sections  -Wno-pragmas -Wall -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv
   * Debug enabled:              no
   * Nightly Rust:               yes
   * Examples:                   no

   Features 
   * Logging and error strings:  yes
   * AES-GCM:                    yes
   * Chacha20-Poly1305:          yes
   * TLS 1.3 (draft):            yes
   * X25519 key exchange:        yes
   * EC key exchange:            yes
   * RSA signature verification: yes
   * EC signature verification:  yes

---
/Library/Developer/CommandLineTools/usr/bin/make  all-am
cd . && \
	 cargo rustc \
		--release --no-default-features --features " client_apis server_apis error_strings aesgcm chachapoly tls13 x25519 ecdh ecdsa verifier"  -- -C overflow-checks=yes -C link-args=-Wl,-dead_strip -C opt-level=z
    Updating git repository `https://github.com/mesalock-linux/rustls`
    Updating git repository `https://github.com/mesalock-linux/sct.rs`
    Updating git repository `https://github.com/kevinis/enum_to_str_derive.git`
    Updating registry `https://github.com/rust-lang/crates.io-index`
   Compiling cc v1.0.17
   Compiling untrusted v0.6.2
   Compiling unicode-xid v0.0.4
   Compiling quote v0.3.15
   Compiling safemem v0.2.0
   Compiling byteorder v1.2.3
   Compiling cfg-if v0.1.4
   Compiling mesalink v0.6.0 (file:///private/tmp/mesalink-master)
   Compiling lazy_static v1.0.1
   Compiling libc v0.2.42
   Compiling synom v0.11.3
   Compiling log v0.4.3
   Compiling base64 v0.9.2
   Compiling syn v0.11.11
   Compiling ring v0.13.0-alpha5
   Compiling enum_to_str_derive v0.1.0 (https://github.com/kevinis/enum_to_str_derive.git#35a1c87b)
   Compiling sct v0.3.0 (https://github.com/mesalock-linux/sct.rs?branch=mesalink#3d77a2ab)
   Compiling webpki v0.18.0-alpha4
   Compiling webpki-roots v0.14.0
   Compiling rustls v0.12.0 (https://github.com/mesalock-linux/rustls?branch=mesalink#82e2136e)
    Finished release [optimized] target(s) in 1m 35s
/bin/sh ./libtool  --tag=CC   --mode=link gcc  -Os -fvisibility=hidden -ffunction-sections -fdata-sections  -Wno-pragmas -Wall -Wextra -Wunknown-pragmas --param=ssp-buffer-size=1 -Waddress -Warray-bounds -Wbad-function-cast -Wchar-subscripts -Wcomment -Wfloat-equal -Wformat-security -Wformat=2 -Wmissing-field-initializers -Wmissing-noreturn -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wpointer-sign -Wredundant-decls -Wshadow -Wshorten-64-to-32 -Wsign-compare -Wstrict-overflow=1 -Wstrict-prototypes -Wswitch-enum -Wundef -Wunused -Wunused-result -Wunused-variable -Wwrite-strings -fwrapv -export-dynamic -no-undefined -version-info 6:0:0 -export-symbols-regex "^mesalink_.*"   -o libmesalink.la -rpath /usr/local/lib  /tmp/mesalink-master/target/release/libmesalink_internals.la 
libtool: link: /usr/bin/nm -B   /tmp/mesalink-master/target/release/.libs/libmesalink_internals.a | sed -n -e 's/^.*[	 ]\([BCDEGRST][BCDEGRST]*\)[	 ][	 ]*_\([_A-Za-z][_A-Za-z0-9]*\)$/\1 _\2 \2/p' | sed '/ __gnu_lto/d' | /usr/local/bin/gsed 's/.* //' | sort | uniq > .libs/libmesalink.exp
libtool: link: /usr/local/bin/ggrep -E -e "^mesalink_.*" ".libs/libmesalink.exp" > ".libs/libmesalink.expT"
libtool: link: mv -f ".libs/libmesalink.expT" ".libs/libmesalink.exp"
libtool: link: sed 's|^|_|' < .libs/libmesalink.exp > .libs/libmesalink-symbols.expsym
libtool: link: gcc -dynamiclib  -o .libs/libmesalink.6.dylib   -Wl,-force_load,/tmp/mesalink-master/target/release/.libs/libmesalink_internals.a   -Os   -lm -ldl -lresolv -framework Security -install_name  /usr/local/lib/libmesalink.6.dylib -compatibility_version 7 -current_version 7.0 -Wl,-single_module -Wl,-exported_symbols_list,.libs/libmesalink-symbols.expsym
duplicate symbol ___floatdisf in:
    /tmp/mesalink-master/target/release/.libs/libmesalink_internals.a(compiler_builtins-082e7faacb91b99b.compiler_builtins0-4d50cb6996581a3196f5470ee396f32f.rs.rcgu.o)
    /tmp/mesalink-master/target/release/.libs/libmesalink_internals.a(floatdisf.o)
ld: 1 duplicate symbol for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [libmesalink.la] Error 1
make: *** [all] Error 2

Last day at Baidu

This Friday is my last day at Baidu. I'll be maintaining a fork of MesaLink under a different name: TabbySSL. 🐈

See you soon.

Use armv7 for android builds on travis

Looks like the Android builds have some compatibility issues on Linux kernel prior to 3.1. The binary panics and prints the following error message:
"A newer kernel is required to run this binary. (__kernel_cmpxchg64 helper)"

Googling around reveals a 4-yr old thread, which does not quite work well for me. I guess the problem is the NDK. Currently I compile MesaLink with NDK r17 for Android targets; and NDK r17 has dropped armeabi support. So starting from 0.8.0, MeasLink will use the armv7-linux-androideabi instead of arm-linux-androideabi.

Proxy Server Support

Is mesalink in a place where it could be used in a proxy server like nginx or caddy?

Release 0.6.1 is missing Cargo.lock

While release 0.6.0 still included Cargo.lock, it was removed for release 0.6.1. This is a problem for packaging mesalink, as it is unknown which version of crates are supposed to be used. Without the exact versions of crates, it is also impossible to reproduce the binaries you publish with a release.

Upstream advises not to check in Cargo.lock for libraries. However, I do not think this applies to mesalink, as the build result for distribution is a "classic" library as a binary file and not as a rust crate (which is basically a source code tarball).

Please release Cargo.lock with the source code.

Building mesalink as drop-in replacement for nginx

Hi, I'm trying to compile nginx using mesalink as the replacement for OpenSSL.

I've compiled mesalink using the following:

mkdir out
./autogen.sh --prefix=$(pwd)/out
make && make install

Then compile nginx (sources available at github.com/nginx/nginx) with the following options:

./auto/configure --with-http_ssl_module \
    --with-cc-opt="-I/path/to/mesalock-linux/mesalink/out/include/mesalink -I/path/to/mesalock-linux/mesalink/out/include" \
    --with-ld-opt="-L/path/to/mesalock-linux/mesalink/out/lib"

I get the following error:

./auto/configure: error: SSL modules require the OpenSSL library.
You can either do not enable the modules, or install the OpenSSL library
into the system, or build the OpenSSL library statically from the source
with nginx by using --with-openssl=<path> option.

If you read through objs/autoconf.err you get:

checking for OpenSSL library in /usr/local/

objs/autotest.c:7:5: error: implicit declaration of function 'SSL_CTX_set_options' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
    SSL_CTX_set_options(NULL, 0);
    ^
1 error generated.
----------

#include <sys/types.h>
#include <unistd.h>
#include <openssl/ssl.h>

int main(void) {
    SSL_CTX_set_options(NULL, 0);
    return 0;
}

----------
cc -pipe -I/path/to/mesalock-linux/mesalink/out/include/mesalink -I/path/to/mesalock-linux/mesalink/out/include -D__APPLE_USE_RFC_3542 -I /usr/local/include -o objs/autotest objs/autotest.c -L/path/to/mesalock-linux/mesalink/out/lib -L/usr/local/lib -lssl -lcrypto

I searched for SSL_CTX_set_options in mesalink source code and issues, but I couldn't find anything. Any idea how to get past this? Do I need to define a shim .h file or something?

Updates #12.

Support Cipher Suite TLS_RSA_WITH_AES_128_CBC_SHA for TLS 1.2 compatability

Hello mesalink team,

As I was evaluating your library, I stumbled upon the missing support of the cipher suite TLS_RSA_WITH_AES_128_CBC_SHA which is mandatory as of the TLS 1.2 specification section 9.

How to reproduce:

  1. Checkout mesalink v.0.6.1 from github
  2. Compile it as explained in README.md
  3. Start the server in examples/server/server as explained in README.md
  4. Disable all cipher suites except for TLS_RSA_WITH_AES_128_CBC_SHA in your browser. (e.g. as explained here for firefox)
  5. Try to connect to the server.

For example Firefox will show that no supported cipher suite was found. Capturing the traffic with wireshark shows that the mesalink server sends an alert.
Enabeling more cipher suites again allows to do successfull handshakes.

support Windows?

From the build instructions:

MesaLink currently supports Linux, Android and macOS. We will introduce support for other platforms in future releases.

When is Windows support expected?

Note that rust-native-tls supports the following:

Specifically, this crate uses SChannel on Windows (via the schannel crate), Secure Transport on OSX (via the security-framework crate), and OpenSSL (via the openssl crate) on all other platforms.

Use mesalink as drop-in replacement for OpenSSL

Since mesalink aims to be compatible to OpenSSL, I'd like to ask if it is already possible to use it as a drop-in replacement for the former mentioned library? So would it be possible to link e.g. a nginx web server against mesalink instead of OpenSSL?

Cannot install mesalink under CentOS6

System:CentOS6.9 x86_64
The error message is as follows:

aclocal: --install should copy macros in the directory indicated by the
aclocal: first -I option, but no -I was supplied.

How should I solve it? I did not find a solution on the network
Thank you.

How can I compile on Windows?

I can't link the examples on Windows, using MSVC
Link: C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.23.28105\bin\HostX64\x64\link.exe /ERR ORREPORT:QUEUE /OUT:"C:\Users\User\Source\Repos\mesalink\build\Release\client.exe" /INCREMENTAL:NO /NOLOGO /LIBPATH:" C:\Users\User\vcpkg\installed\x64-windows\lib" /LIBPATH:"C:\Users\User\vcpkg\installed\x64-windows\lib\manual-link" " mesalink-NOTFOUND" kernel32.lib user32.lib gdi32.lib winspool.lib shell32.lib ole32.lib oleaut32.lib uuid.lib comdlg3 2.lib advapi32.lib "C:\Users\User\vcpkg\installed\x64-windows\lib\*.lib" /MANIFEST /MANIFESTUAC:"level='asInvoker' ui Access='false'" /manifest:embed /PDB:"C:/Users/User/Source/Repos/mesalink/build/Release/client.pdb" /SUBSYSTEM:CONSOL E /TLBID:1 /DYNAMICBASE /NXCOMPAT /IMPLIB:"C:/Users/User/Source/Repos/mesalink/build/Release/client.lib" /MACHINE:X64 /machine:x64 client.dir\Release\client.obj LINK : fatal error LNK1181: cannot open input file 'mesalink-NOTFOUND.obj' [C:\Users\User\Source\Repos\mesalink\build\c lient.vcxproj]

can't make

when I use make
It show
cd . && \ cargo rustc \ --release --no-default-features --features " client_apis server_apis error_strings aesgcm chachapoly tls13 x25519 ecdh ecdsa verifier" -- -C overflow-checks=yes -C link-args=-Wl,--gc-sections -C opt-level=z Updating git repository https://github.com/mesalock-linux/rustls`
error: failed to load source for a dependency on rustls

Caused by:
Unable to update https://github.com/mesalock-linux/rustls?branch=mesalink#12dd7e88

Caused by:
revspec '12dd7e883e3c5a8ca782ff90e2046ae760e39161' not found; class=Reference (4); code=NotFound (-3)`

Is network error?

What is the different between mesalink and intel sgx secret provisioning?

Hi, I'm a new learner of mesatee. I read something about intel sgx secret provisioning and mesalink from github and intel official guide, and that confuses me. Because I dont understand why u guys write another TLS library. For my perspective, intel already shows us a way to send secrets into enclave, which is secret provisioning, so we should not have to make another one. Looking forward to any relay. Thx.

Spectre V1 safety

Parsing any externally supplied data, such as SSL packets, can potentially expose application to Spectre V1 attacks. IMO. What's your stance on Spectre safety of your library?

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.