diff --git a/CHANGELOG b/CHANGELOG index 8656f22..d438ec0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +2017-09-29 + + - A few fixes to code and README + 2017-09-28 - Add support for Q041; drop support for Q040 diff --git a/CMakeLists.txt b/CMakeLists.txt index 286e0a8..e2a9b07 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,6 +48,10 @@ ELSE() #SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -DLSQUIC_LOWEST_LOG_LEVEL=LSQ_LOG_INFO") ENDIF() +IF(LSQUIC_PROFILE EQUAL 1) + SET(MY_CMAKE_FLAGS "${MY_CMAKE_FLAGS} -g -pg") +ENDIF() + IF(MY_CMAKE_FLAGS MATCHES "fsanitize=address") MESSAGE(STATUS "AddressSanitizer is ON") ELSE() diff --git a/README.md b/README.md index 23857ae..629b8e4 100644 --- a/README.md +++ b/README.md @@ -47,7 +47,7 @@ cd boringssl 2. Check out stable branch: ``` -git co chromium-stable +git checkout chromium-stable ``` 3. Compile the library @@ -71,8 +71,8 @@ To install these in `/usr/local/lib`, you should do the following: ``` BORINGSSL_SOURCE=$PWD cd /usr/local/lib -sudo cp $BORINGSSL_SOURCE/ssl/libssl.a -sudo cp $BORINGSSL_SOURCE/crypto/libcrypto.a +sudo cp $BORINGSSL_SOURCE/ssl/libssl.a . +sudo cp $BORINGSSL_SOURCE/crypto/libcrypto.a . ``` If you do not want to install the library (or do not have root), you @@ -92,13 +92,23 @@ Building LSQUIC Client Library LSQUIC's `http_client` and the tests link BoringSSL libraries statically. Following previous section, you can build LSQUIC as follows: +1. Get the source code + +``` +git clone https://github.com/litespeedtech/lsquic-client.git +cd lsquic-client +``` + +2. Compile the library + + ``` cmake -DBORINGSSL_INCLUDE=$BORINGSSL_SOURCE/include \ -DBORINGSSL_LIB=$HOME/tmp/boringssl-libs . make ``` -Run tests: +3. Run tests ``` make test diff --git a/src/liblsquic/lsquic_crypto.c b/src/liblsquic/lsquic_crypto.c index 4d6eb5b..44014e8 100644 --- a/src/liblsquic/lsquic_crypto.c +++ b/src/liblsquic/lsquic_crypto.c @@ -664,14 +664,14 @@ int verify_prof0(const uint8_t *chlo_data, size_t chlo_data_len, } -void crypto_init(void *seed, int seed_len) +void crypto_init(void) { if (crypto_inited) return ; //SSL_library_init(); CRYPTO_library_init(); - RAND_seed(seed, seed_len); + /* XXX Should we seed? If yes, wherewith? */ // RAND_seed(seed, seed_len); #if defined( __x86_64 )||defined( __x86_64__ ) make_uint128(&s_prime, 16777216, 315); diff --git a/src/liblsquic/lsquic_crypto.h b/src/liblsquic/lsquic_crypto.h index b15454b..264cf02 100644 --- a/src/liblsquic/lsquic_crypto.h +++ b/src/liblsquic/lsquic_crypto.h @@ -25,7 +25,7 @@ struct lsquic_str; #endif -void crypto_init(); +void crypto_init(void); /* XXX: why have a wrapper around RAND_bytes? */ void rand_bytes(void *data, int len);