| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
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.
|
|
|
|
| |
Horrible name, useful function
|
|
|
|
|
| |
Not caught by anything because nothing includes lookup.h except
for the amalgamation build which sucks up everything.
|
| |
|
| |
|
|
|
|
|
| |
Now that #668 is landed I'm comfortable that we will not need
any type of global init.
|
|
|
|
| |
Not used anymore.
|
|
|
|
|
| |
Change AutoSeeded_RNG to use SHA-384, SHA-256, SHA-3(256), or SHA-1,
whichever is available (in that order).
|
| |
|
|
|
|
|
|
| |
This required taking a global lock and doing a map lookup each
time an algorithm was requested (and so many times during a TLS
handshake).
|
|
|
|
|
|
|
| |
I repent my use of global constructors.
I repent my use of global locks.
Hopefully I will never touch this code again.
:)
|
| |
|
| |
|
|\ |
|
| | |
|
|\ \ |
|
| |/ |
|
| | |
|
|/
|
|
| |
Adds a Crypto++-like doxygen mainpage. Replaces the formerly empty mainpage.
|
|
|
|
|
| |
If a non trival type was used, memory corruption could occur.
Original issue reported by Matthias Gierlings.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
With sufficient squinting, Transform provided an abstract base
interface that covered both cipher modes and compression algorithms.
However it mapped on neither of them particularly well. In addition
this API had the same problem that has made me dislike the Pipe/Filter
API: given a Transform&, what does it do when you put bits in? Maybe
it encrypts. Maybe it compresses. It's a floor wax and a dessert topping!
Currently the Cipher_Mode interface is left mostly unchanged, with the
APIs previously on Transform just moved down the type hierarchy. I
think there are some definite improvements possible here, wrt handling
of in-place encryption, but left for a later commit.
The compression API is split into two types, Compression_Algorithm and
Decompression_Algorithm. Compression_Algorithm's start() call takes
the compression level, allowing varying compressions with a single
object. And flushing the compression state is moved to a bool param on
`Compression_Algorithm::update`. All the nonsense WRT compression
algorithms having zero length nonces, input granularity rules, etc
as a result of using the Transform interface goes away.
|
| |
|
|
|
|
| |
explicit.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
In GCC 4.7 and 4.8, Wshadow also warns if a local variable conflicts
with a member function. This was changed in GCC 4.9 (GCC bugzilla
57709) but causes a lot of warnings on Travis which is on 4.8. Clang's
Wshadow behaves like GCC 4.9
The worst offendor was Exception's constructor argument being named
`what` which conflicts with the member function of the same name,
being in a public header this causes so many warnings the Travis log
files are truncated.
This fixes Exception and a couple of others. Fixing all cases would be
a slog that I'm not up for right at the moment.
|
|\ |
|
| | |
|
|/ |
|
| |
|
|
|
|
| |
fix PVS-Studio perfomance warnings
|
|
|
|
|
|
|
| |
in the algo factory.
Fixes remaining issues of GH #369 - test_pubkey.cpp was expecting Lookup_Error
when something isn't found.
|
| |
|
|
|
|
| |
See GH #340 and 6b9a3a5 for background
|
| |
|
|
|
|
|
|
|
|
| |
As the alternatives are unfortunate for applications trying to catch
all library errors, and it seems deriving from std::runtime_error
causes problems with MSVC DLLs (GH #340)
Effectively reverts 2837e915d82e43
|
| |
|
| |
|
|
|
|
| |
Preprocessing sections are now split in two.
|
| |
|
| |
|
|
|
|
| |
DllMain when initialising global constants.
|
|
|
|
|
|
|
| |
Ever tried?
auto str = "some long string";
auto str2 = str + '\n';
It's not with the brainfuck finding the bug.
|
|
|
|
| |
Only user-visible change is the removal of get_byte.h
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously we were hanging on the type destructors to pull in
the relevant objects. However that fails in many simple cases
where the object is never deleted.
For every type involved in the algo registry add static create
and providers functions to access the algo registry. Modify
lookup.h to be inline and call those functions, and move
a few to sub-headers (eg, get_pbkdf going to pbkdf.h). So
accessing the registry involves going through the same file
that handles the initialization, so there is no way to end up
with missing objs.
|
|
|
|
|
|
|
|
|
|
|
| |
The support problems from having static libraries not work in the
obvious way will be endless trouble. Instead have each set of
registrations tag along in a source file for the basic type, at the
cost of some extra ifdefs. On shared libs this is harmless -
everything is going into the shared object anyway. With static libs,
this means pulling in a single block cipher pulls in the text of all
the them. But that's still strictly better than the amalgamation
(which is really pulling in everything), and it works (unlike status quo).
|
| |
|
|
|
|
|
|
| |
Previously 0 was the highest priority and 255 was the lowest. But this
is really quite confusing, instead treat 0 as lowest and 255 as highest
so normal integer intuitions apply.
|
|
|
|
| |
Thanks to @vlajos https://github.com/vlajos/misspell_fixer
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All BOTAN_REGISTER_* macros are defined as
namespace { some_command(); }
So, if such a macro is used with a semicolon at the end, we have
`namespace { ... };` which is unnecessary and makes gcc complain when
run with with -Wpedantic.
However, for consistency, it is great to end those macro invocations
with a semicolon. This commit forces semicolons by appending a dummy
definition with the necessary semicolon missing.
|
| |
|