| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
| |
Avoid throwing base Botan::Exception type, as it is difficult to
determine what the error is in that case.
Add Exception::error_code and Exception::error_type which allows
(for error code) more information about the error and (for error type)
allows knowing the error type without requiring a sequence of catches.
See GH #1742
|
|
|
|
|
|
|
|
| |
Avoid any getenv toggles or reading /proc if we are setuid/setgid.
It is possible there is or will someday be some file in /proc that
is world-readable, but if read by a privileged user causes some side
effect.
|
|
|
|
|
| |
It is the same RNG as arc4random and /dev/urandom. And arc4random seems
to be working well for iOS and macOS.
|
| |
|
|
|
|
| |
GH #1614
|
| |
|
|
|
|
| |
Re #1481
|
| |
|
|\
| |
| |
| | |
specific code
|
| | |
|
|/
|
|
| |
These were already implicit due to requiring the relevant ISA
|
|
|
|
| |
Now the value round trips with Entropy_Source::create
|
| |
|
| |
|
|
|
|
|
|
| |
Rather than running over the entire heap list which may be long.
Fixes #1369
|
|
|
|
|
|
| |
It turns out that GCC dropped support for IRIX in 4.8, so likely there
was never even a C++11 compiler that could have been used to compile 2.x
in any case.
|
|
|
|
| |
Sonar
|
| |
|
| |
|
| |
|
|
|
|
|
| |
Done by a perl script which converted all classes to final, followed
by selective reversion where it caused compilation failures.
|
|
|
|
| |
Some help from include-what-you-use
|
|
|
|
|
|
|
| |
Avoid including build.h or assert.h directly, instead always take
them though types.h
Avoid math.h in favor of cmath
|
|
|
|
|
|
| |
ISO C++ reserves names with double underscores in them
Closes #512
|
|
|
|
|
| |
Defined in build.h, all equal to BOTAN_DLL so ties into existing
system for exporting symbols.
|
|
|
|
| |
Ugh Windows headers y u so nasty.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This OS has its own crypto API and does not support CryptGenRandom.
Splits System_RNG_Impl into distinct declarations one per implementation
type. Easier to read now that we are up to 4 distinct versions.
Removes the CryptoAPI entropy source, and replaces it with an entropy
source that calls the system RNG. This is nominally a bit less flexible
in that the entropy source allowed polling multiple providers (though
we didn't actually make use of that). Plus side is it works on all
systems.
Currently the dev_random entropy source is still there because we do
actually use it to poll both /dev/random and /dev/urandom, and it
might be useful (on certain systems) to also poll a HW RNG, which
are often assigned their own device node. This could debatably also
be removed in favor of just reading the system RNG.
|
|
|
|
| |
Caught by GCC cross compiling. Also fix a couple 0-as-null warnings.
|
| |
|
|
|
|
|
|
| |
All minimum compiler versions in rdseed are less or equal the minimum
compiler version for the Botan 2.x branch. Remove those explicit
restrictions to allow users with unknown cc_version to compile rdseed
|
|
|
|
|
| |
See comments in
https://github.com/randombit/botan/commit/7f019174bfcf3c2b31bda74fe40ce35727db1cef
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This comes up recently to support CPU extensions by Intel (#826) and
ARM (#844) since the intrinsic functions were only added in compiler
versions more recent than the minimums we generally support, but might
actually be useful for all kinds of things in the future since one can
add a (new, otherwise optional) C++14 or C++17 module in 2.x branch
while continuing to support the current set of supported compiler
versions for the main library functionality.
Uses RDSEED as the test case, to ensure version detection/comparisons
work on all platforms.
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
|
|
| |
The OpenBSD system limit for getentropy(2) is 256 bytes. It does
not make sense to use the BOTAN_SYSTEM_RNG_POLL_REQUEST define here.
As it is only used in one place, another define would be overkill.
|
|
|
|
|
| |
The /proc file system was disabled for years. With OpenBSD 5.7 the
implementation has been removed from the kernel sources.
|
|
|
|
|
|
|
|
| |
Gather entropy from system call getentropy(2). This is available
since in OpenBSD 5.6 and Solaris 11.3. It can provide up to 256
bytes entropy from the kernel without blocking. As a system call
it does not need a file descriptor and works in chroot(2) environments
without device nodes.
|
| |
|
|\ |
|
| | |
|
| |
| |
| |
| | |
module doesn't exist anymore
|
|/ |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Kind of a vestigial thing from an earlier iteration of the module
design, and never useful to specify anymore since taking all the cpp
files is what you want exactly 100% of the time.
|
| |
|
| |
|
|
|
|
|
|
|
| |
Have the /proc setting in build.h actually control the entropy source
configuration (!)
GH #708
|
|
|
|
|
| |
Change AutoSeeded_RNG to use SHA-384, SHA-256, SHA-3(256), or SHA-1,
whichever is available (in that order).
|
|
|
|
|
| |
If opening /dev/*random resulted in fd 0, we would both not use
that RNG and leak the file descriptor. Found with Coverity.
|