Commit Graph

2183 Commits (b71b9bff023fb455b2c73608a6cfe5bc8ef7402c)

Author SHA1 Message Date
Jeffrey Walton dc09f7446c Remove use of NDEBUG in dll.h 2016-09-17 14:40:23 -04:00
Jeffrey Walton eb107a6d6f Update copyright message 2016-09-17 14:39:32 -04:00
Jeffrey Walton c207012123 Add cryptest.sh tests for includio of <assert.h> and <cassert>; and use of NDEBUG or assert\(...\) 2016-09-17 14:38:52 -04:00
Jeffrey Walton 3815b908ab Add ossig.h. Move SignalHandler to ossig.h
This avoids a circular dependency between misc.h and trap.h. It also allows us to logically segregate and group code to replace C++ handlers, like set_terminate
2016-09-17 12:23:02 -04:00
Jeffrey Walton 91ca6c117d Change from NDEBUG to CRYPTOPP_DEBUG in source files to ensure all debug behavior pivots on CRYPTOPP_DEBUG, and not NDEBUG (Issue 277, CVE-2016-7420) 2016-09-16 14:51:48 -04:00
Jeffrey Walton 9ea63e7b28 Merge pull request #282 from mouse07410/master
$%^@!  448 bits is 56 bytes, not 58!!! Fixing that oversight.
2016-09-16 13:16:15 -04:00
Uri Blumenthal 8ad82f3f66 $%^@! 448 bits is 56 bytes, not 58!!! Fixing that oversight. 2016-09-16 12:36:05 -04:00
Jeffrey Walton 1bf805cd3e Merge pull request #281 from mouse07410/master
Restore MARS capability to use 448-bit keys
2016-09-16 12:23:15 -04:00
Uri Blumenthal 58c33810e7 Restore MARS capability to use 448-bit keys 2016-09-16 12:19:12 -04:00
Jeffrey Walton 6847978f0a Merge 'master' into 'trap' 2016-09-16 11:28:23 -04:00
Jeffrey Walton 399a1546de Add CRYPTOPP_ASSERT (Issue 277, CVE-2016-7420)
trap.h and CRYPTOPP_ASSERT has existed for over a year in Master. We deferred on the cut-over waiting for a minor version bump (5.7). We have to use it now due to CVE-2016-7420
2016-09-16 11:27:15 -04:00
DevJPM 8779c8cd78 fixed Keccak and SHA3 to support HMAC
added the blocksize constant and member functions to Keccak and SHA3
(and all derivatives) as well as some compile-time-checks
2016-09-16 16:31:41 +02:00
Jeffrey Walton 69f3d9483e Fixed gcm.cpp compile under MSC/Visual Studio 2016-09-16 08:09:04 -04:00
Jeffrey Walton fca5fbb361 Add information on C++ Static Initialization Ordering 2016-09-15 16:11:34 -04:00
Jeffrey Walton e2befd5ee3 Added section "Alternate Build Systems". Removed section "DataDir Patch" 2016-09-15 15:40:05 -04:00
Jeffrey Walton 553049ba29 Update README and INSTALL with -DNDEBUG requirement for production software (thanks FW) 2016-09-15 15:18:29 -04:00
Jeffrey Walton df40b6224a Restore CMAKE_VERBOSE_MAKEFILE to its original state 2016-09-15 12:04:49 -04:00
Jeffrey Walton e1fa9b26a8 Remove CMake related files from ZIP 2016-09-15 10:54:32 -04:00
Jeffrey Walton f2e5149319 Cleared "Types cannot be declared in anonymous union" (Issue 274)
Thanks to Martin Bonner at http://stackoverflow.com/a/39507183
2016-09-15 09:38:40 -04:00
Jeffrey Walton 34c1837647 Use SET(CMAKE_POSITION_INDEPENDENT_CODE 1) 2016-09-15 05:16:01 -04:00
Jeffrey Walton 722afc4733 Improve Cmake cross-ompile support.
Add CRYPTOPP_CROSS_COMPILE variable. Guard host uname calls on CROSS_COMPILE. Set CMAKE_CXX_LINK_FLAGS to CMAKE_CXX_FLAGS. Change to SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} <option>") pattern.
2016-09-15 02:20:15 -04:00
Jeffrey Walton 677a83501c Removed -erroff=wvarhidemem -erroff=voidretw for SunCC after warning cleanup
Also see Commits b69d904499, 92ed8454c7, 7c3345585c, and 875852fcbc
2016-09-14 21:31:10 -04:00
Jeffrey Walton b69d904499 Cleared SunCC warning "key hides GOST::Base::key" 2016-09-14 21:13:22 -04:00
Jeffrey Walton 92ed8454c7 Cleared SunCC warning "c0 hides GF2NT::c0" 2016-09-14 21:04:00 -04:00
Jeffrey Walton 7c3345585c Cleared SunCC warning "t0 hides GF2NT::t0" 2016-09-14 20:59:46 -04:00
Jeffrey Walton 875852fcbc Cleared SunCC warning "DL_ElgamalLikeSignatureAlgorithm is expected to return a value" 2016-09-14 20:50:41 -04:00
Jeffrey Walton 299288b2e7 Add Solaris SunCC and GCC specific configuration options 2016-09-14 15:15:42 -04:00
Jeffrey Walton 4c5017428b Add machine and system detection using 'uname' for Linux and Unix 2016-09-14 13:57:53 -04:00
Jeffrey Walton ad47c0cce8 Add integger.cpp as the thrird object file in the list of object files
This should have been performed at Commit 7f958575ea
2016-09-14 12:03:27 -04:00
Jeffrey Walton c70f01d7b3 Relocate first PIC code to just after Windows options. Remove second PIC code based on SIZEOF_POINTER since it only managed to set for x86_64 2016-09-14 06:33:34 -04:00
Jeffrey Walton 1204d3dfcc Add -fPIC for builds except for 32-bit x86 and Windows 2016-09-14 01:15:18 -04:00
Jeffrey Walton 9280850b26 Enable Cmake's VERBOSE=1 by default.
Cmake's choice of default options are awful. No wonder they hide them by default
2016-09-13 23:54:16 -04:00
Jeffrey Walton 5790163abc Use __BIGGEST_ALIGNMENT__ only if its smaller than sizeof\(T\) 2016-09-13 22:28:03 -04:00
Jeffrey Walton db768200ab Uncomment existing SHA256::Transform, enable when __OPTIMIZE_SIZE__ is defined
This is Wei's original code. It was commented out, but it might be useful to some since IoT gadgets are becoming more popular
2016-09-13 21:06:42 -04:00
Jeffrey Walton ff67abdec5 Add virtual dtor for IteratedHash and ClonableImpl due to non-trivial data members
Solaris is showing unusual signs with SunCC 5.13 and 5.14. One user is experiencing a SIGBUS in SHA512::Transform due to data alignment of 'data', which was only 2-byte aligned. The project experienced an exception "Coneable not implemented" during the hashing test after building with Cmake. Its not clear how much Cmake influenced the project's results.
2016-09-13 20:44:14 -04:00
Jeffrey Walton df7e07e75e The commit had a typo. This reverts commit 11eede3926. 2016-09-13 19:52:45 -04:00
Jeffrey Walton 11eede3926 Add veirtual dtor IteratedHash and ClonableImpl due to non-trivial data members 2016-09-13 18:31:01 -04:00
Jeffrey Walton 6bb6e8ab63 Updated documentation 2016-09-13 17:29:23 -04:00
Jeffrey Walton 8a47758463 Updated documentation 2016-09-13 16:43:12 -04:00
Jeffrey Walton 13744476bd Updated documentation 2016-09-13 15:55:16 -04:00
Jeffrey Walton 5b50423439 Fix SunCC 5.13 and "illegal use of -xarch option, illegal value ignored: avx2_i" 2016-09-13 15:11:52 -04:00
Dimitry Andric afe1ed0445 Fix clang warnings about undefined variable templates in pkcspad.h
Recent versions of clang warn about missing PKCS_DigestDecoration
definitions, specifically the decoration members.  For example:

    In file included from testpkcs.cpp:8:
    ./pkcspad.h:89:53: warning: instantiation of variable 'CryptoPP::PKCS_DigestDecoration<CryptoPP::SHA1>::decoration' required here, but no definition is available [-Wundefined-var-template]
                                    return HashIdentifier(PKCS_DigestDecoration<H>::decoration, (size_t)PKCS_DigestDecoration<H>::length);
                                                                                    ^
    ./pubkey.h:608:19: note: in instantiation of member function 'CryptoPP::PKCS1v15_SignatureMessageEncodingMethod::HashIdentifierLookup::HashIdentifierLookup2<CryptoPP::SHA1>::Lookup' requested here
            return L::Lookup();
                      ^
    ./pubkey.h:638:26: note: in instantiation of member function 'CryptoPP::TF_ObjectImplBase<CryptoPP::TF_VerifierBase, CryptoPP::TF_SignatureSchemeOptions<CryptoPP::TF_SS<CryptoPP::PKCS1v15, CryptoPP::SHA1, CryptoPP::RSA, int
          CryptoPP::RSA, CryptoPP::PKCS1v15_SignatureMessageEncodingMethod, CryptoPP::SHA1>, CryptoPP::RSAFunction>::GetHashIdentifier' requested here
    class CRYPTOPP_NO_VTABLE TF_ObjectImpl : public TF_ObjectImplBase<BASE, SCHEME_OPTIONS, KEY_CLASS>
                             ^
    ./pkcspad.h:32:20: note: forward declaration of template entity is here
            static const byte decoration[];
                              ^

