|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Minios-devel] [UNIKRAFT/LIBAXTLS PATCH 1/2] Initial port of the axtls library (version 2.1.5)
On 9/11/19 4:49 PM, Sharan Santhanam wrote: Hello Felipe, Please find the comment inline: The patch fails to compile with following error:build/libaxtls/origin/axtls-code/ssl/os_port.h:137:24: fatal error: netinet/in.h: No such file or directory #include <netinet/in.h> The library compile with newlib. It is wise to add dependency in Config.uk to newlib. Thanks & Regards Sharan On 7/13/19 7:36 AM, Felipe Huici wrote:Note lwip is required. Signed-off-by: Felipe Huici <felipe.huici@xxxxxxxxx> --- Config.uk | 4 ++Makefile.uk | 117 +++++++++++++++++++++++++++++++++++++++++++++++glue.c | 12 +++++ include/asm/byteorder.h | 86 +++++++++++++++++++++++++++++++++++include/config.h | 118 ++++++++++++++++++++++++++++++++++++++++++++++++5 files changed, 337 insertions(+) create mode 100644 Config.uk create mode 100644 Makefile.uk create mode 100644 glue.c create mode 100644 include/asm/byteorder.h create mode 100644 include/config.h diff --git a/Config.uk b/Config.uk new file mode 100644 index 0000000..ec8da21 --- /dev/null +++ b/Config.uk @@ -0,0 +1,4 @@ +menuconfig LIBAXTLS + bool "axTLS Embedded SSL" + default n + select LIBNOLIBC if !HAVE_LIBCSelect LIBLWIPdiff --git a/Makefile.uk b/Makefile.uk new file mode 100644 index 0000000..cf513a0 --- /dev/null +++ b/Makefile.uk @@ -0,0 +1,117 @@ +# libaxtls Makefile.uc +# +# Authors: Felipe Huici <felipe.huici@xxxxxxxxx> +# +#+# Copyright (c) 2019, NEC Europe Ltd., NEC Corporation. All rights reserved.+# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. Redistributions in binary form must reproduce the above copyright+# notice, this list of conditions and the following disclaimer in the +# documentation and/or other materials provided with the distribution.+# 3. Neither the name of the copyright holder nor the names of its+# contributors may be used to endorse or promote products derived from+# this software without specific prior written permission. +#+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" +# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE+# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR +# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF+# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS +# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN +# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) +# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE+# POSSIBILITY OF SUCH DAMAGE. +# +# THIS HEADER MAY NOT BE EXTRACTED OR MODIFIED IN ANY WAY. +# ++################################################################################+# Library registration+################################################################################+$(eval $(call addlib_s,libaxtls,$(CONFIG_LIBAXTLS))) ++################################################################################+# Sources+################################################################################+LIBAXTLS_VERSION=2.1.5+LIBAXTLS_URL=https://sourceforge.net/projects/axtls/files/2.1.5/axTLS-2.1.5.tar.gz/downloads/2.1.5/$(LIBAXTLS_VERSION)+LIBAXTLS_PATCHDIR=$(LIBAXTLS_BASE)/patches+$(eval $(call fetchas,libaxtls,$(LIBAXTLS_URL),$(LIBAXTLS_VERSION).tgz)) +$(eval $(call patch,libaxtls,$(LIBAXTLS_PATCHDIR),libaxtls-$(LIBAXTLS_VERSION)))++################################################################################+# Helpers+################################################################################+LIBAXTLS_SRC=$(LIBAXTLS_ORIGIN)/axtls-code ++################################################################################+# Library includes+################################################################################+CINCLUDES-$(CONFIG_LIBAXTLS) += -I$(LIBAXTLS_SRC)/include \ + -I$(LIBAXTLS_SRC)/crypto \ + -I$(LIBAXTLS_SRC)/ssl \ + -I$(LIBAXTLS_BASE)/includeShould the $(LIBAXTLS_BASE)/include be a global CINCLUDE or library specific. This main functionality it provides are the config.h and byteorder.h. Shouldn't the config.h be specific to the library. Since we dont have a exportsym.uk. Do we want to add it as a CINCLUDES as the implementation is going to hidden within this library.+ +CXXINCLUDES-$(CONFIG_LIBAXTLS) += -I$(LIBAXTLS_SRC)/include \ + -I$(LIBAXTLS_SRC)/crypto \ + -I$(LIBAXTLS_SRC)/ssl \ + -I$(LIBAXTLS_BASE)/include ++################################################################################+# Global flags+################################################################################+LIBAXTLS_CFLAGS-y += -DHAVE_CONFIG_H + +# Suppress some warnings to make the build process look neater+SUPPRESS_FLAGS += -Wno-unused-parameter -Wno-unused-variable -Wno-nonnull \ +-Wno-unused-but-set-variable -Wno-unused-label -Wno-char-subscripts \ +-Wno-unused-function -Wno-missing-field-initializers -Wno-uninitialized \ +-Wno-array-bounds -Wno-maybe-uninitialized -Wno-pointer-sign -Wno-unused-value \ +-Wno-unused-macros -Wno-parentheses -Wno-implicit-function-declaration \ +-Wno-missing-braces -Wno-endif-labels -Wno-unused-but-set-variable \+-Wno-implicit-function-declaration -Wno-type-limits -Wno-sign-compareWno-implicit-function-declaration, Wno-array-bounds, Wno-type-limits+ +LIBAXTLS_CFLAGS-y += $(SUPPRESS_FLAGS) +LIBAXTLS_CXXFLAGS-y += $(SUPPRESS_FLAGS) ++################################################################################+# OS dependencies code - Glue between Unikfraft and axtls+################################################################################+LIBAXTLS_SRCS-y += $(LIBAXTLS_BASE)/glue.c ++################################################################################+# axtls code - crypto+################################################################################+LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/aes.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/bigint.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/crypto_misc.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/hmac.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/md5.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/rc4.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/rsa.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/sha1.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/sha256.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/sha384.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/crypto/sha512.c ++################################################################################+# axtls code - ssl+################################################################################+LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/asn1.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/gen_cert.cWithout this symbol CONFIG_SSL_GENERATE_X509_CERT, this is a empty file? Since we undef it do we need this?There are implementation specific to the WIN32. We probably don't need this+LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/loader.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/openssl.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/os_port.c+LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/p12.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/tls1.c +LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/tls1_svr.c+LIBAXTLS_SRCS-y += $(LIBAXTLS_SRC)/ssl/tls1_clnt.cThis depend on CONFIG_SSL_ENABLE_CLIENT which is disabled. _______________________________________________ Minios-devel mailing list Minios-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/minios-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |