Feature/ws windows (#86)

* try to build ws on window on travis 📮

* cmake invocation fixed on windows 🐝

* Can use mbedtls to calculate hmac + no openssl config option

* build only windows on travis 🕢

* run msbuild 💷

* proper command to build 🕛

* some build fixes

* change weird sizeof call 🐙

* warning and missing includes fixes 💮

* ifdef out statsd code on windows 🐍

* logic invertion in ifdef 👄

* bring back makefile 📜

* command line tool is built with mbedtls 🏥
This commit is contained in:
Benjamin Sergeant 2019-06-02 20:46:20 -07:00 committed by GitHub
parent 88c8fb74bb
commit 396d0d9bdc
19 changed files with 3716 additions and 1693 deletions

View File

@ -12,23 +12,23 @@ matrix:
- python test/run.py
- make ws
# Linux
- os: linux
dist: xenial
script:
- python test/run.py
- make ws
env:
- CC=gcc
- CXX=g++
# Clang + Linux disabled for now
# # Linux
# - os: linux
# dist: xenial
# script: python test/run.py
# script:
# - python test/run.py
# - make ws
# env:
# - CC=clang
# - CXX=clang++
# - CC=gcc
# - CXX=g++
# Clang + Linux disabled for now
- os: linux
dist: xenial
script: python test/run.py
env:
- CC=clang
- CXX=clang++
# Windows
- os: windows
@ -36,4 +36,6 @@ matrix:
- CMAKE_PATH="/c/Program Files/CMake/bin"
script:
- export PATH=$CMAKE_PATH:$PATH
- cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .
- cmake --build --parallel .
- python test/run.py

View File

@ -124,7 +124,7 @@ add_library( ixwebsocket STATIC
${IXWEBSOCKET_HEADERS}
)
if (APPLE AND USE_TLS)
if (APPLE AND USE_TLS AND NOT USE_MBED_TLS)
target_link_libraries(ixwebsocket "-framework foundation" "-framework security")
endif()

View File

@ -29,5 +29,15 @@ services:
networks:
- ws-net
statsd:
image: jaconel/statsd
ports:
- "8125:8125"
environment:
- STATSD_DUMP_MSG=true
- GRAPHITE_HOST=127.0.0.1
networks:
- ws-net
networks:
ws-net:

View File

@ -272,10 +272,10 @@ namespace ix
log(oss.str(), args);
}
payload.reserve(payload.size() + chunkSize);
payload.reserve(payload.size() + (size_t) chunkSize);
// Read a chunk
auto chunkResult = _socket->readBytes(chunkSize,
auto chunkResult = _socket->readBytes((size_t) chunkSize,
args.onProgressCallback,
isCancellationRequested);
if (!chunkResult.first)

View File

@ -12,7 +12,7 @@ brew:
mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; make -j install)
ws:
mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 .. ; make -j)
mkdir -p build && (cd build ; cmake -DUSE_TLS=1 -DUSE_WS=1 -DUSE_MBED_TLS=1 .. ; make -j)
uninstall:
xargs rm -fv < build/install_manifest.txt

View File

