| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
Could end up causing a throw during a destructor leading to a crash,
if the application created a very large secure_vector.
Flagged by Coverity.
|
|
|
|
|
|
|
|
|
|
| |
GCC and Clang generate effectively identical code for a template
with parameters, vs completely unrolled code as was used previously.
Add a little-endian variant so XTS can use it. This extends XTS support
to cover 256 and 512-bit ciphers. I was not able to find another
implementation that supports both XTS and ciphers with large blocks,
so the XTS test vectors are self-generated.
|
|
|
|
| |
Still need basic system headers even when using asio for network
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
Ugh Windows headers y u so nasty.
|
| | |
|
| |
| |
| |
| | |
Move the actual socket stuff to os_utils.cpp
|
|/ |
|
|\ |
|
| | |
|
|/
|
|
| |
Based on VC2017 output
|
| |
|
| |
|
|
|
|
| |
Broken in c3ae43c04c
|
|\ |
|
| |
| |
| |
| | |
Bit over 2x faster on my desktop
|
|/
|
|
|
|
|
|
|
| |
Now does 64-bits at a time instead of 8 bits, and avoids conditional
timing channel on the XOR carry. Confirmed that at least GCC 7 and
Clang 4 on x86-64 compile the functions without conditional jumps.
Also removes CMAC as a dependency of OCB, which only needed it in
order to call CMAC::poly_double
|
| |
|
|
|
|
|
|
| |
Based on the work by @slicer4ever, adds support for
Windows sockets to http_util. As a bonus, we get Windows support
for tls_client and tls_server CLI.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is kind of an artificial change to appease Coverity but maybe
a bit cleaner in any case.
The issue is Coverity detects the throw in the case of PDP endian
being found at runtime, and assumes it might happen. And since
OS::get_processor_timestamp calls CPUID on x86 (to check for RDTSC),
it might throw. And so on up the call chain until it detect a throw
escaping from ~Timer_Scope in speed.cpp, which would crash.
However I do not have a PDP-endian x86 around to confirm this ... :)
|
|
|
|
|
|
|
|
|
| |
Currently these functions will happily bit shift by >= sizeof(T)*8 bits.
However, this is undefined behavior, and results in unexpected results (0)
on at least one platform I've tested.
With this update, you can expect that rotate_left<uint32_t>(1, 32)==1
and rotate_right<uint32_t>(1, 32)==1.
|
|\ |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Hostname validation is used to make sure the certificate
hostname matches the hostname of the connected host.
RFC 6125 allows one wildcard in the left-most label of
a hostname. Up to now, we only supported only the wildcard
as the left-most label, e.g., www.example.com would
match *.example.com, but www.example.com would not
match www*.example.com, although it is permitted.
Also adds test vectors from RFC 6125 as well as the
OpenSSL test suite.
|
|/
|
|
| |
GH #1009
|
| |
|
|
|
|
| |
CVE-2017-2801
|
|\ |
|
| | |
|
|/
|
|
|
|
|
|
|
| |
* 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
|
| |
|
| |
|
|
|
|
| |
Only throw on systems where 32 bit std::time_t is used.
|
| |
|
| |
|
| |
|
|
|
|
| |
The macro has to be on its own line or Doxygen gets confused.
|
|\
| |
| |
| | |
OS::get_high_resolution_clock
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
| | |
|
| |
| |
| |
| | |
Different intrinsics API
|
| | |
|
| |
| |
| |
| | |
Return NEON from CPUID::has_simd_32
|
|/
|
|
| |
Tested on qemu-aarch64
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
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.
|