Yawning Angel <yawning@xxxxxxxxxxxxxxx> wrote: > On Fri, 14 Feb 2014 12:00:40 +0100 > Fabian Keil <freebsd-listen@xxxxxxxxxxxxx> wrote: > > > Please let me know if it's still broken/if I've missed anything. > > from /home/fk/git/obfsclient/src/main.cc:49: /home/fk/git/obfsclient/src/schwanenlied/pt/scramblesuit/client.h:146:60: > > error: implicit instantiation of undefined template > > 'std::__1::array<unsigned char, 1448>' ::std::array<uint8_t, > > kHeaderLength + kMaxPayloadLength> decode_buf_; > > ^ /usr/include/c++/v1/__tuple:69:60: note: template is declared here > > template <class _Tp, size_t _Size> struct _LIBCPP_TYPE_VIS array; ^ > > This should also be fixed, left out #include <array> in > scramblesuit/client.h. I can confirm that, thanks. > > In file included from /home/fk/git/obfsclient/src/main.cc:49: > > /home/fk/git/obfsclient/src/schwanenlied/pt/scramblesuit/client.h:64:14: > > error: static_cast from 'schwanenlied::pt::scramblesuit::Client *' to > > 'Socks5Server::Session *' is not allowed return > > static_cast<Socks5Server::Session*>(new Client(base, sock, addr, > > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 > > errors generated. *** Error code 1 [...] > > Argh. Ok, I think I know what the issue is, although it builds fine > with: > > somme :: Development/obfsclient/build âmaster*â % clang --version > clang version 3.4 (tags/RELEASE_34/final) > Target: x86_64-unknown-linux-gnu > Thread model: posix > > Please try the attached patch and let me know if it's *still* broken. It's already fixed in 1e25c55ba54 without the patch. > On a side note, tip of tree requires updating liballium since I > switched both of liballium and obfsclient to auto[conf/make]/libtool. > Hopefully the build process is less rage inducing now. It is for me. With the attached patches it builds on FreeBSD. The "#if 0" patch is just FYI, I'm sure a better solution is possible, but it wasn't immediately obvious to me what the pragmas are good for. ./obfsclient_test dumps core: fk@porttest /home/fk/obfsclient $./obfsclient_test Running main() from gtest_main.cc [==========] Running 29 tests from 7 test cases. [----------] Global test environment set-up. [----------] 3 tests from CryptoUtilsTest [ RUN ] CryptoUtilsTest.memwipe [ OK ] CryptoUtilsTest.memwipe (0 ms) [ RUN ] CryptoUtilsTest.memequalsIsEqual [ OK ] CryptoUtilsTest.memequalsIsEqual (0 ms) [ RUN ] CryptoUtilsTest.memequalsNotEqual [ OK ] CryptoUtilsTest.memequalsNotEqual (0 ms) [----------] 3 tests from CryptoUtilsTest (1 ms total) [----------] 1 test from UniformDHTest [ RUN ] UniformDHTest.SmokeTest [ OK ] UniformDHTest.SmokeTest (22100 ms) [----------] 1 test from UniformDHTest (22100 ms total) [----------] 3 tests from Sha256Test [ RUN ] Sha256Test.NIST_NSRL_abc [ OK ] Sha256Test.NIST_NSRL_abc (1 ms) [ RUN ] Sha256Test.NIST_NSRL_abc_dot_dot_dot [ OK ] Sha256Test.NIST_NSRL_abc_dot_dot_dot (0 ms) [ RUN ] Sha256Test.NIST_NSRL_omgLotsOfAs [ OK ] Sha256Test.NIST_NSRL_omgLotsOfAs (8 ms) [----------] 3 tests from Sha256Test (9 ms total) [----------] 7 tests from HmacSha256Test [ RUN ] HmacSha256Test.RFC4231_Case_1 [ OK ] HmacSha256Test.RFC4231_Case_1 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_2 [ OK ] HmacSha256Test.RFC4231_Case_2 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_3 [ OK ] HmacSha256Test.RFC4231_Case_3 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_4 [ OK ] HmacSha256Test.RFC4231_Case_4 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_5 [ OK ] HmacSha256Test.RFC4231_Case_5 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_6 [ OK ] HmacSha256Test.RFC4231_Case_6 (0 ms) [ RUN ] HmacSha256Test.RFC4231_Case_7 [ OK ] HmacSha256Test.RFC4231_Case_7 (0 ms) [----------] 7 tests from HmacSha256Test (0 ms total) [----------] 3 tests from HkdfSha256Test [ RUN ] HkdfSha256Test.RFC5968_Case_1 [ OK ] HkdfSha256Test.RFC5968_Case_1 (0 ms) [ RUN ] HkdfSha256Test.RFC5968_Case_2 [ OK ] HkdfSha256Test.RFC5968_Case_2 (0 ms) [ RUN ] HkdfSha256Test.RFC5968_Case_3 [ OK ] HkdfSha256Test.RFC5968_Case_3 (0 ms) [----------] 3 tests from HkdfSha256Test (1 ms total) [----------] 6 tests from Base32Test [ RUN ] Base32Test.RFC4648_Test_1 [ OK ] Base32Test.RFC4648_Test_1 (0 ms) [ RUN ] Base32Test.RFC4648_Test_2 [ OK ] Base32Test.RFC4648_Test_2 (0 ms) [ RUN ] Base32Test.RFC4648_Test_3 [ OK ] Base32Test.RFC4648_Test_3 (0 ms) [ RUN ] Base32Test.RFC4648_Test_4 [ OK ] Base32Test.RFC4648_Test_4 (0 ms) [ RUN ] Base32Test.RFC4648_Test_5 [ OK ] Base32Test.RFC4648_Test_5 (0 ms) [ RUN ] Base32Test.RFC4648_Test_6 [ OK ] Base32Test.RFC4648_Test_6 (0 ms) [----------] 6 tests from Base32Test (0 ms total) [----------] 6 tests from AesTest [ RUN ] AesTest.CtrAes128_SP800_38A Bus error (core dumped) fk@r500 ~/git/obfsclient $gdb762 obfsclient_test obfsclient_test.core [...] Core was generated by `obfsclient_test'. Program terminated with signal 10, Bus error. #0 0x00000000004090c6 in schwanenlied::crypto::Ctr<schwanenlied::crypto::AesEcb<&EVP_aes_128_ecb, 16ul> >::process (this=0x7fffffffd4f8, buf=0x433c31 <schwanenlied::crypto::AesTest_CtrAes128_SP800_38A_Test::TestBody()::vectors+1> "\301\276\342.@\237\226\351=~\021s\223\027*\207Ma\221\266 \343&\033\357hd\231\r\266\316\256-\212W\036\003\254\234\236\267o\254E\257\216Q\230\006\366kyp\375\377\206\027\030{\271\377\375\377\060\310\034F\243\\\344\021\345\373\301\031\032\nR\357Z\344\337>\333\325\323^[O\t\002\r\260>\253\366\237$E\337O\233\027\255+A{\346l7\020\036\003\035\332/\276\003\321y!p\240\363", len=<optimized out>, out=<optimized out>) at ./src/schwanenlied/crypto/ctr.h:165 165 *out++ = (*buf++)^ block_[offset_]; (gdb) p offset_ $1 = 11330806256049838041 I didn't look into this or test obfsclient yet, but intend to do so in the next couple of days. Fabian
From 9e0b70158b780252748b9cd3d7c92c1c4c47c0f6 Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Fri, 14 Feb 2014 14:30:23 +0100 Subject: [PATCH 1/3] Make autogen.sh executable --- autogen.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 autogen.sh diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 -- 1.8.5.4 From 2d7d2790e9ee577a29e6daa92b7e2ffdd5f111bd Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Fri, 14 Feb 2014 15:52:08 +0100 Subject: [PATCH 2/3] Add another missing #include <array> --- src/schwanenlied/crypto/hkdf_sha256_test.cc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/schwanenlied/crypto/hkdf_sha256_test.cc b/src/schwanenlied/crypto/hkdf_sha256_test.cc index 31c6b34..90d54de 100644 --- a/src/schwanenlied/crypto/hkdf_sha256_test.cc +++ b/src/schwanenlied/crypto/hkdf_sha256_test.cc @@ -25,6 +25,8 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <array> + #include "schwanenlied/crypto/hkdf_sha256.h" #include "gtest/gtest.h" -- 1.8.5.4 From 9a2995c1a157185e32be23f82480a04b296a0fb7 Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Fri, 14 Feb 2014 15:56:13 +0100 Subject: [PATCH 3/3] Hide some pragmas clang complaints about Workaround for: src/gtest/gtest-all.cc:7922:34: error: unknown warning group '-Wunused-const-variable', ignored [-Werror,-Wunknown-pragmas] ^ 1 error generated. --- src/gtest/gtest-all.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gtest/gtest-all.cc b/src/gtest/gtest-all.cc index ca74d15..1d54b60 100644 --- a/src/gtest/gtest-all.cc +++ b/src/gtest/gtest-all.cc @@ -7917,14 +7917,14 @@ const DWORD kInvalidFileAttributes = 0xffffffff; const char kCurrentDirectoryString[] = ".\\"; # endif // GTEST_OS_WINDOWS_MOBILE #else -#ifdef __clang__ +#if 0 #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wunused-const-variable" #endif const char kPathSeparator = '/'; const char kPathSeparatorString[] = "/"; const char kCurrentDirectoryString[] = "./"; -#ifdef __clang__ +#if 0 #pragma clang diagnostic pop #endif #endif // GTEST_OS_WINDOWS -- 1.8.5.4
From 752fe691f0fe7367878b7efb75ed427d4dfb56df Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Thu, 13 Feb 2014 11:51:16 +0100 Subject: [PATCH 1/3] Spell 'environment' correctly --- README | 2 +- tests/ptcfg_test.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README b/README index 1dc8819..693ef70 100644 --- a/README +++ b/README @@ -28,7 +28,7 @@ Notes: Known gotchas: * allium_ptcfg_state_dir()/allium_ptcfg_auth_cookie_file() will probably misbehave if the paths are non-ASCII. This behavior is not considered a bug - as enviornment variable values are NULL terminated by definition (See IEEE + as environment variable values are NULL terminated by definition (See IEEE Std. 1003.1 8.1). * liballium is slightly more strict than pt-spec.txt for the contents of PTCFG_SERVER_TRANSPORT_OPTIONS. In particular, the "k" string is not diff --git a/tests/ptcfg_test.c b/tests/ptcfg_test.c index f5ba2cf..b3e4e9b 100644 --- a/tests/ptcfg_test.c +++ b/tests/ptcfg_test.c @@ -196,7 +196,7 @@ ptcfg_init_client_test(void) clearenv(); - /* Setup basic valid enviornment variables */ + /* Setup basic valid environment variables */ putenv("TOR_PT_MANAGED_TRANSPORT_VER=1"); putenv("TOR_PT_STATE_LOCATION=/tmp/my_sexy_pt"); @@ -237,7 +237,7 @@ ptcfg_init_server_test(void) clearenv(); - /* Setup basic valid enviornment variables */ + /* Setup basic valid environment variables */ ptcfg_test_server(); /* Empty server transport */ -- 1.8.5.4 From d6f4f874f0cde76259dc46d447e6fb89cc12c9b2 Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Thu, 13 Feb 2014 12:02:35 +0100 Subject: [PATCH 2/3] Include <netinet/in.h> for INET6_ADDRSTRLEN --- src/allium_ptcfg.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/allium_ptcfg.c b/src/allium_ptcfg.c index 9ac9b71..e121b12 100644 --- a/src/allium_ptcfg.c +++ b/src/allium_ptcfg.c @@ -25,6 +25,7 @@ * POSSIBILITY OF SUCH DAMAGE. */ +#include <netinet/in.h> #include <stdio.h> #include <stdlib.h> #include <string.h> -- 1.8.5.4 From 50b98434fb66224da9e781afeaca050b1f01cfc2 Mon Sep 17 00:00:00 2001 From: Fabian Keil <fk@xxxxxxxxxxxxx> Date: Fri, 14 Feb 2014 14:27:22 +0100 Subject: [PATCH 3/3] Make autogen.sh executable --- autogen.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 autogen.sh diff --git a/autogen.sh b/autogen.sh old mode 100644 new mode 100755 -- 1.8.5.4
Attachment:
signature.asc
Description: PGP signature
_______________________________________________ tor-dev mailing list tor-dev@xxxxxxxxxxxxxxxxxxxx https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-dev