Loading CMakeLists.txt +1 −1 Changes for CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,8 +9,8 @@ set (BLOCKSIZE 16384 CACHE STRING "Block size from Network Packages") include(CheckIncludeFileCXX) find_package(libnetplus REQUIRED) find_package(libcryptplus REQUIRED) find_package(libcmdplus REQUIRED) find_package(MbedTLS REQUIRED) SET(CMAKE_CXX_FLAGS "-fPIC -Wall") Loading src/CMakeLists.txt +3 −2 Changes for src/CMakeLists.txt: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ set(libhttpSrcs ) include_directories( ${MbedTLS_INCLUDE_DIRS} ${systempp_INCLUDE_DIR} ) Loading @@ -21,8 +22,8 @@ add_library(httppp-static STATIC ${libhttpSrcs} ) generate_export_header(httppp) target_link_libraries(httppp ${OPENSSL_LIBRARIES} netplus cmdplus cryptplus) target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} netplus cmdplus cryptplus) target_link_libraries(httppp MbedTLS::mbedcrypto netplus cmdplus) target_link_libraries(httppp-static MbedTLS::mbedcrypto netplus cmdplus) SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") Loading src/http.cpp +5 −5 Changes for src/http.cpp: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "exception.h" #include <cryptplus/cryptplus.h> #include <mbedtls/base64.h> #include <netplus/connection.h> #include <netplus/exception.h> Loading Loading @@ -1408,11 +1408,11 @@ void libhttppp::HttpAuth::parse(libhttppp::HttpRequest* curreq){ switch(_Authtype){ case BASICAUTH:{ size_t base64strsize=strlen(authstr+6); char *base64str=new char[base64strsize+1]; unsigned char *base64str=new char unsigned[base64strsize+1]; memcpy(base64str,authstr+6,strlen(authstr)-5); cryptplus::base64 hbase64; char *clearstr=new char[hbase64.Decodelen(base64str)]; size_t cleargetlen=hbase64.Decode(clearstr,base64str); char *clearstr= new char[(base64strsize/4)*3]; size_t cleargetlen; mbedtls_base64_decode((unsigned char*)clearstr,((base64strsize/4)*3),&cleargetlen,base64str,base64strsize); delete[] base64str; for(size_t clearpos=0; clearpos<cleargetlen; clearpos++){ if(clearstr[clearpos]==':'){ Loading test/CMakeLists.txt +1 −1 Changes for test/CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,6 +6,6 @@ add_executable(connection_test connection_test.cpp ) target_link_libraries (connection_test httppp-static netplus cryptplus) target_link_libraries (connection_test httppp-static) add_test(connection_test connection_test) Loading
CMakeLists.txt +1 −1 Changes for CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -9,8 +9,8 @@ set (BLOCKSIZE 16384 CACHE STRING "Block size from Network Packages") include(CheckIncludeFileCXX) find_package(libnetplus REQUIRED) find_package(libcryptplus REQUIRED) find_package(libcmdplus REQUIRED) find_package(MbedTLS REQUIRED) SET(CMAKE_CXX_FLAGS "-fPIC -Wall") Loading
src/CMakeLists.txt +3 −2 Changes for src/CMakeLists.txt: 3 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -10,6 +10,7 @@ set(libhttpSrcs ) include_directories( ${MbedTLS_INCLUDE_DIRS} ${systempp_INCLUDE_DIR} ) Loading @@ -21,8 +22,8 @@ add_library(httppp-static STATIC ${libhttpSrcs} ) generate_export_header(httppp) target_link_libraries(httppp ${OPENSSL_LIBRARIES} netplus cmdplus cryptplus) target_link_libraries(httppp-static ${OPENSSL_LIBRARIES} netplus cmdplus cryptplus) target_link_libraries(httppp MbedTLS::mbedcrypto netplus cmdplus) target_link_libraries(httppp-static MbedTLS::mbedcrypto netplus cmdplus) SET(CMAKE_INSTALL_LIBDIR lib CACHE PATH "Output directory for libraries") Loading
src/http.cpp +5 −5 Changes for src/http.cpp: 5 added lines, 5 removed lines. Original line number Diff line number Diff line Loading @@ -36,7 +36,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include "exception.h" #include <cryptplus/cryptplus.h> #include <mbedtls/base64.h> #include <netplus/connection.h> #include <netplus/exception.h> Loading Loading @@ -1408,11 +1408,11 @@ void libhttppp::HttpAuth::parse(libhttppp::HttpRequest* curreq){ switch(_Authtype){ case BASICAUTH:{ size_t base64strsize=strlen(authstr+6); char *base64str=new char[base64strsize+1]; unsigned char *base64str=new char unsigned[base64strsize+1]; memcpy(base64str,authstr+6,strlen(authstr)-5); cryptplus::base64 hbase64; char *clearstr=new char[hbase64.Decodelen(base64str)]; size_t cleargetlen=hbase64.Decode(clearstr,base64str); char *clearstr= new char[(base64strsize/4)*3]; size_t cleargetlen; mbedtls_base64_decode((unsigned char*)clearstr,((base64strsize/4)*3),&cleargetlen,base64str,base64strsize); delete[] base64str; for(size_t clearpos=0; clearpos<cleargetlen; clearpos++){ if(clearstr[clearpos]==':'){ Loading
test/CMakeLists.txt +1 −1 Changes for test/CMakeLists.txt: 1 added line, 1 removed line. Original line number Diff line number Diff line Loading @@ -6,6 +6,6 @@ add_executable(connection_test connection_test.cpp ) target_link_libraries (connection_test httppp-static netplus cryptplus) target_link_libraries (connection_test httppp-static) add_test(connection_test connection_test)