This is because pkcspad.h doen't contain explicit instantiation
declarations for PKCS_DigestDecoration.  These warnings can be fixed by
adding them in the !CRYPTOPP_IS_DLL case, which appears to apply only to
Windows.
2016-09-13 20:45:30 +02:00
Jeffrey Walton c8388746b9 Fix build under Sun Studio 2016-09-13 12:51:17 -04:00
Jeffrey Walton 9b5dc3c765 Fix gcm.cpp compile under i686 Linux after 97282f61cd 2016-09-13 10:01:39 -04:00
Jeffrey Walton ed9fdfc0ab Whitespace and comments for SunCC work-arounds 2016-09-13 01:16:04 -04:00
Jeffrey Walton 6e6f5e4228 Fix -xarch=ssse4_2 typo 2016-09-13 00:52:15 -04:00
Jeffrey Walton 97282f61cd Fix gcm.cpp compile under x86_64 Linux after 4f7fb2067d 2016-09-12 22:29:13 -04:00
Jeffrey Walton fff2c91b96 Add TLS-ChaCha test vectors from http://tools.ietf.org/html/draft-agl-tls-chacha20poly1305
The implementations do not interoperate at the moment
2016-09-12 19:51:43 -04:00
Jeffrey Walton 32375fe322 Fixed comments in macro magic 2016-09-12 19:17:18 -04:00
Jeffrey Walton abd14a4b0a Improved comments in macro magic 2016-09-12 19:05:09 -04:00