aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/utils
Commit message (Collapse)AuthorAgeFilesLines
* Fix X509 DN comparisonsJack Lloyd2017-04-041-0/+2
| | | | CVE-2017-2801
* Merge GH #974 Add wrapper for make_uniqueJack Lloyd2017-04-042-0/+78
|\
| * add Botan::make_uniqueTomasz Frydrych2017-04-042-0/+78
| |
* | Content:Tomasz Frydrych2017-04-031-2/+2
|/ | | | | | | | | * fixes for deprecated constructions in c++11 and later (explicit rule of 3/5 or implicit rule of 0 and other violations) * `default` specifier instead of `{}` in some places(probably all) * removal of unreachable code (for example `return` after `throw`) * removal of compilation unit only visible, but not used functions * fix for `throw()` specifier - used instead `BOTAN_NOEXCEPT` * removed not needed semicolons
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-026-10/+20
|
* Fix some compiler warnings.Jack Lloyd2017-03-221-1/+1
|
* Fix #917: calendar_point::to_std_timepoint() does not support years after 2037Daniel Neus2017-03-211-3/+4
| | | | Only throw on systems where 32 bit std::time_t is used.
* No C++ exceptions from cpu probe functions. See GH #920Jack Lloyd2017-03-192-26/+11
|
* Fix further compiler macro bug exposed by #921Jack Lloyd2017-03-191-1/+1
|
* BOTAN_TARGET_COMPILER_IS -> BOTAN_BUILD_COMPILER_ISDaniel Neus2017-03-151-1/+1
|
* Resolve Doxygen error in cpuid.hJack Lloyd2017-02-111-1/+2
| | | | The macro has to be on its own line or Doxygen gets confused.
* Merge GH #860 Support CPU instruction probe on Windows, add ↵Jack Lloyd2017-01-312-37/+74
|\ | | | | | | OS::get_high_resolution_clock
| * Fix missing return in Windows pathJack Lloyd2017-01-301-7/+3
| |
| * Change meaning of get_processor_timestampJack Lloyd2017-01-272-36/+77
| | | | | | | | | | | | | | | | | | | | | | Now let it return 0 if we have no hardware timestamp, and add OS::get_high_resolution_clock for best available clock. This is mainly because it's confusing for get_processor_timestamp to return something that is not a processor timestamp and because it simplifies adding cycles/byte output if we know that something is or is not a cycle counter. Also adds Windows SEH version of run_cpu_instruction_probe. Untested, uncompiled.
* | Blind fixJack Lloyd2017-01-301-1/+1
| |
* | Transpose for 32-bit NEONJack Lloyd2017-01-291-1/+19
| | | | | | | | Different intrinsics API
* | Workaround for MSVC 2013Jack Lloyd2017-01-292-3/+14
| |
* | Set SIMD ISA flags when building test_simd.cppJack Lloyd2017-01-291-1/+6
| | | | | | | | Return NEON from CPUID::has_simd_32
* | Add support for NEON in SIMD_4x32Jack Lloyd2017-01-292-191/+352
|/ | | | Tested on qemu-aarch64
* Fix various SunCC and Solaris warnings and build problems.Jack Lloyd2017-01-242-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | Based on build output sent by @noloader. If RLIMIT_MEMLOCK is not defined, assume regular user is not able to call mlock. This probably also affected Clang/GCC on Solaris. Work around resolution issue in SIMD_4x32 where it finds ambiguity between arg taking uint32_t and __m128i. This is probably some artifact of how SunCC represents vector types, and seems highly bogus in general but is easy to work around here. Change constructor taking a single value to instead be `SIMD_4x32::splat` function. The SIMD class is internal, so no API implications. Fix various warnings about lambda functions that were missing return types and which were not a single return statement. AIUI C++11 doesn't guarantee that lambda return type will be deduced in that situation, though in practice every compiler including SunCC seems to handle it. Disable AVX2 usage, since SunCC's intrinsics seem to be broken - its _mm_loadu_si256 takes non-const pointer. Rename a few variables in the tests to avoid shadowed var warnings.
* Remove obsolete workaround for bug in some old Sun Studio versionJack Lloyd2017-01-241-5/+0
| | | | [ci skip]
* If PowerPC clock returns 0, skip it.Jack Lloyd2017-01-231-2/+10
| | | | | | Doesn't seem to be a problem with the asm, code works fine on physical hardware (POWER8) but on qemu (on CI) both instructions return zero and the test fails.
* Add CPUID::to_stringJack Lloyd2017-01-222-38/+67
| | | | | | | | | Deprecates CPUID::print, mainly to avoid use of ostream in utils. Main reasoning is some platforms do not have streams at all. If all uses of streams are for operator<< and operator>> overloads, these can be guarded by a future BOTAN_HAS_CPP_STREAMS system-feature flag. But when ostreams are required to use the API (as here), that is not possible.
* Add basic test for OS utilsJack Lloyd2017-01-221-4/+12
| | | | | Mainly driven by missing test for OS::run_cpu_instruction_probe. Currently only works on x86 and ARM. Tested on x86-64 native and aarch64 qemu.
* Avoid requiring AT_DCACHEBSIZE (data cache size) getauxvalJack Lloyd2017-01-191-0/+3
| | | | | Missing on Android it appears, or at least on Kullo CI NDK. Not essential by any means.
* Fix for PowerPCJack Lloyd2017-01-171-2/+2
|
* Fixes for 32-bit ARMJack Lloyd2017-01-171-7/+38
|
* Refactor CPUID implementation, add ARM supportJack Lloyd2017-01-172-146/+322
| | | | | | Tested for ARM only under qemu-aarch64, need to check hardware before merging. Changes x86 CPUID bitmasks which does break ABI for 2.1, no API implications.
* Fixes for OS X buildJack Lloyd2017-01-172-1/+2
| | | | | | os_utils.h was missing an include, only noticed on OS X sigemptyset is a macro on OS X so cannot be called as ::sigemptyset
* Add OS::run_cpu_instruction_probeJack Lloyd2017-01-152-13/+107
| | | | | | Needed for ARM detection, also probably useful on PowerPC for AltiVec Works fine for me on Linux x86-64 testing with ud2 instruction.
* Move Data_Store from utils to x509Jack Lloyd2017-01-043-221/+0
| | | | | It is not a general purpose util or something we want applications to use. It is only used by x509 and hopefully will be removed from there soon enough.
* Fix comment typo [ci skip]Jack Lloyd2017-01-031-1/+1
|
* Avoid using target function attribute in Clang before 3.8Jack Lloyd2017-01-031-1/+1
| | | | | | | | | | We support 3.5 or higher generally, but only Clang 3.8 has the function attributes. This doesn't affect the build with older Clang because the makefile still sets file-wide ISA flags. GCC supports this attribute in all versions we support. Fixes GH #797
* Compile fixJack Lloyd2016-12-231-0/+1
|
* Fix file descriptor leak introduced in bcae34c0cJack Lloyd2016-12-232-5/+1
| | | | Caused tests to fail on CI
* More filter testsJack Lloyd2016-12-222-15/+10
| | | | | Expose Data{Source,Sink}_Stream types even if no filesystem is available. Instead just guard the constructors taking a pathname.
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1832-293/+297
| | | | | | Renames a couple of functions for somewhat better name consistency, eg make_u32bit becomes make_uint32. The old typedefs remain for now since probably lots of application code uses them.
* Add missing netinet includes for sockaddr_inlouiz’2016-12-081-0/+1
|
* Fix BER decoder integer overflowJack Lloyd2016-11-282-1/+41
|\
| * Check for overflow in BER decoder EOC scanningJack Lloyd2016-11-272-1/+41
| |
* | define NOMINMAX 1 before every include of windows.hBaruch Burstein2016-11-283-0/+3
|/
* Add BOTAN_UNUSED when relevant OS support is missingJack Lloyd2016-11-272-0/+2
|
* Add compiler.h macro header extracted from build.hJack Lloyd2016-11-263-10/+176
| | | | | | | | All this is just standard C that the user should not touch, so it doesn't really make sense to have it in the build.h template file. Remove BOTAN_TARGET_CPU_HAS_KNOWN_ENDIANESS - only used twice (in loadstor.h) and that code is clearer without it.
* Merge GH #653 OCSP and X.509 path validation refactorJack Lloyd2016-11-251-5/+9
|\ | | | | | | | | | | Splits up path validation into several sub-functions for easier testing and creating customized validation code. Much improved OCSP handling and OCSP tests.
| * MSVC doesnt support #warningJack Lloyd2016-11-231-1/+1
| |
| * Somewhat better errors in HTTPJack Lloyd2016-11-231-5/+9
| |
* | Avoid having source files start with /**Jack Lloyd2016-11-251-1/+1
|/ | | | | | | This caused Doxygen to dump the copyright notices for those files into the Botan namespace description, which is not helpful. [ci skip]
* Fix doc of get_processor_timestamp [ci skip]Jack Lloyd2016-11-211-4/+10
|
* Remove remaining old style casts.Jack Lloyd2016-11-091-1/+1
| | | | | | Still not a hard error even in maintainer mode because sometimes system headers pull in C style casts via macros (eg MAP_FAILED). But, it not being a hard error makes it easy to backslide.
* Add BOTAN_WARN_UNUSED_RESULT macroJack Lloyd2016-11-091-3/+2
| | | | Only works for GCC and Clang