@ -7,32 +7,32 @@
// //////////////////////////////////////////////////////////////////////
/*
The JsonCpp library's source code, including accompanying documentation,
The JsonCpp library's source code, including accompanying documentation,
tests and demonstration applications, are licensed under the following
conditions...
Baptiste Lepilleur and The JsonCpp Authors explicitly disclaim copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
The author (Baptiste Lepilleur) explicitly disclaims copyright in all
jurisdictions which recognize such a disclaimer. In such jurisdictions,
this software is released into the Public Domain.
In jurisdictions which do not recognize Public Domain property (e.g. Germany as of
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur and
The JsonCpp Authors, and is released under the terms of the MIT License (see below).
2010), this software is Copyright (c) 2007-2010 by Baptiste Lepilleur, and is
released under the terms of the MIT License (see below).
In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
In jurisdictions which recognize Public Domain property, the user of this
software may choose to accept it either as 1) Public Domain, 2) under the
conditions of the MIT License (see below), or 3) under the terms of dual
Public Domain/MIT License conditions described here, as they choose.
The MIT License is about as close to Public Domain as a license can get, and is
described in clear, concise terms at:
http://en.wikipedia.org/wiki/MIT_License
The full text of the MIT License follows:
========================================================================
Copyright (c) 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
Copyright (c) 2007-2010 Baptiste Lepilleur
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
@ -83,16 +83,13 @@ license you like.
// Beginning of content of file: include/json/config.h
// //////////////////////////////////////////////////////////////////////
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
// Copyright 2007-2010 Baptiste Lepilleur
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
#ifndef JSON_CONFIG_H_INCLUDED
#define JSON_CONFIG_H_INCLUDED
#include <stddef.h>
#include <string> //typedef String
#include <stdint.h> //typedef int64_t, uint64_t
/// If defined, indicates that json library is embedded in CppTL library.
//# define JSON_IN_CPPTL 1
@ -125,12 +122,12 @@ license you like.
#ifdef JSON_IN_CPPTL
#define JSON_API CPPTL_API
#elif defined(JSON_DLL_BUILD)
#if defined(_MSC_VER) || defined(__MINGW32__)
#if defined(_MSC_VER)
#define JSON_API __declspec(dllexport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
#elif defined(JSON_DLL)
#if defined(_MSC_VER) || defined(__MINGW32__)
#if defined(_MSC_VER)
#define JSON_API __declspec(dllimport)
#define JSONCPP_DISABLE_DLL_INTERFACE_WARNING
#endif // if defined(_MSC_VER)
@ -139,101 +136,49 @@ license you like.
#define JSON_API
#endif
#if !defined(JSON_HAS_UNIQUE_PTR)
#if __cplusplus >= 201103L
#define JSON_HAS_UNIQUE_PTR (1)
#elif _MSC_VER >= 1600
#define JSON_HAS_UNIQUE_PTR (1)
#else
#define JSON_HAS_UNIQUE_PTR (0)
#endif
#endif
// If JSON_NO_INT64 is defined, then Json only support C++ "int" type for
// integer
// Storages, and 64 bits integer support is disabled.
// #define JSON_NO_INT64 1
#if defined(_MSC_VER) // MSVC
# if _MSC_VER <= 1200 // MSVC 6
// Microsoft Visual Studio 6 only support conversion from __int64 to double
// (no conversion from unsigned __int64).
# define JSON_USE_INT64_DOUBLE_CONVERSION 1
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
// characters in the debug information)
// All projects I've ever seen with VS6 were using this globally (not bothering
// with pragma push/pop).
# pragma warning(disable : 4786)
# endif // MSVC 6
#if defined(_MSC_VER) && _MSC_VER <= 1200 // MSVC 6
// Microsoft Visual Studio 6 only support conversion from __int64 to double
// (no conversion from unsigned __int64).
#define JSON_USE_INT64_DOUBLE_CONVERSION 1
// Disable warning 4786 for VS6 caused by STL (identifier was truncated to '255'
// characters in the debug information)
// All projects I've ever seen with VS6 were using this globally (not bothering
// with pragma push/pop).
#pragma warning(disable : 4786)
#endif // if defined(_MSC_VER) && _MSC_VER < 1200 // MSVC 6
# if _MSC_VER >= 1500 // MSVC 2008
/// Indicates that the following function is deprecated.
# define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
# endif
#endif // defined(_MSC_VER)
// In c++11 the override keyword allows you to explicity define that a function
// is intended to override the base-class version. This makes the code more
// managable and fixes a set of common hard-to-find bugs.
#if __cplusplus >= 201103L
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT noexcept
#elif defined(_MSC_VER) && _MSC_VER > 1600 && _MSC_VER < 1900
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT throw()
#elif defined(_MSC_VER) && _MSC_VER >= 1900
# define JSONCPP_OVERRIDE override
# define JSONCPP_NOEXCEPT noexcept
#else
# define JSONCPP_OVERRIDE
# define JSONCPP_NOEXCEPT throw()
#if defined(_MSC_VER) && _MSC_VER >= 1500 // MSVC 2008
/// Indicates that the following function is deprecated.
#define JSONCPP_DEPRECATED(message) __declspec(deprecated(message))
#elif defined(__clang__) && defined(__has_feature)
#if __has_feature(attribute_deprecated_with_message)
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
#endif
#ifndef JSON_HAS_RVALUE_REFERENCES
#if defined(_MSC_VER) && _MSC_VER >= 1600 // MSVC >= 2010
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // MSVC >= 2010
#ifdef __clang__
#if __has_feature(cxx_rvalue_references)
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // has_feature
#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
#if defined(__GXX_EXPERIMENTAL_CXX0X__) || (__cplusplus >= 201103L)
#define JSON_HAS_RVALUE_REFERENCES 1
#endif // GXX_EXPERIMENTAL
#endif // __clang__ || __GNUC__
#endif // not defined JSON_HAS_RVALUE_REFERENCES
#ifndef JSON_HAS_RVALUE_REFERENCES
#define JSON_HAS_RVALUE_REFERENCES 0
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
#define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
#elif defined(__GNUC__) && (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
#define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
#endif
#ifdef __clang__
# if __has_extension(attribute_deprecated_with_message)
# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
# endif
#elif defined __GNUC__ // not clang (gcc comes later since clang emulates gcc)
# if (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5))
# define JSONCPP_DEPRECATED(message) __attribute__ ((deprecated(message)))
# elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1))
# define JSONCPP_DEPRECATED(message) __attribute__((__deprecated__))
# endif // GNUC version
#endif // __clang__ || __GNUC__
#if !defined(JSONCPP_DEPRECATED)
#define JSONCPP_DEPRECATED(message)
#endif // if !defined(JSONCPP_DEPRECATED)
#if __GNUC__ >= 6
# define JSON_USE_INT64_DOUBLE_CONVERSION 1
#endif
#if !defined(JSON_IS_AMALGAMATION)
# include "version.h"
# if JSONCPP_USING_SECURE_MEMORY
# include "allocator.h" //typedef Allocator
# endif
#endif // if !defined(JSON_IS_AMALGAMATION)
namespace Json {
typedef int Int;
typedef unsigned int UInt;
@ -247,26 +192,13 @@ typedef unsigned int LargestUInt;
typedef __int64 Int64;
typedef unsigned __int64 UInt64;
#else // if defined(_MSC_VER) // Other platforms, use long long
typedef int64_t Int64;
typedef uint64_t UInt64;
typedef long long int Int64;
typedef unsigned long long int UInt64;
#endif // if defined(_MSC_VER)
typedef Int64 LargestInt;
typedef UInt64 LargestUInt;
#define JSON_HAS_INT64
#endif // if defined(JSON_NO_INT64)
#if JSONCPP_USING_SECURE_MEMORY
#define JSONCPP_STRING std::basic_string<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_OSTRINGSTREAM std::basic_ostringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_OSTREAM std::basic_ostream<char, std::char_traits<char>>
#define JSONCPP_ISTRINGSTREAM std::basic_istringstream<char, std::char_traits<char>, Json::SecureAllocator<char> >
#define JSONCPP_ISTREAM std::istream
#else
#define JSONCPP_STRING std::string
#define JSONCPP_OSTRINGSTREAM std::ostringstream
#define JSONCPP_OSTREAM std::ostream
#define JSONCPP_ISTRINGSTREAM std::istringstream
#define JSONCPP_ISTREAM std::istream
#endif // if JSONCPP_USING_SECURE_MEMORY
} // end namespace Json
#endif // JSON_CONFIG_H_INCLUDED
@ -284,7 +216,7 @@ typedef UInt64 LargestUInt;
// Beginning of content of file: include/json/forwards.h
// //////////////////////////////////////////////////////////////////////
// Copyright 2007-2010 Baptiste Lepilleur and The JsonCpp Authors
// Copyright 2007-2010 Baptiste Lepilleur
// Distributed under MIT license, or public domain if desired and
// recognized in your jurisdiction.
// See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -1,140 +1,200 @@
# export the submodule flag so that crypto knows it's being built as a submodule
export USE_CRYPTO_SUBMODULE=1
DESTDIR=/usr/local
PREFIX=mbedtls_
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.12
.SILENT:
# Default target executed when no arguments are given to make.
default_target: all
.PHONY: all no_test programs lib tests install uninstall clean test check covtest lcov apidoc apidoc_clean
.PHONY : default_target
all: programs tests
$(MAKE) post_build
no_test: programs
programs: lib
$(MAKE) -C programs
lib:
$(MAKE) -C library
tests: lib
$(MAKE) -C tests
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests
ifndef WINDOWS
install: no_test
mkdir -p $(DESTDIR)/include/mbedtls
cp -rp include/mbedtls $(DESTDIR)/include
mkdir -p $(DESTDIR)/lib
cp -RP library/libmbedtls.* $(DESTDIR)/lib
cp -RP library/libmbedx509.* $(DESTDIR)/lib
mkdir -p $(DESTDIR)/include/psa
cp -rp crypto/include/psa $(DESTDIR)/include
cp -RP crypto/library/libmbedcrypto.* $(DESTDIR)/lib
mkdir -p $(DESTDIR)/bin
for p in programs/*/* ; do \
if [ -x $$p ] && [ ! -d $$p ] ; \
then \
f=$(PREFIX)`basename $$p` ; \
cp $$p $(DESTDIR)/bin/$$f ; \
fi \
done
uninstall:
rm -rf $(DESTDIR)/include/mbedtls
rm -f $(DESTDIR)/lib/libmbedtls.*
rm -f $(DESTDIR)/lib/libmbedx509.*
rm -f $(DESTDIR)/lib/libmbedcrypto.*
$(MAKE) -C crypto uninstall
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
for p in programs/*/* ; do \
if [ -x $$p ] && [ ! -d $$p ] ; \
then \
f=$(PREFIX)`basename $$p` ; \
rm -f $(DESTDIR)/bin/$$f ; \
fi \
done
endif
#=============================================================================
# Special targets provided by cmake.
WARNING_BORDER =*******************************************************\n
NULL_ENTROPY_WARN_L1=**** WARNING! MBEDTLS_TEST_NULL_ENTROPY defined! ****\n
NULL_ENTROPY_WARN_L2=**** THIS BUILD HAS NO DEFINED ENTROPY SOURCES ****\n
NULL_ENTROPY_WARN_L3=**** AND IS *NOT* SUITABLE FOR PRODUCTION USE ****\n
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
NULL_ENTROPY_WARNING=\n$(WARNING_BORDER)$(NULL_ENTROPY_WARN_L1)$(NULL_ENTROPY_WARN_L2)$(NULL_ENTROPY_WARN_L3)$(WARNING_BORDER)
WARNING_BORDER_LONG =**********************************************************************************\n
CTR_DRBG_128_BIT_KEY_WARN_L1=**** WARNING! MBEDTLS_CTR_DRBG_USE_128_BIT_KEY defined! ****\n
CTR_DRBG_128_BIT_KEY_WARN_L2=**** Using 128-bit keys for CTR_DRBG limits the security of generated ****\n
CTR_DRBG_128_BIT_KEY_WARN_L3=**** keys and operations that use random values generated to 128-bit security ****\n
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
CTR_DRBG_128_BIT_KEY_WARNING=\n$(WARNING_BORDER_LONG)$(CTR_DRBG_128_BIT_KEY_WARN_L1)$(CTR_DRBG_128_BIT_KEY_WARN_L2)$(CTR_DRBG_128_BIT_KEY_WARN_L3)$(WARNING_BORDER_LONG)
.SUFFIXES: .hpux_make_needs_suffix_list
# Post build steps
post_build:
ifndef WINDOWS
# If 128-bit keys are configured for CTR_DRBG, display an appropriate warning
-scripts/config.pl get MBEDTLS_CTR_DRBG_USE_128_BIT_KEY && ([ $$? -eq 0 ]) && \
echo '$(CTR_DRBG_128_BIT_KEY_WARNING)'
# Suppress display of executed commands.
$(VERBOSE).SILENT:
# If NULL Entropy is configured, display an appropriate warning
-scripts/config.pl get MBEDTLS_TEST_NULL_ENTROPY && ([ $$? -eq 0 ]) && \
echo '$(NULL_ENTROPY_WARNING)'
endif
# A target that is always out of date.
cmake_force:
.PHONY : cmake_force
#=============================================================================
# Set environment variables for the build.
# The shell in which to execute make rules.
SHELL = /bin/sh
# The CMake executable.
CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake
# The command to remove a file.
RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f
# Escaping for special characters.
EQUALS = =
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket
#=============================================================================
# Targets provided globally by CMake.
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
# Special rule for the target install/local
install/local/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local/fast
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# The main all target
all: cmake_check_build_system
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/CMakeFiles/progress.marks
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/all
$(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
$(MAKE) -C library clean
$(MAKE) -C programs clean
$(MAKE) -C tests clean
$(MAKE) -C crypto clean
ifndef WINDOWS
find . \( -name \*.gcno -o -name \*.gcda -o -name \*.info \) -exec rm {} +
endif
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/clean
.PHONY : clean
check: lib tests
$(MAKE) -C tests check
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C crypto/tests check
# The main clean target
clean/fast: clean
test: check
.PHONY : clean/fast
ifndef WINDOWS
# note: for coverage testing, build with:
# make CFLAGS='--coverage -g3 -O0'
covtest:
$(MAKE) check
programs/test/selftest
tests/compat.sh
tests/ssl-opt.sh
# Prepare targets for installation.
preinstall: all
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall
.PHONY : preinstall
lcov:
rm -rf Coverage
lcov --capture --initial --directory library -o files.info
lcov --capture --directory library -o tests.info
lcov --add-tracefile files.info --add-tracefile tests.info -o all.info
lcov --remove all.info -o final.info '*.h'
gendesc tests/Descriptions.txt -o descriptions
genhtml --title "mbed TLS" --description-file descriptions --keep-descriptions --legend --no-branch-coverage -o Coverage final.info
rm -f files.info tests.info all.info final.info descriptions
# Prepare targets for installation.
preinstall/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/preinstall
.PHONY : preinstall/fast
apidoc:
mkdir -p apidoc
cd doxygen && doxygen mbedtls.doxyfile
# clear depends
depend:
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
apidoc_clean:
rm -rf apidoc
endif
# Convenience name for target.
third_party/mbedtls/CMakeFiles/apidoc.dir/rule:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/CMakeFiles/apidoc.dir/rule
.PHONY : third_party/mbedtls/CMakeFiles/apidoc.dir/rule
# Convenience name for target.
apidoc: third_party/mbedtls/CMakeFiles/apidoc.dir/rule
.PHONY : apidoc
# fast build rule for target.
apidoc/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/CMakeFiles/apidoc.dir/build.make third_party/mbedtls/CMakeFiles/apidoc.dir/build
.PHONY : apidoc/fast
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/local"
@echo "... install/strip"
@echo "... install"
@echo "... list_install_components"
@echo "... rebuild_cache"
@echo "... edit_cache"
@echo "... apidoc"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system
## Editor navigation files
C_SOURCE_FILES = $(wildcard include/*/*.h library/*.[hc] programs/*/*.[hc] tests/suites/*.function)
tags: $(C_SOURCE_FILES)
ctags -o $@ $(C_SOURCE_FILES)
TAGS: $(C_SOURCE_FILES)
etags -o $@ $(C_SOURCE_FILES)
GPATH GRTAGS GSYMS GTAGS: $(C_SOURCE_FILES)
ls $(C_SOURCE_FILES) | gtags -f - --gtagsconf .globalrc

File diff suppressed because it is too large Load Diff

View File

@ -1,163 +1,772 @@
# CMAKE generated file: DO NOT EDIT!
# Generated by "Unix Makefiles" Generator, CMake Version 3.12
# Also see "include/mbedtls/config.h"
# Default target executed when no arguments are given to make.
default_target: all
CFLAGS ?= -O2
WARNING_CFLAGS ?= -Wall -W -Wdeclaration-after-statement
LDFLAGS ?=
.PHONY : default_target
LOCAL_CFLAGS = $(WARNING_CFLAGS) -I../include -D_FILE_OFFSET_BITS=64
LOCAL_LDFLAGS =
ifdef DEBUG
LOCAL_CFLAGS += -g3
endif
# MicroBlaze specific options:
# CFLAGS += -mno-xl-soft-mul -mxl-barrel-shift
# To compile on Plan9:
# CFLAGS += -D_BSD_EXTENSION
# if were running on Windows build for Windows
ifdef WINDOWS
WINDOWS_BUILD=1
else ifeq ($(shell uname -s),Darwin)
ifeq ($(AR),ar)
APPLE_BUILD ?= 1
endif
endif
# To compile as a shared library:
ifdef SHARED
# all code is position-indep with mingw, avoid warning about useless flag
ifndef WINDOWS_BUILD
LOCAL_CFLAGS += -fPIC -fpic
endif
endif
SOEXT_TLS=so.12
SOEXT_X509=so.0
SOEXT_CRYPTO=so.3
# Set AR_DASH= (empty string) to use an ar implementation that does not accept
# the - prefix for command line options (e.g. llvm-ar)
AR_DASH ?= -
ARFLAGS = $(AR_DASH)src
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
ARFLAGS = $(AR_DASH)Src
RLFLAGS = -no_warning_for_no_symbols -c
RL ?= ranlib
endif
endif
DLEXT ?= so
ifdef WINDOWS_BUILD
# Windows shared library extension:
DLEXT = dll
else ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
# Mac OS X shared library extension:
DLEXT = dylib
endif
endif
# Allow only one "make -f Makefile2" at a time, but pass parallelism.
.NOTPARALLEL:
#=============================================================================
# Special targets provided by cmake.
# Look in crypto for libmbedcrypto.
LOCAL_LDFLAGS += -L../crypto/library
LOCAL_CFLAGS += -I../crypto/include
CRYPTO := ../crypto/library/
# Disable implicit rules so canonical targets will work.
.SUFFIXES:
OBJS_X509= certs.o pkcs11.o x509.o \
x509_create.o x509_crl.o x509_crt.o \
x509_csr.o x509write_crt.o x509write_csr.o
OBJS_TLS= debug.o net_sockets.o \
ssl_cache.o ssl_ciphersuites.o \
ssl_cli.o ssl_cookie.o \
ssl_srv.o ssl_ticket.o \
ssl_tls.o
# Remove some rules from gmake that .SUFFIXES does not remove.
SUFFIXES =
.SILENT:
.SUFFIXES: .hpux_make_needs_suffix_list
.PHONY: all static shared clean
ifndef SHARED
all: static
else
all: shared static
endif
# Suppress display of executed commands.
$(VERBOSE).SILENT:
static: libmbedcrypto.a libmbedx509.a libmbedtls.a
shared: libmbedcrypto.$(DLEXT) libmbedx509.$(DLEXT) libmbedtls.$(DLEXT)
# A target that is always out of date.
cmake_force:
# tls
libmbedtls.a: $(OBJS_TLS)
echo " AR $@"
$(AR) $(ARFLAGS) $@ $(OBJS_TLS)
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
echo " RL $@"
$(RL) $(RLFLAGS) $@
endif
endif
.PHONY : cmake_force
libmbedtls.$(SOEXT_TLS): $(OBJS_TLS) libmbedx509.so
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS)
#=============================================================================
# Set environment variables for the build.
libmbedtls.so: libmbedtls.$(SOEXT_TLS)
echo " LN $@ -> $<"
ln -sf $< $@
# The shell in which to execute make rules.
SHELL = /bin/sh
libmbedtls.dylib: $(OBJS_TLS) libmbedx509.dylib
echo " LD $@"
$(CC) -dynamiclib -L. -lmbedcrypto -lmbedx509 $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_TLS)
# The CMake executable.
CMAKE_COMMAND = /Applications/CMake.app/Contents/bin/cmake
libmbedtls.dll: $(OBJS_TLS) libmbedx509.dll
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_TLS) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -lmbedx509 -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
# The command to remove a file.
RM = /Applications/CMake.app/Contents/bin/cmake -E remove -f
# x509
libmbedx509.a: $(OBJS_X509)
echo " AR $@"
$(AR) $(ARFLAGS) $@ $(OBJS_X509)
ifdef APPLE_BUILD
ifneq ($(APPLE_BUILD),0)
echo " RL $@"
$(RL) $(RLFLAGS) $@
endif
endif
# Escaping for special characters.
EQUALS = =
libmbedx509.$(SOEXT_X509): $(OBJS_X509) $(CRYPTO)libmbedcrypto.so
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509)
# The top-level source directory on which CMake was run.
CMAKE_SOURCE_DIR = /Users/bsergeant/src/foss/ixwebsocket
libmbedx509.so: libmbedx509.$(SOEXT_X509)
echo " LN $@ -> $<"
ln -sf $< $@
# The top-level build directory on which CMake was run.
CMAKE_BINARY_DIR = /Users/bsergeant/src/foss/ixwebsocket
libmbedx509.dylib: $(OBJS_X509) libmbedcrypto.dylib
echo " LD $@"
$(CC) -dynamiclib -L. -lmbedcrypto $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@ $(OBJS_X509)
#=============================================================================
# Targets provided globally by CMake.
libmbedx509.dll: $(OBJS_X509) libmbedcrypto.dll
echo " LD $@"
$(CC) -shared -Wl,-soname,$@ -Wl,--out-implib,$@.a -o $@ $(OBJS_X509) -lws2_32 -lwinmm -lgdi32 -L. -lmbedcrypto -static-libgcc $(LOCAL_LDFLAGS) $(LDFLAGS)
# Special rule for the target install/local
install/local: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local
libmbedcrypto.%:
$(MAKE) CRYPTO_INCLUDES:="-I../../include -I../include" -C ../crypto/library $@
# Special rule for the target install/local
install/local/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing only the local directory..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_LOCAL_ONLY=1 -P cmake_install.cmake
.PHONY : install/local/fast
.c.o:
echo " CC $<"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -c $<
# Special rule for the target install/strip
install/strip: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip
# Special rule for the target install/strip
install/strip/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Installing the project stripped..."
/Applications/CMake.app/Contents/bin/cmake -DCMAKE_INSTALL_DO_STRIP=1 -P cmake_install.cmake
.PHONY : install/strip/fast
# Special rule for the target install
install: preinstall
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
.PHONY : install
# Special rule for the target install
install/fast: preinstall/fast
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Install the project..."
/Applications/CMake.app/Contents/bin/cmake -P cmake_install.cmake
.PHONY : install/fast
# Special rule for the target rebuild_cache
rebuild_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake to regenerate build system..."
/Applications/CMake.app/Contents/bin/cmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : rebuild_cache
# Special rule for the target rebuild_cache
rebuild_cache/fast: rebuild_cache
.PHONY : rebuild_cache/fast
# Special rule for the target edit_cache
edit_cache:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Running CMake cache editor..."
/Applications/CMake.app/Contents/bin/ccmake -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR)
.PHONY : edit_cache
# Special rule for the target edit_cache
edit_cache/fast: edit_cache
.PHONY : edit_cache/fast
# Special rule for the target list_install_components
list_install_components:
@$(CMAKE_COMMAND) -E cmake_echo_color --switch=$(COLOR) --cyan "Available install components are: \"Unspecified\""
.PHONY : list_install_components
# Special rule for the target list_install_components
list_install_components/fast: list_install_components
.PHONY : list_install_components/fast
# The main all target
all: cmake_check_build_system
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles /Users/bsergeant/src/foss/ixwebsocket/third_party/mbedtls/library/CMakeFiles/progress.marks
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/all
$(CMAKE_COMMAND) -E cmake_progress_start /Users/bsergeant/src/foss/ixwebsocket/CMakeFiles 0
.PHONY : all
# The main clean target
clean:
ifndef WINDOWS
rm -f *.o libmbed*
else
del /Q /F *.o libmbed*
endif
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/clean
.PHONY : clean
# The main clean target
clean/fast: clean
.PHONY : clean/fast
# Prepare targets for installation.
preinstall: all
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/preinstall
.PHONY : preinstall
# Prepare targets for installation.
preinstall/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/preinstall
.PHONY : preinstall/fast
# clear depends
depend:
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 1
.PHONY : depend
# Convenience name for target.
third_party/mbedtls/library/CMakeFiles/lib.dir/rule:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/lib.dir/rule
.PHONY : third_party/mbedtls/library/CMakeFiles/lib.dir/rule
# Convenience name for target.
lib: third_party/mbedtls/library/CMakeFiles/lib.dir/rule
.PHONY : lib
# fast build rule for target.
lib/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/lib.dir/build.make third_party/mbedtls/library/CMakeFiles/lib.dir/build
.PHONY : lib/fast
# Convenience name for target.
third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule
.PHONY : third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule
# Convenience name for target.
mbedtls: third_party/mbedtls/library/CMakeFiles/mbedtls.dir/rule
.PHONY : mbedtls
# fast build rule for target.
mbedtls/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build
.PHONY : mbedtls/fast
# Convenience name for target.
third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f CMakeFiles/Makefile2 third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule
.PHONY : third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule
# Convenience name for target.
mbedx509: third_party/mbedtls/library/CMakeFiles/mbedx509.dir/rule
.PHONY : mbedx509
# fast build rule for target.
mbedx509/fast:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build
.PHONY : mbedx509/fast
certs.o: certs.c.o
.PHONY : certs.o
# target to build an object file
certs.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.o
.PHONY : certs.c.o
certs.i: certs.c.i
.PHONY : certs.i
# target to preprocess a source file
certs.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.i
.PHONY : certs.c.i
certs.s: certs.c.s
.PHONY : certs.s
# target to generate assembly for a file
certs.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/certs.c.s
.PHONY : certs.c.s
debug.o: debug.c.o
.PHONY : debug.o
# target to build an object file
debug.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.o
.PHONY : debug.c.o
debug.i: debug.c.i
.PHONY : debug.i
# target to preprocess a source file
debug.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.i
.PHONY : debug.c.i
debug.s: debug.c.s
.PHONY : debug.s
# target to generate assembly for a file
debug.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/debug.c.s
.PHONY : debug.c.s
net_sockets.o: net_sockets.c.o
.PHONY : net_sockets.o
# target to build an object file
net_sockets.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.o
.PHONY : net_sockets.c.o
net_sockets.i: net_sockets.c.i
.PHONY : net_sockets.i
# target to preprocess a source file
net_sockets.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.i
.PHONY : net_sockets.c.i
net_sockets.s: net_sockets.c.s
.PHONY : net_sockets.s
# target to generate assembly for a file
net_sockets.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/net_sockets.c.s
.PHONY : net_sockets.c.s
pkcs11.o: pkcs11.c.o
.PHONY : pkcs11.o
# target to build an object file
pkcs11.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.o
.PHONY : pkcs11.c.o
pkcs11.i: pkcs11.c.i
.PHONY : pkcs11.i
# target to preprocess a source file
pkcs11.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.i
.PHONY : pkcs11.c.i
pkcs11.s: pkcs11.c.s
.PHONY : pkcs11.s
# target to generate assembly for a file
pkcs11.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/pkcs11.c.s
.PHONY : pkcs11.c.s
ssl_cache.o: ssl_cache.c.o
.PHONY : ssl_cache.o
# target to build an object file
ssl_cache.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.o
.PHONY : ssl_cache.c.o
ssl_cache.i: ssl_cache.c.i
.PHONY : ssl_cache.i
# target to preprocess a source file
ssl_cache.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.i
.PHONY : ssl_cache.c.i
ssl_cache.s: ssl_cache.c.s
.PHONY : ssl_cache.s
# target to generate assembly for a file
ssl_cache.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cache.c.s
.PHONY : ssl_cache.c.s
ssl_ciphersuites.o: ssl_ciphersuites.c.o
.PHONY : ssl_ciphersuites.o
# target to build an object file
ssl_ciphersuites.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.o
.PHONY : ssl_ciphersuites.c.o
ssl_ciphersuites.i: ssl_ciphersuites.c.i
.PHONY : ssl_ciphersuites.i
# target to preprocess a source file
ssl_ciphersuites.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.i
.PHONY : ssl_ciphersuites.c.i
ssl_ciphersuites.s: ssl_ciphersuites.c.s
.PHONY : ssl_ciphersuites.s
# target to generate assembly for a file
ssl_ciphersuites.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ciphersuites.c.s
.PHONY : ssl_ciphersuites.c.s
ssl_cli.o: ssl_cli.c.o
.PHONY : ssl_cli.o
# target to build an object file
ssl_cli.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.o
.PHONY : ssl_cli.c.o
ssl_cli.i: ssl_cli.c.i
.PHONY : ssl_cli.i
# target to preprocess a source file
ssl_cli.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.i
.PHONY : ssl_cli.c.i
ssl_cli.s: ssl_cli.c.s
.PHONY : ssl_cli.s
# target to generate assembly for a file
ssl_cli.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cli.c.s
.PHONY : ssl_cli.c.s
ssl_cookie.o: ssl_cookie.c.o
.PHONY : ssl_cookie.o
# target to build an object file
ssl_cookie.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.o
.PHONY : ssl_cookie.c.o
ssl_cookie.i: ssl_cookie.c.i
.PHONY : ssl_cookie.i
# target to preprocess a source file
ssl_cookie.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.i
.PHONY : ssl_cookie.c.i
ssl_cookie.s: ssl_cookie.c.s
.PHONY : ssl_cookie.s
# target to generate assembly for a file
ssl_cookie.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_cookie.c.s
.PHONY : ssl_cookie.c.s
ssl_srv.o: ssl_srv.c.o
.PHONY : ssl_srv.o
# target to build an object file
ssl_srv.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.o
.PHONY : ssl_srv.c.o
ssl_srv.i: ssl_srv.c.i
.PHONY : ssl_srv.i
# target to preprocess a source file
ssl_srv.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.i
.PHONY : ssl_srv.c.i
ssl_srv.s: ssl_srv.c.s
.PHONY : ssl_srv.s
# target to generate assembly for a file
ssl_srv.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_srv.c.s
.PHONY : ssl_srv.c.s
ssl_ticket.o: ssl_ticket.c.o
.PHONY : ssl_ticket.o
# target to build an object file
ssl_ticket.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.o
.PHONY : ssl_ticket.c.o
ssl_ticket.i: ssl_ticket.c.i
.PHONY : ssl_ticket.i
# target to preprocess a source file
ssl_ticket.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.i
.PHONY : ssl_ticket.c.i
ssl_ticket.s: ssl_ticket.c.s
.PHONY : ssl_ticket.s
# target to generate assembly for a file
ssl_ticket.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_ticket.c.s
.PHONY : ssl_ticket.c.s
ssl_tls.o: ssl_tls.c.o
.PHONY : ssl_tls.o
# target to build an object file
ssl_tls.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.o
.PHONY : ssl_tls.c.o
ssl_tls.i: ssl_tls.c.i
.PHONY : ssl_tls.i
# target to preprocess a source file
ssl_tls.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.i
.PHONY : ssl_tls.c.i
ssl_tls.s: ssl_tls.c.s
.PHONY : ssl_tls.s
# target to generate assembly for a file
ssl_tls.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedtls.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedtls.dir/ssl_tls.c.s
.PHONY : ssl_tls.c.s
x509.o: x509.c.o
.PHONY : x509.o
# target to build an object file
x509.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.o
.PHONY : x509.c.o
x509.i: x509.c.i
.PHONY : x509.i
# target to preprocess a source file
x509.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.i
.PHONY : x509.c.i
x509.s: x509.c.s
.PHONY : x509.s
# target to generate assembly for a file
x509.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509.c.s
.PHONY : x509.c.s
x509_create.o: x509_create.c.o
.PHONY : x509_create.o
# target to build an object file
x509_create.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.o
.PHONY : x509_create.c.o
x509_create.i: x509_create.c.i
.PHONY : x509_create.i
# target to preprocess a source file
x509_create.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.i
.PHONY : x509_create.c.i
x509_create.s: x509_create.c.s
.PHONY : x509_create.s
# target to generate assembly for a file
x509_create.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_create.c.s
.PHONY : x509_create.c.s
x509_crl.o: x509_crl.c.o
.PHONY : x509_crl.o
# target to build an object file
x509_crl.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.o
.PHONY : x509_crl.c.o
x509_crl.i: x509_crl.c.i
.PHONY : x509_crl.i
# target to preprocess a source file
x509_crl.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.i
.PHONY : x509_crl.c.i
x509_crl.s: x509_crl.c.s
.PHONY : x509_crl.s
# target to generate assembly for a file
x509_crl.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crl.c.s
.PHONY : x509_crl.c.s
x509_crt.o: x509_crt.c.o
.PHONY : x509_crt.o
# target to build an object file
x509_crt.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.o
.PHONY : x509_crt.c.o
x509_crt.i: x509_crt.c.i
.PHONY : x509_crt.i
# target to preprocess a source file
x509_crt.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.i
.PHONY : x509_crt.c.i
x509_crt.s: x509_crt.c.s
.PHONY : x509_crt.s
# target to generate assembly for a file
x509_crt.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_crt.c.s
.PHONY : x509_crt.c.s
x509_csr.o: x509_csr.c.o
.PHONY : x509_csr.o
# target to build an object file
x509_csr.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.o
.PHONY : x509_csr.c.o
x509_csr.i: x509_csr.c.i
.PHONY : x509_csr.i
# target to preprocess a source file
x509_csr.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.i
.PHONY : x509_csr.c.i
x509_csr.s: x509_csr.c.s
.PHONY : x509_csr.s
# target to generate assembly for a file
x509_csr.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509_csr.c.s
.PHONY : x509_csr.c.s
x509write_crt.o: x509write_crt.c.o
.PHONY : x509write_crt.o
# target to build an object file
x509write_crt.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.o
.PHONY : x509write_crt.c.o
x509write_crt.i: x509write_crt.c.i
.PHONY : x509write_crt.i
# target to preprocess a source file
x509write_crt.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.i
.PHONY : x509write_crt.c.i
x509write_crt.s: x509write_crt.c.s
.PHONY : x509write_crt.s
# target to generate assembly for a file
x509write_crt.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_crt.c.s
.PHONY : x509write_crt.c.s
x509write_csr.o: x509write_csr.c.o
.PHONY : x509write_csr.o
# target to build an object file
x509write_csr.c.o:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.o
.PHONY : x509write_csr.c.o
x509write_csr.i: x509write_csr.c.i
.PHONY : x509write_csr.i
# target to preprocess a source file
x509write_csr.c.i:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.i
.PHONY : x509write_csr.c.i
x509write_csr.s: x509write_csr.c.s
.PHONY : x509write_csr.s
# target to generate assembly for a file
x509write_csr.c.s:
cd /Users/bsergeant/src/foss/ixwebsocket && $(MAKE) -f third_party/mbedtls/library/CMakeFiles/mbedx509.dir/build.make third_party/mbedtls/library/CMakeFiles/mbedx509.dir/x509write_csr.c.s
.PHONY : x509write_csr.c.s
# Help Target
help:
@echo "The following are some of the valid targets for this Makefile:"
@echo "... all (the default if no target is provided)"
@echo "... clean"
@echo "... depend"
@echo "... install/local"
@echo "... install/strip"
@echo "... install"
@echo "... lib"
@echo "... rebuild_cache"
@echo "... edit_cache"
@echo "... list_install_components"
@echo "... mbedtls"
@echo "... mbedx509"
@echo "... certs.o"
@echo "... certs.i"
@echo "... certs.s"
@echo "... debug.o"
@echo "... debug.i"
@echo "... debug.s"
@echo "... net_sockets.o"
@echo "... net_sockets.i"
@echo "... net_sockets.s"
@echo "... pkcs11.o"
@echo "... pkcs11.i"
@echo "... pkcs11.s"
@echo "... ssl_cache.o"
@echo "... ssl_cache.i"
@echo "... ssl_cache.s"
@echo "... ssl_ciphersuites.o"
@echo "... ssl_ciphersuites.i"
@echo "... ssl_ciphersuites.s"
@echo "... ssl_cli.o"
@echo "... ssl_cli.i"
@echo "... ssl_cli.s"
@echo "... ssl_cookie.o"
@echo "... ssl_cookie.i"
@echo "... ssl_cookie.s"
@echo "... ssl_srv.o"
@echo "... ssl_srv.i"
@echo "... ssl_srv.s"
@echo "... ssl_ticket.o"
@echo "... ssl_ticket.i"
@echo "... ssl_ticket.s"
@echo "... ssl_tls.o"
@echo "... ssl_tls.i"
@echo "... ssl_tls.s"
@echo "... x509.o"
@echo "... x509.i"
@echo "... x509.s"
@echo "... x509_create.o"
@echo "... x509_create.i"
@echo "... x509_create.s"
@echo "... x509_crl.o"
@echo "... x509_crl.i"
@echo "... x509_crl.s"
@echo "... x509_crt.o"
@echo "... x509_crt.i"
@echo "... x509_crt.s"
@echo "... x509_csr.o"
@echo "... x509_csr.i"
@echo "... x509_csr.s"
@echo "... x509write_crt.o"
@echo "... x509write_crt.i"
@echo "... x509write_crt.s"
@echo "... x509write_csr.o"
@echo "... x509write_csr.i"
@echo "... x509write_csr.s"
.PHONY : help
#=============================================================================
# Special targets to cleanup operation of make.
# Special rule to run CMake to check the build system integrity.
# No rule that depends on this can have commands that come from listfiles
# because they might be regenerated.
cmake_check_build_system:
cd /Users/bsergeant/src/foss/ixwebsocket && $(CMAKE_COMMAND) -H$(CMAKE_SOURCE_DIR) -B$(CMAKE_BINARY_DIR) --check-build-system CMakeFiles/Makefile.cmake 0
.PHONY : cmake_check_build_system

View File

@ -25,10 +25,14 @@ include_directories(ws ../third_party/statsd-client-cpp/src)
include_directories(ws ../third_party/spdlog/include)
include_directories(ws snake)
if (UNIX)
set( STATSD_CLIENT_SOURCES ../third_party/statsd-client-cpp/src/statsd_client.cpp)
endif()
add_executable(ws
../third_party/msgpack11/msgpack11.cpp
../third_party/jsoncpp/jsoncpp.cpp
../third_party/statsd-client-cpp/src/statsd_client.cpp
${STATSD_CLIENT_SOURCES}
ixcore/utils/IXCoreLogger.cpp
@ -68,7 +72,7 @@ add_executable(ws
target_link_libraries(ws ixwebsocket)
if(NOT APPLE)
if(NOT APPLE AND NOT USE_MBED_TLS)
find_package(OpenSSL REQUIRED)
add_definitions(${OPENSSL_DEFINITIONS})
message(STATUS "OpenSSL: " ${OPENSSL_VERSION})

View File

@ -22,7 +22,7 @@ namespace ix
const std::regex dsnRegex("(http[s]?)://([^:]+):([^@]+)@([^/]+)/([0-9]+)");
std::smatch group;
if (std::regex_match(dsn, group, dsnRegex) and group.size() == 6)
if (std::regex_match(dsn, group, dsnRegex) && group.size() == 6)
{
_validDsn = true;
@ -47,8 +47,8 @@ namespace ix
{
std::time_t now;
std::time(&now);
char buf[sizeof "2011-10-08T07:07:09Z"];
std::strftime(buf, sizeof buf, "%Y-%m-%dT%H:%M:%SZ", std::gmtime(&now));
char buf[sizeof("2011-10-08T07:07:09Z")];
std::strftime(buf, sizeof(buf), "%Y-%m-%dT%H:%M:%SZ", std::gmtime(&now));
return buf;
}

View File

@ -3,10 +3,14 @@
* Author: Benjamin Sergeant
* Copyright (c) 2018 Machine Zone. All rights reserved.
*/
#include "IXHMac.h"
#include "IXBase64.h"
#ifdef __APPLE__
#if defined(IXWEBSOCKET_USE_MBED_TLS)
# include <mbedtls/md.h>
#elif defined(__APPLE__)
# include <ixwebsocket/IXSocketMbedTLS.h>
# include <CommonCrypto/CommonHMAC.h>
#else
# include <openssl/hmac.h>
@ -19,7 +23,12 @@ namespace ix
constexpr size_t hashSize = 16;
unsigned char hash[hashSize];
#ifdef __APPLE__
#if defined(IXWEBSOCKET_USE_MBED_TLS)
mbedtls_md_hmac(mbedtls_md_info_from_type(MBEDTLS_MD_MD5),
(unsigned char *) key.c_str(), key.size(),
(unsigned char *) data.c_str(), data.size(),
(unsigned char *) &hash);
#elif defined(__APPLE__)
CCHmac(kCCHmacAlgMD5,
key.c_str(), key.size(),
data.c_str(), data.size(),

View File

@ -7,6 +7,7 @@
#pragma once
#include <memory>
#include <string>
namespace ix
{

View File

@ -17,7 +17,7 @@
#include <sstream>
#include <iostream>
#include <fstream>
#include <unistd.h>
// #include <unistd.h>
#include <cli11/CLI11.hpp>
#include <spdlog/spdlog.h>

View File

@ -12,9 +12,12 @@
#include <vector>
#include <ixcobra/IXCobraConnection.h>
#include <statsd_client.h>
#include <spdlog/spdlog.h>
#ifndef _WIN32
#include <statsd_client.h>
#endif
namespace ix
{
// fields are command line argument that can be specified multiple times
@ -77,7 +80,11 @@ namespace ix
// statsd client
// test with netcat as a server: `nc -ul 8125`
bool statsdBatch = true;
#ifndef _WIN32
statsd::StatsdClient statsdClient(host, port, prefix, statsdBatch);
#else
int statsdClient;
#endif
Json::FastWriter jsonWriter;
uint64_t msgCount = 0;
@ -124,7 +131,9 @@ namespace ix
spdlog::info("{} {}{}", msgCount++, prefix, id);
#ifndef _WIN32
statsdClient.count(id, 1);
#endif
});
}
else if (eventType == ix::CobraConnection_EventType_Subscribed)

View File

@ -94,7 +94,7 @@ namespace ix
std::streamoff size = file.tellg();
file.seekg(0, file.beg);
memblock.resize(size);
memblock.resize((size_t) size);
file.read((char*)&memblock.front(), static_cast<std::streamsize>(size));
return memblock;

View File

@ -23,7 +23,7 @@ namespace
std::streamoff size = file.tellg();
file.seekg(0, file.beg);
memblock.resize(size);
memblock.resize((size_t) size);
file.read((char*)&memblock.front(), static_cast<std::streamsize>(size));
return memblock;