Hello all,
For a few reasons I thought it would be useful to have an obfs3 client implementation that did not depend on python (primarily systems where building python is non-trivial, think cellphones).
The end result is https://github.com/yawning/obfsclient
It passes what little basic functionality testing I've done (I can browse the web with it), but could use another set of eyes on the code.
Caveats: * The build process kind of sucks, since it starts off with "Edit the CMakeLists.txt". * liballium doesn't have a install target since I didn't get around to it, adding a bit more pain to the build process.
Thanks in advance,
obfsclient (https://github.com/yawning/obfsclient) now also supports the latest and greatest in pluggable transport technology in the form of ScrambleSuit.
All 3 transports pass the "Can I watch youtube over it" test.
My current TODO for this project is roughly: * Finish implementing the optional parts of ScrambleSuit that I skipped * Clean up the code * Clean up the build system * Add debug logging for people that don't want to attach a debugger to it when it breaks.
Comments, Questions, Feedback appreciated!
Yawning Angel yawning@schwanenlied.me wrote:
obfsclient (https://github.com/yawning/obfsclient) now also supports the latest and greatest in pluggable transport technology in the form of ScrambleSuit.
All 3 transports pass the "Can I watch youtube over it" test.
[...]
Comments, Questions, Feedback appreciated!
Trying to build it on FreeBSD 11.0-CURRENT I get (after a couple of other issues):
fk@r500 ~/git/obfsclient $make obfsclient [ 91%] Built target obfsclient_lib [100%] Building CXX object src/CMakeFiles/obfsclient.dir/main.cc.o In file included from /home/fk/git/obfsclient/src/main.cc:49: /home/fk/git/obfsclient/src/schwanenlied/pt/scramblesuit/client.h:145: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; ^ 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: cannot initialize return object of type 'Socks5Server::Session *' with an rvalue of type 'schwanenlied::pt::scramblesuit::Client *' return new Client(base, sock, addr, addr_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.
Any ideas?
Fabian
On Thu, 13 Feb 2014 14:06:39 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
Trying to build it on FreeBSD 11.0-CURRENT I get (after a couple of other issues):
FreeBSD has Clang as the default compiler right? I've been using GCC for development, sorry, I should have tested both.
fk@r500 ~/git/obfsclient $make obfsclient [ 91%] Built target obfsclient_lib [100%] Building CXX object src/CMakeFiles/obfsclient.dir/main.cc.o In file included from /home/fk/git/obfsclient/src/main.cc:49: /home/fk/git/obfsclient/src/schwanenlied/pt/scramblesuit/client.h:145: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; ^ 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: cannot initialize return object of type 'Socks5Server::Session *' with an rvalue of type 'schwanenlied::pt::scramblesuit::Client *' return new Client(base, sock, addr, addr_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.
I've installed Clang, so I locally fixed all the other minor issues[0] you probably encountered but I didn't encounter the last error, I think I know why it's unhappy and believe it's fixed.
commit 581bb2ac42be529b7bb5f8617a3c362ac38e47f9 commit 218c86b501f897a6c6b6e0bd14bde9ada5488b5d commit 594caa7f36ae9f5a465324eda983b70c6289fcfb <- master
Please let me know if it's still broken/if I've missed anything.
Yawning Angel yawning@schwanenlied.me wrote:
On Thu, 13 Feb 2014 14:06:39 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
Trying to build it on FreeBSD 11.0-CURRENT I get (after a couple of other issues):
FreeBSD has Clang as the default compiler right?
Right. ATM, I'm using:
fk@r500 ~ $clang --version FreeBSD clang version 3.3 (tags/RELEASE_33/final 183502) 20130610 Target: x86_64-unknown-freebsd11.0 Thread model: posix
fk@r500 ~/git/obfsclient $make obfsclient [ 91%] Built target obfsclient_lib [100%] Building CXX object src/CMakeFiles/obfsclient.dir/main.cc.o In file included from /home/fk/git/obfsclient/src/main.cc:49: /home/fk/git/obfsclient/src/schwanenlied/pt/scramblesuit/client.h:145: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; ^ 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: cannot initialize return object of type 'Socks5Server::Session *' with an rvalue of type 'schwanenlied::pt::scramblesuit::Client *' return new Client(base, sock, addr, addr_len); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated.
I've installed Clang, so I locally fixed all the other minor issues[0] you probably encountered but I didn't encounter the last error, I think I know why it's unhappy and believe it's fixed.
commit 581bb2ac42be529b7bb5f8617a3c362ac38e47f9 commit 218c86b501f897a6c6b6e0bd14bde9ada5488b5d commit 594caa7f36ae9f5a465324eda983b70c6289fcfb <- master
Thanks. On FreeBSD, I also had to include <netinet/in.h> to prevent:
/home/fk/git/obfsclient/src/schwanenlied/socks5_server.h:359:22: error: field has incomplete type 'struct sockaddr_in' struct sockaddr_in listener_addr_; /**< The SOCKS server socket address */ ^ /home/fk/git/obfsclient/src/schwanenlied/socks5_server.h:327:26: note: forward declaration of 'schwanenlied::sockaddr_in' const bool addr(struct sockaddr_in& addr) const; ^ /home/fk/git/obfsclient/src/schwanenlied/pt/obfs2/client.cc:90:19: error: use of undeclared identifier 'htonl' pad_hdr.at(0) = htonl(kMagicValue); ^ /home/fk/git/obfsclient/src/schwanenlied/pt/obfs2/client.cc:91:19: error: use of undeclared identifier 'htonl' pad_hdr.at(1) = htonl(padlen); ^ /home/fk/git/obfsclient/src/schwanenlied/pt/obfs2/client.cc:185:9: error: use of undeclared identifier 'ntohl' if (ntohl(pad_hdr.at(0)) != kMagicValue) ^ /home/fk/git/obfsclient/src/schwanenlied/pt/obfs2/client.cc:187:21: error: use of undeclared identifier 'ntohl' resp_pad_len_ = ntohl(pad_hdr.at(1)); ^ 5 errors generated.
Patch attached. Maybe client.cc should get its own #include, though.
Please let me know if it's still broken/if I've missed anything.
The problem still exists:
fk@r500 ~/git/obfsclient $make obfsclient [ 8%] Building CXX object src/CMakeFiles/obfsclient_lib.dir/schwanenlied/crypto/base32.cc.o [...] [ 91%] Building CXX object src/CMakeFiles/obfsclient_lib.dir/schwanenlied/socks5_server.cc.o Linking CXX static library libobfsclient_lib.a [ 91%] Built target obfsclient_lib [100%] Building CXX object src/CMakeFiles/obfsclient.dir/main.cc.o In file included 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; ^ 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_castSocks5Server::Session*(new Client(base, sock, addr, ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 2 errors generated. *** Error code 1 [...]
Fabian
On Fri, 14 Feb 2014 12:00:40 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
Patch attached. Maybe client.cc should get its own #include, though.
Merged, it's fine to include there since some of the pts also use the endian conversion macros.
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.
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_castSocks5Server::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. If it works, I'll merge the change.
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.
Apologies in advance for the inconvenience, and thanks for the changes and your patience.
Yawning Angel yawning@schwanenlied.me wrote:
On Fri, 14 Feb 2014 12:00:40 +0100 Fabian Keil freebsd-listen@fabiankeil.de 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_castSocks5Server::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
On Fri, 14 Feb 2014 16:43:00 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
Yawning Angel yawning@schwanenlied.me wrote: It's already fixed in 1e25c55ba54 without the patch.
Yay.
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.
I'll merge them, thanks!
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.
Hmm. It should have suppressed the warning that caused build failure, but since my use of gtest never uses those, I'll just go with "#if 0"ing it out.
./obfsclient_test dumps 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 16ul> >schwanenlied::crypto::AesTest_CtrAes128_SP800_38A_Test::TestBody()::vectors+1 16ul> >"\301\276\342.@\237\226\351=~\021s\223\027*\207Ma\221\266 16ul> >\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", 16ul> >len=<optimized out>, out=<optimized out>) 16ul> >at ./src/schwanenlied/crypto/ctr.h:165 165 *out++ 16ul> >= (*buf++)^ block_[offset_]; (gdb) p offset_ $1 = 11330806256049838041
What the. Ok. I'll look at that, though it is a "this should never happen" sort of situation. I think I'll end up setting up a FreeBSD VM since my FreeBSD box is on 9.1p10.
I didn't look into this or test obfsclient yet, but intend to do so in the next couple of days.
If the test case is failing, it will probably dump core unfortunately. I'll look into it as well.
Thanks for the assistance and patches!
On Fri, 14 Feb 2014 16:17:59 +0000 Yawning Angel yawning@schwanenlied.me wrote:
What the. Ok. I'll look at that, though it is a "this should never happen" sort of situation. I think I'll end up setting up a FreeBSD VM since my FreeBSD box is on 9.1p10.
Fixed in commit 600af0991cd3ec66d45399a9496186ae58ab7ace
The unit tests passes on my 10.0-RELEASE VM. I'm going to install tor on the box shortly and give obfsclient a whirl.
Yawning Angel yawning@schwanenlied.me wrote:
On Fri, 14 Feb 2014 16:17:59 +0000 Yawning Angel yawning@schwanenlied.me wrote:
What the. Ok. I'll look at that, though it is a "this should never happen" sort of situation. I think I'll end up setting up a FreeBSD VM since my FreeBSD box is on 9.1p10.
Fixed in commit 600af0991cd3ec66d45399a9496186ae58ab7ace
Awesome. FreeBSD ports are in progress ...
Fabian
Fabian Keil freebsd-listen@fabiankeil.de wrote:
Yawning Angel yawning@schwanenlied.me wrote:
On Fri, 14 Feb 2014 16:17:59 +0000 Yawning Angel yawning@schwanenlied.me wrote:
What the. Ok. I'll look at that, though it is a "this should never happen" sort of situation. I think I'll end up setting up a FreeBSD VM since my FreeBSD box is on 9.1p10.
Fixed in commit 600af0991cd3ec66d45399a9496186ae58ab7ace
Awesome. FreeBSD ports are in progress ...
What I have so far is: http://www.fabiankeil.de/sourcecode/freebsd/liballium-0.0.1.shar http://www.fabiankeil.de/sourcecode/freebsd/obfsclient-0.0.1.shar
obfsclient seems to build on platforms that use clang to fulfil the c++11-lib dependency, but if gcc47 is used the build fails: https://redports.org/~fk/20140217105018-69178-176436/obfsclient-0.0.1.log
I attached a couple of patches that seem to help, but I ran out of time for now and there are still a bunch of errors left, for example: #### --- src/schwanenlied/pt/scramblesuit/obfsclient-uniform_dh_handshake.o --- src/schwanenlied/pt/scramblesuit/uniform_dh_handshake.cc: In member function 'bool schwanenlied::pt::scramblesuit::UniformDHHandshake::send_handshake_msg(bufferevent*)': src/schwanenlied/pt/scramblesuit/uniform_dh_handshake.cc:102:17: error: 'to_string' is not a member of 'std' *** [src/schwanenlied/pt/scramblesuit/obfsclient-uniform_dh_handshake.o] Error code 1 ####
Were you able to build it on your FreeBSD 9.1p10 system using gcc?
Fabian
On Mon, 17 Feb 2014 15:39:07 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
Were you able to build it on your FreeBSD 9.1p10 system using gcc?
Not yet, I've been working on adding support for logging.
I will address the GCC build issues when I'm done working on that. The system gcc on 9.1p10 is ancient (4.2.1), and does not support C++11, so I would have to install gcc from ports.
I have somewhat mixed feelings about working around compiler bugs[0], but as of this date, gcc 4.7.x is probably still far too common to not support. Anything earlier than that start to run into more C++11 compliance problems.
Looking at the rest of the log:
* 'to_string' is not a member of 'std'
-> the file needs #include <string>
* invalid operands of types 'int' and 'void' to binary 'operator!='
-> OpenSSL changed the function prototypes for the hmac routines.
The code is correct for modern OpenSSL, but it looks like FreeBSD-9.2 ships with 0.9.x. I'll add a bunch of #ifdefs to do the right thing.)
Looking at the patches:
* Patch 1 tramples over my most recent change to main.cc, will fix when merging.
* Instead of errno.h, cerrno is more appropriate, the constants should use the std namespace ones as well, will fix when merging.
Thanks again for the patches,
On Mon, 17 Feb 2014 19:34:36 +0000 Yawning Angel yawning@schwanenlied.me wrote:
I will address the GCC build issues when I'm done working on that. The system gcc on 9.1p10 is ancient (4.2.1), and does not support C++11, so I would have to install gcc from ports.
I haven't installed gcc on my FreeBSD 9 box (or setup a 9.2 VM), but with gcc47 from ports, it builds on FreeBSD 10 with tip of tree. I'm fairly sure I put the correct ifdefs in to handle the older OpenSSL interface as well, so I don't anticipate further problems.
Relevant changes: * Logging was broken -> 6de5dbdb283da9afb0ba0020c17254945821f88e * "<::" lexer bug -> 9b0dbf0197f0fa3e3ff991202bf0977452c3d000 * std::to_string missing -> 1fe7ad18d0bfac52418e2991511bb2aaa6abc9bf * added casts -> 2a84ce036121f959ba553076986b248c2a873e47 * OpenSSL interface -> 39e1dd27000b6aecb074c55afaafab58b86e933a
Note: The logging library I'm using supposedly ICEs with gcc 4.6, and I'm not overly inclined to support anything pre-4.7.x.
The OpenSSL interface change is current master.
I'm not sure if I'm quite ready to tag this as 0.0.1 yet, I kind of want to add the optional ScrambleSuit features that I skipped, but since the pt isn't quite production yet (any day now), maybe it's ok.
Regards,
Yawning Angel yawning@schwanenlied.me wrote:
On Mon, 17 Feb 2014 19:34:36 +0000 Yawning Angel yawning@schwanenlied.me wrote:
I will address the GCC build issues when I'm done working on that. The system gcc on 9.1p10 is ancient (4.2.1), and does not support C++11, so I would have to install gcc from ports.
I haven't installed gcc on my FreeBSD 9 box (or setup a 9.2 VM), but with gcc47 from ports, it builds on FreeBSD 10 with tip of tree. I'm fairly sure I put the correct ifdefs in to handle the older OpenSSL interface as well, so I don't anticipate further problems.
It also builds on 9.2 and 8.4 now: https://redports.org/buildarchive/20140218142926-87456/ (The failures on EXP1 and QATty are unrelated)
Note: The logging library I'm using supposedly ICEs with gcc 4.6, and I'm not overly inclined to support anything pre-4.7.x.
That's fine with me.
Fabian
On Wed, 19 Feb 2014 13:52:01 +0100 Fabian Keil freebsd-listen@fabiankeil.de wrote:
It also builds on 9.2 and 8.4 now: https://redports.org/buildarchive/20140218142926-87456/ (The failures on EXP1 and QATty are unrelated)
Looks like the tests are SIGSEGVing on 9.2/8.4, I replicated the issue, and pushed a fix (7f123275d95ed8a95f15c0a75bd4e9ca241bee93).
On my 9.2-RELEASE vm, the tests and obfsclient binary run now, and I made sure it still builds on the 10.0-RELEASE vm.
Regards,