Merge 'master' into 'ecies'

pull/263/head
Jeffrey Walton 2016-09-09 14:15:30 -04:00
commit 525077e88d
3 changed files with 86 additions and 0 deletions

View File

@ -628,6 +628,24 @@ if [[ (-z "$HAVE_UNIFIED_ASM") ]]; then
fi fi
fi fi
# Testing 'make zip'
if [[ (-z "$HAVE_ZIP") ]]; then
HAVE_ZIP=0
ZIP_PROG=$(which zip 2>&1 | "$GREP" -v "no zip" | head -1)
UNZIP_PROG=$(which unzip 2>&1 | "$GREP" -v "no unzip" | head -1)
if [[ (! -z "$ZIP_PROG" && ! -z "$UNZIP_PROG") ]]; then
HAVE_ZIP=1
zip -v &>/dev/null
if [[ "$?" -ne "0" ]]; then
HAVE_ZIP=0
fi
unzip -v &>/dev/null
if [[ "$?" -ne "0" ]]; then
HAVE_ZIP=0
fi
fi
fi
# ARMv7 and ARMv8, including NEON, CRC32 and Crypto extensions # ARMv7 and ARMv8, including NEON, CRC32 and Crypto extensions
if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then if [[ ("$IS_ARM32" -ne "0" || "$IS_ARM64" -ne "0") ]]; then
@ -5275,6 +5293,68 @@ if [[ ("$IS_CYGWIN" -eq "0" && "$IS_MINGW" -eq "0") ]]; then
fi fi
fi fi
############################################
# Test 'make zip'
if [[ ("$HAVE_ZIP" -ne "0") ]]; then
OLD_DIR=$(pwd)
"$MAKE" zip
RESULT=$(unzip -aoq cryptopp563.zip -d "$TMP/cryptopp563-zip/")
if [[ "$RESULT" -eq "0" ]]; then
cd "$TMP/cryptopp563-zip/"
############################################
# Debug
echo
echo "************************************" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS"
echo "Testing: Debug, 'make zip'" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS"
echo
"$MAKE" clean > /dev/null 2>&1
rm -f adhoc.cpp > /dev/null 2>&1
CXX="$CXX" CXXFLAGS="$DEBUG_CXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
fi
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
fi
fi
############################################
# Release
echo
echo "************************************" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS"
echo "Testing: Release, 'make zip'" | tee -a "$TEST_RESULTS" "$INSTALL_RESULTS"
echo
"$MAKE" clean > /dev/null 2>&1
rm -f adhoc.cpp > /dev/null 2>&1
CXX="$CXX" CXXFLAGS="$RELEASECXXFLAGS" "$MAKE" "${MAKEARGS[@]}" static cryptest.exe 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to make cryptest.exe" | tee -a "$TEST_RESULTS"
else
./cryptest.exe v 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to execute validation suite" | tee -a "$TEST_RESULTS"
fi
./cryptest.exe tv all 2>&1 | tee -a "$TEST_RESULTS"
if [[ ("${PIPESTATUS[0]}" -ne "0") ]]; then
echo "ERROR: failed to execute test vectors" | tee -a "$TEST_RESULTS"
fi
fi
fi
cd "$OLD_DIR"
fi
############################################# #############################################
############################################# #############################################
################ END TESTING ################ ################ END TESTING ################

View File

@ -2,6 +2,12 @@
//! \file integer.h //! \file integer.h
//! \brief Multiple precision integer with arithmetic operations //! \brief Multiple precision integer with arithmetic operations
//! \details The Integer class can represent positive and negative integers
//! with absolute value less than (256**sizeof(word))<sup>(256**sizeof(int))</sup>.
//! \details Internally, the library uses a sign magnitude representation, and the class
//! has two data members. The first is a IntegerSecBlock (a SecBlock<word>) and it is
//! used to hold the representation. The second is a Sign, and its is used to track
//! the sign of the Integer.
#ifndef CRYPTOPP_INTEGER_H #ifndef CRYPTOPP_INTEGER_H
#define CRYPTOPP_INTEGER_H #define CRYPTOPP_INTEGER_H

Binary file not shown.