| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Closes GH #1557
|
| |
|
|
|
|
| |
Instead just put the throw into a compiled function.
|
| |
|
|
|
|
|
| |
Otherwise an integer overflow bug elsewhere could turn into a
heap overflow.
|
| |
|
| |
|
| |
|
|
|
| |
Missing parentheses around pragma message caused warnings in Visual Studio.
|
|
|
|
| |
Closes #1295
|
|
|
|
|
| |
Previously calling update or encrypt without calling set_key first
would result in invalid outputs or else crashing.
|
|
|
|
| |
Sonar
|
|
|
|
|
|
|
| |
Generally speaking reinterpret_cast is sketchy stuff. But the
special case of char*/uint8_t* is both common and safe. By
isolating those, the remaining (likely sketchy) cases are easier
to grep for.
|
|
|
|
|
|
|
| |
Switch to calloc/free instead of new/delete - shouldn't matter since
we are only allocate integral types.
This change reduces the size of libbotan-2.so by ~300 Kb on my system.
|
|
|
|
|
|
|
| |
Lacking this seems to cause interesting issues with Apple Clang on
32-bit ARM. It seems like it implicitly defines a size_type that
is the same size as size_t, but not actually size_t, so we get an
unsigned long vs unsigned int mismatch on the type.
|
| |
|
|
|
|
|
|
|
|
|
| |
According to https://howardhinnant.github.io/allocator_boilerplate.html
we don't need most of what was in there in C++11 and later. I think
I originally wrote that code referencing a C++03 doc.
Specifically avoiding construct, destruct prevents a performance issue
in MSVC (GH #1228)
|
| |
|
|
|
|
| |
No point making someone include a deprecated header to get this.
|
|
|
|
| |
[ci skip]
|
|
|
|
|
|
| |
This is basically just for Monotone
[ci skip]
|
|
|
|
|
| |
Done by a perl script which converted all classes to final, followed
by selective reversion where it caused compilation failures.
|
|
|
|
| |
No actual reason for this header to exist.
|
|
|
|
| |
Some help from include-what-you-use
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Introduced in 455bd2557cbb1343e59eefd97cb449f06a702c28
Found and reported by Roman Pozlevich
|
|
|
|
|
|
|
|
|
| |
* 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
|
|
|
|
|
|
| |
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.
|