Commit Graph

2496 Commits (6381faf2774f88c037b29f47b99bbbab353c48df)

Author SHA1 Message Date
Jeffrey Walton 6381faf277
Rename rdrand.S to rdrand.s 2017-03-23 16:05:30 -04:00
Jeffrey Walton 30263ee497 Rename rdrand.S to rdrand.s
The file is not preprocessed
2017-03-23 15:39:43 -04:00
Jeffrey Walton d865cf9e62
Fix OpenBSD 6.0 compile with GCC 4.9 (Issue 395)
This check-in also enables the 64-bit RDRAND routines for X32. The changes were with held until they could be tested. The testing occurred with Issue 395
2017-03-22 17:26:25 -04:00
Jeffrey Walton 2ea91ba1b9
Fix ARM compile under VS2013 2017-03-20 15:11:27 -04:00
Jeffrey Walton f502ee9218
Simplify C++ dynamic object initialization
Wrap DetectArmFeatures and DetectX86Features in InitializeCpu class
Use init_priority for InitializeCpu
Remove HAVE_GCC_CONSTRUCTOR1 and HAVE_GCC_CONSTRUCTOR0
Use init_seg(<name>) on Windows and explicitly insert at XCU segment
Simplify logic for HAVE_GAS
Remove special recipies for MACPORTS_GCC_COMPILER
Move C++ static initializers into anonymous namespace when possible
Add default NullNameValuePairs ctor for Clang
2017-03-20 08:51:10 -04:00
Jeffrey Walton 0c6510b0a5
Guard string assignment
Visual Studio 2005 fired an assert on the negative self tests because the SecByteBlock was 0-sized and returned a null pointer.
2017-03-19 22:13:12 -04:00
Jeffrey Walton e7fa88083c
Add DRBG, Poly1305 and SipHash to VS2005 project files 2017-03-19 21:49:43 -04:00
Jeffrey Walton b0a151a8c0
Fix VS2015/MSVC 19.00 compiler crash 2017-03-19 10:10:56 -04:00
Jeffrey Walton a3d0da2e0e
Fix VS2008/MSVC 14.00 compiler crash 2017-03-19 06:57:51 -04:00
Jeffrey Walton 7fb6b3df74
Fix compile under Visual Studio 2005/MSC 14.00
Previous testing occurred with Visual Studio 2005 SP 1, and it lacks some of the Safe C++/security enhanced functions.
2017-03-18 16:56:14 -04:00
Jeffrey Walton 71afcadadb
Clear Coverity STREAM_FORMAT_STATE (CID 177736, 177737, 177732)
Yet another attempt to clear the stream state finding.
2017-03-18 09:48:54 -04:00
Jeffrey Walton 6c6391bfda
Clear Coverity CHECKED_RETURN (CID 177729)
This was by design, but we cleared it because we want a dark and silent cockpit.
2017-03-18 08:52:32 -04:00
Jeffrey Walton 13bcfbe249
Add width field to StreamState 2017-03-18 08:18:05 -04:00
Jeffrey Walton ad47231dc0
Switch to std::ostream::char_type for StreamState 2017-03-18 08:11:44 -04:00
Jeffrey Walton 342b4505fb
Clear Coverity IDENTICAL_BRANCHES (CID 177731)
This was by design, but we cleared it because we want a dark and silent cockpit.
2017-03-18 07:18:30 -04:00
Jeffrey Walton bc6d48df59
Cleared C4456 "declaration hides previous local declaration" for MSVC 2017-03-18 07:06:59 -04:00
Jeffrey Walton 1bfb6be934
Clear Coverity STREAM_FORMAT_STATE (CID 177735)
This was a valid finding in the Test suite. The stream state findings are annoying.
2017-03-18 05:08:04 -04:00
Jeffrey Walton e6817b73e5
Cleared -Wunused-but-set-variable for GCC when using word128 2017-03-18 04:51:43 -04:00
Jeffrey Walton 8ad6782bec
Clear Coverity UNINIT_CTOR (CID 177743, 177744)
This was a valid finding, but the only way to get into the codepath was leaving the drbg unkeyed.
2017-03-17 21:53:38 -04:00
Jeffrey Walton 08f9b3ff9e
Clear Coverity UNINIT_CTOR (CID 177741)
This was a valid finding, but the only way to get into the codepath leaving the hash unkeyed.
2017-03-17 21:48:52 -04:00
Jeffrey Walton 690baaae97
Clear Coverity UNINIT_CTOR (CID 177739)
This was a valid finding, but the only way to get into the codepath leaving the hash unkeyed.
2017-03-17 21:45:35 -04:00
Jeffrey Walton 80bbc834fe
Clear Coverity UNINIT (CID 171239)
It was a false positive, but dark and silent cockpits trump the uneeded initialization. The optimizer can remove it.
2017-03-17 21:29:15 -04:00
Jeffrey Walton 301437e693
Updated static initializers
When MSVC init_seg or GCC init_priority is available, we don't need to use the Singleton. We only need to create a file scope class variable and place it in the segment for MSVC or provide the attribute for GCC.
An additional upside is we cleared all the memory leaks that used to be reported by MSVC for debug builds.
2017-03-17 20:47:32 -04:00
Jeffrey Walton bed31de2f6
Whitespace check-in 2017-03-17 18:31:40 -04:00
Jeffrey Walton c90a63196a
Add StringWiden function
StringWiden converts a narrow C-style string to a wide string. It serves the opposite role of StringNarrow function. The function is useful on Windows platforms where the OS favors wide functions with the UTF-16 character set. For example, the Data Proction API (DPAPI) allows a description, but its a wide character C-string. There is no narrwo version of the API.
2017-03-17 04:57:38 -04:00
Jeffrey Walton e55560e1a2
Update Coverity modeling file 2017-03-15 15:46:23 -04:00
Jeffrey Walton 01cea29692
Remove MSVC C4297 warning suppression (Issue 19) 2017-03-15 08:08:43 -04:00
Jeffrey Walton 46c9cc725c
Use C++03 Singleton on select Microsoft platforms (Issues 372, 373, 389, 391)
We are back to the "... one object may end up being memory leaked" if faced with concurrent initialization
2017-03-15 06:20:45 -04:00
Jeffrey Walton 354502d59d
Change HAS_NASM to USE_NASM. The makefile does not etect it automatically 2017-03-14 18:38:37 -04:00
Jeffrey Walton d8570a3435
Avoid inlining LibraryVersion (Issue 371) 2017-03-14 10:26:51 -04:00
Jeffrey Walton f9773d2961
Updated RDRAND and RDSEED under NASM
Port rdrand.S to Solaris
Port rdrand.S to X32
The X32 port is responsible for the loop unwinding. The unwind generates a 32-byte block (X64 and X32) or 16-byte block (X86). On X32, it increases throughut by 100% (doubles it). On X86 and X64, throughput increases by about 6%. Anything over 4 machine words slows things down.
2017-03-14 06:07:37 -04:00
Jeffrey Walton 4bcaabbe26
Updated RDRAND and RDSEED under NASM
Port rdrand.S to Cygwin and OS X
Add DISABLE_NATIVE_ARCH to CmakefileList and GNUmakefile. It supresses the addition of -march=native. DISABLE_NATIVE_ARCH replaces DISABLE_CXXFLAGS_OPTIMIZATIONS in CmakefileList (the latter is now deprecated).
2017-03-13 15:57:47 -04:00
Jeffrey Walton 2b4ec92dbe
Remove style from TABLE tag for benchmarks 2017-03-12 09:30:16 -04:00
Jeffrey Walton c2efbae80a
Add AES/OFB RNG benchmark 2017-03-11 15:56:55 -05:00
Jeffrey Walton 76377f8219
Whitespace checkin 2017-03-11 15:55:44 -05:00
Jeffrey Walton ef7a6a2f4e
Speedup Hash_DRBG and HMAC_DRBG
Add benchmarks for SHA1 and SHA256 variants
Hash_DRBG sped-up by about 2 MiB/s by using word128 and word64 in the initial update loop. It did not benefit other loops
HMAC_DRBG sped-up by about 5 MiB/s by reworking variables, access and loop control
2017-03-11 08:10:32 -05:00
Jeffrey Walton 006ca5f860
Updated documentation 2017-03-11 01:42:06 -05:00
Jeffrey Walton 75a379593d
Updated documentation 2017-03-10 03:14:43 -05:00
Jeffrey Walton a0bb490056
Define _XOPEN_SOURCE for Cygwin/Newlib (Issue 315) 2017-03-10 01:53:51 -05:00
Jeffrey Walton 86a45fd1ca
Suppress unneeded output in Makefiles 2017-03-09 04:01:36 -05:00
Jeffrey Walton 804feccfd9
Add TimeToString function (Issue 386)
This was supposed to be checked-in with ce38a411fc
2017-03-08 17:15:16 -05:00
Jeffrey Walton ce38a411fc
Add Random Number Generator benchmarks (Issue 386)
Move HTML header and footer into benchmark functions
Switch to <cmath> and standard math routines
Switch to <ctime> and standard clock and time routines
Move static variable^Cinto anonymous namespace
Add TimeToString function for printing start and end times
2017-03-08 16:59:24 -05:00
Jeffrey Walton 2416c0eaf5
Switch to <cmath> and standard math routines 2017-03-08 15:55:53 -05:00
Jeffrey Walton a72fdedfa7
Remove unneeded alloca header 2017-03-08 15:47:59 -05:00
Jeffrey Walton 448282331b
Remove HTML echo's from 'make benchmark' recipe 2017-03-08 15:45:38 -05:00
Jeffrey Walton 3f528fef1f Add guard for RDSEED64 on 32-bit platforms (Issue 387)
Cleanup comments in rdrand.cpp and rdrand.asm
2017-03-08 14:09:58 -05:00
Jeffrey Walton 5b98a255f7
Add pch.obj to clean recipe 2017-03-08 12:25:21 -05:00
denisbider 111db9cf9d WSAStringToAddress => WSAStringToAddressA
Issue #385
2017-03-07 20:51:00 -06:00
Jeffrey Walton d3bcbc71da
Cutover to fastcall for MASM and X86 (Issue 387)
Fix "target specific option mismatch" under GCC 4.6
2017-03-07 12:57:47 -05:00
Jeffrey Walton 19df272d90
Fix output buffer cast in rdrand.cpp (Issue 388)
Update comments in rdrand.h
Fix compile on CentOS 5 with GCC 4.1
2017-03-07 10:01:26 -05:00