mirror of
https://github.com/wolfSSL/wolfssl.git
synced 2025-07-30 10:47:28 +02:00
Merge pull request #3725 from elms/build/fix_distcheck
build: fix `make distcheck`
This commit is contained in:
4
.gitignore
vendored
4
.gitignore
vendored
@ -242,6 +242,10 @@ linuxkm/libwolfssl.mod.c
|
|||||||
linuxkm/module_exports.c
|
linuxkm/module_exports.c
|
||||||
linuxkm/linuxkm/get_thread_size
|
linuxkm/linuxkm/get_thread_size
|
||||||
|
|
||||||
|
# autotools generated
|
||||||
|
scripts/unit.test
|
||||||
|
wolfcrypt/test/test_paths.h
|
||||||
|
|
||||||
# MPLAB Generated Files (OS X)
|
# MPLAB Generated Files (OS X)
|
||||||
mcapi/wolfcrypt_mcapi.X/nbproject/Makefile-*
|
mcapi/wolfcrypt_mcapi.X/nbproject/Makefile-*
|
||||||
mcapi/wolfcrypt_mcapi.X/nbproject/Package-default.bash
|
mcapi/wolfcrypt_mcapi.X/nbproject/Package-default.bash
|
||||||
|
@ -27,7 +27,9 @@ DIST_SUBDIRS_OPT =
|
|||||||
@INC_AMINCLUDE@
|
@INC_AMINCLUDE@
|
||||||
DISTCLEANFILES+= aminclude.am
|
DISTCLEANFILES+= aminclude.am
|
||||||
|
|
||||||
CLEANFILES+= cert.der \
|
CLEANFILES+= ecc-key.der \
|
||||||
|
ecc-public-key.der \
|
||||||
|
cert.der \
|
||||||
cert.pem \
|
cert.pem \
|
||||||
certecc.der \
|
certecc.der \
|
||||||
certecc.pem \
|
certecc.pem \
|
||||||
|
10
configure.ac
10
configure.ac
@ -6145,7 +6145,15 @@ AC_SUBST([LIB_STATIC_ADD])
|
|||||||
|
|
||||||
# FINAL
|
# FINAL
|
||||||
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
AC_CONFIG_FILES([stamp-h], [echo timestamp > stamp-h])
|
||||||
AC_CONFIG_FILES([Makefile wolfssl/version.h wolfssl/options.h cyassl/options.h support/wolfssl.pc rpm/spec])
|
AC_CONFIG_FILES([Makefile
|
||||||
|
wolfssl/version.h
|
||||||
|
wolfssl/options.h
|
||||||
|
cyassl/options.h
|
||||||
|
support/wolfssl.pc
|
||||||
|
rpm/spec
|
||||||
|
wolfcrypt/test/test_paths.h
|
||||||
|
])
|
||||||
|
AC_CONFIG_FILES([scripts/unit.test],[chmod +x scripts/unit.test])
|
||||||
|
|
||||||
AX_CREATE_GENERIC_CONFIG
|
AX_CREATE_GENERIC_CONFIG
|
||||||
AX_AM_JOBSERVER([yes])
|
AX_AM_JOBSERVER([yes])
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
#!/bin/sh
|
#!/bin/bash
|
||||||
|
|
||||||
#crl.test
|
#crl.test
|
||||||
|
CERT_DIR=certs
|
||||||
|
|
||||||
# if we can, isolate the network namespace to eliminate port collisions.
|
# if we can, isolate the network namespace to eliminate port collisions.
|
||||||
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
||||||
@ -70,7 +71,8 @@ run_test() {
|
|||||||
# mutex lock, -c loads the revoked certificate. We capture the processid
|
# mutex lock, -c loads the revoked certificate. We capture the processid
|
||||||
# into the variable server_pid
|
# into the variable server_pid
|
||||||
./examples/server/server -R $ready_file -p $crl_port \
|
./examples/server/server -R $ready_file -p $crl_port \
|
||||||
-c certs/server-revoked-cert.pem -k certs/server-revoked-key.pem &
|
-c ${CERT_DIR}/server-revoked-cert.pem \
|
||||||
|
-k ${CERT_DIR}/server-revoked-key.pem &
|
||||||
server_pid=$!
|
server_pid=$!
|
||||||
|
|
||||||
while [ ! -s $ready_file -a "$counter" -lt 20 ]; do
|
while [ ! -s $ready_file -a "$counter" -lt 20 ]; do
|
||||||
|
@ -82,6 +82,7 @@ dist_noinst_SCRIPTS+= scripts/ocsp.test
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
dist_noinst_SCRIPTS+= scripts/unit.test
|
dist_noinst_SCRIPTS+= scripts/unit.test
|
||||||
|
noinst_SCRIPTS+= scripts/unit.test.in
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
# ocsp-stapling-with-ca-as-responder.test
|
# ocsp-stapling-with-ca-as-responder.test
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(dirname "$0")"
|
||||||
|
|
||||||
# if we can, isolate the network namespace to eliminate port collisions.
|
# if we can, isolate the network namespace to eliminate port collisions.
|
||||||
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
||||||
bwrap_path="$(command -v bwrap)"
|
bwrap_path="$(command -v bwrap)"
|
||||||
@ -32,7 +34,7 @@ PARENTDIR="$PWD"
|
|||||||
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
||||||
|
|
||||||
mkdir "${WORKSPACE}" || exit $?
|
mkdir "${WORKSPACE}" || exit $?
|
||||||
cp -pR certs "${WORKSPACE}"/ || exit $?
|
cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $?
|
||||||
cd "$WORKSPACE" || exit $?
|
cd "$WORKSPACE" || exit $?
|
||||||
ln -s ../examples
|
ln -s ../examples
|
||||||
|
|
||||||
|
@ -5,6 +5,8 @@
|
|||||||
|
|
||||||
# Note, this script makes connection(s) to the public Internet.
|
# Note, this script makes connection(s) to the public Internet.
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(dirname "$0")"
|
||||||
|
|
||||||
if [[ -z "${RETRIES_REMAINING-}" ]]; then
|
if [[ -z "${RETRIES_REMAINING-}" ]]; then
|
||||||
export RETRIES_REMAINING=2
|
export RETRIES_REMAINING=2
|
||||||
fi
|
fi
|
||||||
@ -51,7 +53,7 @@ PARENTDIR="$PWD"
|
|||||||
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
||||||
|
|
||||||
mkdir "${WORKSPACE}" || exit $?
|
mkdir "${WORKSPACE}" || exit $?
|
||||||
cp -pR certs "${WORKSPACE}"/ || exit $?
|
cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $?
|
||||||
cd "$WORKSPACE" || exit $?
|
cd "$WORKSPACE" || exit $?
|
||||||
ln -s ../examples
|
ln -s ../examples
|
||||||
|
|
||||||
@ -270,7 +272,7 @@ sleep 0.1
|
|||||||
# client test against the server
|
# client test against the server
|
||||||
server=login.live.com
|
server=login.live.com
|
||||||
#ca=certs/external/baltimore-cybertrust-root.pem
|
#ca=certs/external/baltimore-cybertrust-root.pem
|
||||||
ca=certs/external/ca_collection.pem
|
ca=./certs/external/ca_collection.pem
|
||||||
|
|
||||||
if [[ "$V4V6" == "4" ]]; then
|
if [[ "$V4V6" == "4" ]]; then
|
||||||
./examples/client/client -C -h $server -p 443 -A $ca -g -W 1
|
./examples/client/client -C -h $server -p 443 -A $ca -g -W 1
|
||||||
|
@ -3,6 +3,8 @@
|
|||||||
# ocsp-stapling2.test
|
# ocsp-stapling2.test
|
||||||
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2
|
# Test requires HAVE_OCSP and HAVE_CERTIFICATE_STATUS_REQUEST_V2
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(dirname "$0")"
|
||||||
|
|
||||||
# if we can, isolate the network namespace to eliminate port collisions.
|
# if we can, isolate the network namespace to eliminate port collisions.
|
||||||
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
if [ "${AM_BWRAPPED-}" != "yes" ]; then
|
||||||
bwrap_path="$(command -v bwrap)"
|
bwrap_path="$(command -v bwrap)"
|
||||||
@ -51,7 +53,7 @@ PARENTDIR="$PWD"
|
|||||||
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
WORKSPACE="${PARENTDIR}/workspace.pid$$"
|
||||||
|
|
||||||
mkdir "${WORKSPACE}" || exit $?
|
mkdir "${WORKSPACE}" || exit $?
|
||||||
cp -pR certs "${WORKSPACE}"/ || exit $?
|
cp -pR ${SCRIPT_DIR}/../certs "${WORKSPACE}"/ || exit $?
|
||||||
cd "$WORKSPACE" || exit $?
|
cd "$WORKSPACE" || exit $?
|
||||||
ln -s ../examples
|
ln -s ../examples
|
||||||
|
|
||||||
|
@ -4,6 +4,8 @@
|
|||||||
|
|
||||||
# Note, this script makes connection(s) to the public Internet.
|
# Note, this script makes connection(s) to the public Internet.
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(dirname "$0")"
|
||||||
|
|
||||||
server=www.globalsign.com
|
server=www.globalsign.com
|
||||||
ca=certs/external/ca-globalsign-root.pem
|
ca=certs/external/ca-globalsign-root.pem
|
||||||
|
|
||||||
@ -25,7 +27,7 @@ if [ "$OUTPUT" = "SNI is: ON" ]; then
|
|||||||
printf '\n\n%s\n\n' "SNI is on, proceed with globalsign test"
|
printf '\n\n%s\n\n' "SNI is on, proceed with globalsign test"
|
||||||
|
|
||||||
# is our desired server there?
|
# is our desired server there?
|
||||||
./scripts/ping.test $server 2
|
${SCRIPT_DIR}/ping.test $server 2
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
if [ $RESULT -ne 0 ]; then
|
if [ $RESULT -ne 0 ]; then
|
||||||
GL_UNREACHABLE=1
|
GL_UNREACHABLE=1
|
||||||
@ -45,10 +47,10 @@ else
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
server=www.google.com
|
server=www.google.com
|
||||||
ca=certs/external/ca-google-root.pem
|
ca=${SCRIPT_DIR}/../certs/external/ca-google-root.pem
|
||||||
|
|
||||||
# is our desired server there?
|
# is our desired server there?
|
||||||
./scripts/ping.test $server 2
|
${SCRIPT_DIR}/ping.test $server 2
|
||||||
RESULT=$?
|
RESULT=$?
|
||||||
if [ $RESULT -eq 0 ]; then
|
if [ $RESULT -eq 0 ]; then
|
||||||
# client test against the server
|
# client test against the server
|
||||||
|
@ -1,9 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
DIRNAME="$(dirname "$0")"
|
|
||||||
bwrap_path="$(command -v bwrap)"
|
|
||||||
if [ -n "$bwrap_path" ]; then
|
|
||||||
exec "$bwrap_path" --unshare-net --dev-bind / / "$DIRNAME/../tests/unit.test" "$@"
|
|
||||||
else
|
|
||||||
exec "$DIRNAME/../tests/unit.test" "$@"
|
|
||||||
fi
|
|
8
scripts/unit.test.in
Normal file
8
scripts/unit.test.in
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
bwrap_path="$(command -v bwrap)"
|
||||||
|
if [ -n "$bwrap_path" ]; then
|
||||||
|
exec "$bwrap_path" --unshare-net --dev-bind / / "@builddir@/tests/unit.test" "$@"
|
||||||
|
else
|
||||||
|
exec "@builddir@/tests/unit.test" "$@"
|
||||||
|
fi
|
@ -12,8 +12,7 @@ noinst_PROGRAMS+= wolfcrypt/test/testwolfcrypt
|
|||||||
wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
|
wolfcrypt_test_testwolfcrypt_SOURCES = wolfcrypt/test/test.c
|
||||||
wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
wolfcrypt_test_testwolfcrypt_LDADD = src/libwolfssl.la $(LIB_STATIC_ADD)
|
||||||
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
|
wolfcrypt_test_testwolfcrypt_DEPENDENCIES = src/libwolfssl.la
|
||||||
noinst_HEADERS += wolfcrypt/test/test.h
|
noinst_HEADERS += wolfcrypt/test/test.h wolfcrypt/test/test_paths.h.in
|
||||||
|
|
||||||
endif
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
@ -94,8 +94,14 @@ _Pragma("GCC diagnostic ignored \"-Wunused-function\"");
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef USE_FLAT_TEST_H
|
#ifdef USE_FLAT_TEST_H
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "test_paths.h"
|
||||||
|
#endif
|
||||||
#include "test.h"
|
#include "test.h"
|
||||||
#else
|
#else
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
#include "wolfcrypt/test/test_paths.h"
|
||||||
|
#endif
|
||||||
#include "wolfcrypt/test/test.h"
|
#include "wolfcrypt/test/test.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -11641,10 +11647,18 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
|||||||
#elif defined(WOLFSSL_uTKERNEL2)
|
#elif defined(WOLFSSL_uTKERNEL2)
|
||||||
#define CERT_PREFIX "/uda/"
|
#define CERT_PREFIX "/uda/"
|
||||||
#define CERT_PATH_SEP "/"
|
#define CERT_PATH_SEP "/"
|
||||||
#else
|
#endif
|
||||||
|
|
||||||
|
#ifndef CERT_PREFIX
|
||||||
#define CERT_PREFIX "./"
|
#define CERT_PREFIX "./"
|
||||||
|
#endif
|
||||||
|
#ifndef CERT_PATH_SEP
|
||||||
#define CERT_PATH_SEP "/"
|
#define CERT_PATH_SEP "/"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef CERT_WRITE_TEMP_DIR
|
||||||
|
#define CERT_WRITE_TEMP_DIR CERT_PREFIX
|
||||||
|
#endif
|
||||||
|
|
||||||
#define CERT_ROOT CERT_PREFIX "certs" CERT_PATH_SEP
|
#define CERT_ROOT CERT_PREFIX "certs" CERT_PATH_SEP
|
||||||
|
|
||||||
/* Generated Test Certs */
|
/* Generated Test Certs */
|
||||||
@ -11738,44 +11752,44 @@ byte GetEntropy(ENTROPY_CMD cmd, byte* out)
|
|||||||
#ifndef NO_WRITE_TEMP_FILES
|
#ifndef NO_WRITE_TEMP_FILES
|
||||||
#ifdef HAVE_ECC
|
#ifdef HAVE_ECC
|
||||||
#ifdef WOLFSSL_CERT_GEN
|
#ifdef WOLFSSL_CERT_GEN
|
||||||
static const char* certEccPemFile = CERT_PREFIX "certecc.pem";
|
static const char* certEccPemFile = CERT_WRITE_TEMP_DIR "certecc.pem";
|
||||||
#endif
|
#endif
|
||||||
#if defined(WOLFSSL_CERT_GEN) && !defined(NO_RSA)
|
#if defined(WOLFSSL_CERT_GEN) && !defined(NO_RSA)
|
||||||
static const char* certEccRsaPemFile = CERT_PREFIX "certeccrsa.pem";
|
static const char* certEccRsaPemFile = CERT_WRITE_TEMP_DIR "certeccrsa.pem";
|
||||||
static const char* certEccRsaDerFile = CERT_PREFIX "certeccrsa.der";
|
static const char* certEccRsaDerFile = CERT_WRITE_TEMP_DIR "certeccrsa.der";
|
||||||
#endif
|
#endif
|
||||||
static const char* eccCaKeyPemFile = CERT_PREFIX "ecc-key.pem";
|
static const char* eccCaKeyPemFile = CERT_WRITE_TEMP_DIR "ecc-key.pem";
|
||||||
static const char* eccPubKeyDerFile = CERT_PREFIX "ecc-public-key.der";
|
static const char* eccPubKeyDerFile = CERT_WRITE_TEMP_DIR "ecc-public-key.der";
|
||||||
static const char* eccCaKeyTempFile = CERT_PREFIX "ecc-key.der";
|
static const char* eccCaKeyTempFile = CERT_WRITE_TEMP_DIR "ecc-key.der";
|
||||||
#ifdef HAVE_PKCS8
|
#ifdef HAVE_PKCS8
|
||||||
static const char* eccPkcs8KeyDerFile = CERT_PREFIX "ecc-key-pkcs8.der";
|
static const char* eccPkcs8KeyDerFile = CERT_WRITE_TEMP_DIR "ecc-key-pkcs8.der";
|
||||||
#endif
|
#endif
|
||||||
#if defined(WOLFSSL_CERT_GEN) || \
|
#if defined(WOLFSSL_CERT_GEN) || \
|
||||||
(defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_TEST_CERT))
|
(defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_TEST_CERT))
|
||||||
static const char* certEccDerFile = CERT_PREFIX "certecc.der";
|
static const char* certEccDerFile = CERT_WRITE_TEMP_DIR "certecc.der";
|
||||||
#endif
|
#endif
|
||||||
#endif /* HAVE_ECC */
|
#endif /* HAVE_ECC */
|
||||||
|
|
||||||
#ifndef NO_RSA
|
#ifndef NO_RSA
|
||||||
#if defined(WOLFSSL_CERT_GEN) || \
|
#if defined(WOLFSSL_CERT_GEN) || \
|
||||||
(defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_TEST_CERT))
|
(defined(WOLFSSL_CERT_EXT) && defined(WOLFSSL_TEST_CERT))
|
||||||
static const char* otherCertDerFile = CERT_PREFIX "othercert.der";
|
static const char* otherCertDerFile = CERT_WRITE_TEMP_DIR "othercert.der";
|
||||||
static const char* certDerFile = CERT_PREFIX "cert.der";
|
static const char* certDerFile = CERT_WRITE_TEMP_DIR "cert.der";
|
||||||
#endif
|
#endif
|
||||||
#ifdef WOLFSSL_CERT_GEN
|
#ifdef WOLFSSL_CERT_GEN
|
||||||
static const char* otherCertPemFile = CERT_PREFIX "othercert.pem";
|
static const char* otherCertPemFile = CERT_WRITE_TEMP_DIR "othercert.pem";
|
||||||
static const char* certPemFile = CERT_PREFIX "cert.pem";
|
static const char* certPemFile = CERT_WRITE_TEMP_DIR "cert.pem";
|
||||||
#endif
|
#endif
|
||||||
#ifdef WOLFSSL_CERT_REQ
|
#ifdef WOLFSSL_CERT_REQ
|
||||||
static const char* certReqDerFile = CERT_PREFIX "certreq.der";
|
static const char* certReqDerFile = CERT_WRITE_TEMP_DIR "certreq.der";
|
||||||
static const char* certReqPemFile = CERT_PREFIX "certreq.pem";
|
static const char* certReqPemFile = CERT_WRITE_TEMP_DIR "certreq.pem";
|
||||||
#endif
|
#endif
|
||||||
#endif /* !NO_RSA */
|
#endif /* !NO_RSA */
|
||||||
|
|
||||||
#if !defined(NO_RSA) || !defined(NO_DSA)
|
#if !defined(NO_RSA) || !defined(NO_DSA)
|
||||||
#ifdef WOLFSSL_KEY_GEN
|
#ifdef WOLFSSL_KEY_GEN
|
||||||
static const char* keyDerFile = CERT_PREFIX "key.der";
|
static const char* keyDerFile = CERT_WRITE_TEMP_DIR "key.der";
|
||||||
static const char* keyPemFile = CERT_PREFIX "key.pem";
|
static const char* keyPemFile = CERT_WRITE_TEMP_DIR "key.pem";
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
25
wolfcrypt/test/test_paths.h.in
Normal file
25
wolfcrypt/test/test_paths.h.in
Normal file
@ -0,0 +1,25 @@
|
|||||||
|
/* wolfcrypt/test/test_paths.h
|
||||||
|
*
|
||||||
|
* Copyright (C) 2006-2020 wolfSSL Inc.
|
||||||
|
*
|
||||||
|
* This file is part of wolfSSL.
|
||||||
|
*
|
||||||
|
* wolfSSL is free software; you can redistribute it and/or modify
|
||||||
|
* it under the terms of the GNU General Public License as published by
|
||||||
|
* the Free Software Foundation; either version 2 of the License, or
|
||||||
|
* (at your option) any later version.
|
||||||
|
*
|
||||||
|
* wolfSSL is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
|
||||||
|
*/
|
||||||
|
|
||||||
|
#ifndef NO_FILESYSTEM
|
||||||
|
#define CERT_PREFIX "@abs_top_srcdir@/"
|
||||||
|
#define CERT_WRITE_TEMP_DIR "@abs_top_builddir@/"
|
||||||
|
#endif /* NO_FILESYSTEM */
|
Reference in New Issue
Block a user