aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base
Commit message (Collapse)AuthorAgeFilesLines
* Fix failure to fully zero memory before freeJack Lloyd2017-07-161-1/+1
| | | | | | Introduced in 455bd2557cbb1343e59eefd97cb449f06a702c28 Found and reported by Roman Pozlevich
* Content:Tomasz Frydrych2017-04-031-3/+11
| | | | | | | | | * 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
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-184-35/+34
| | | | | | 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 final_stdvecJack Lloyd2016-11-231-0/+7
| | | | Horrible name, useful function
* Fix bogus codeJack Lloyd2016-11-031-2/+2
| | | | | Not caught by anything because nothing includes lookup.h except for the amalgamation build which sucks up everything.
* Simplify some code by using T::create_or_throwJack Lloyd2016-11-031-20/+8
|
* Rename zero_mem to secure_scrub_memoryJack Lloyd2016-11-031-1/+1
|
* Deprecate LibraryInitializerJack Lloyd2016-11-032-28/+4
| | | | | Now that #668 is landed I'm comfortable that we will not need any type of global init.
* Remove lock and alias map from SCAN_NameJack Lloyd2016-11-021-4/+0
| | | | Not used anymore.
* Remove HMAC_RNG, X9.31-RNG, BeOS stats, EGD reader, Unix process runnerJack Lloyd2016-10-281-1/+1
| | | | | Change AutoSeeded_RNG to use SHA-384, SHA-256, SHA-3(256), or SHA-1, whichever is available (in that order).
* Remove unused functions from SCAN_NameJack Lloyd2016-10-212-39/+0
|
* Remove alias logic from SCAN_NameJack Lloyd2016-10-212-63/+2
| | | | | | 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).
* Remove Algo_RegistryJack Lloyd2016-10-213-304/+18
| | | | | | | I repent my use of global constructors. I repent my use of global locks. Hopefully I will never touch this code again. :)
* Fix doxygen warnings [ci skip]René Korthaus2016-10-191-0/+4
|
* Improve hash doxygen [ci skip]René Korthaus2016-10-191-1/+1
|
* Merge GH #665 Add IncludeOS target, make filesystem/threads optionalJack Lloyd2016-10-173-13/+13
|\
| * Abstract out mutex type. Make threads optional.Jack Lloyd2016-10-123-13/+13
| |
* | Merge GH #646 Fix MSVC debug configurations. Add debug builds to AppVeyorJack Lloyd2016-10-131-0/+9
|\ \
| * | Diable static_assert in secure_allocator in MSVC debugSimon Warta2016-10-131-0/+9
| |/
* | Improve base doxygen [ci skip]René Korthaus2016-10-113-1/+22
| |
* | Add doxygen mainpageRené Korthaus2016-10-101-0/+57
|/ | | | Adds a Crypto++-like doxygen mainpage. Replaces the formerly empty mainpage.
* Prevent use of secure_vector with non-integer typesJack Lloyd2016-09-091-0/+3
| | | | | If a non trival type was used, memory corruption could occur. Original issue reported by Matthias Gierlings.
* prevent massive amount of MSVC C4100 warningsDaniel Neus2016-07-051-0/+5
|
* Remove Transform base classJack Lloyd2016-04-214-209/+0
| | | | | | | | | | | | | | | | | | | | | | 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.
* Remaining cppcheck fixes that are not covered by GH #444Daniel Neus2016-03-052-4/+2
|
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-055-6/+7
| | | | explicit.
* Avoid some Wshadows in GCC 4.8Jack Lloyd2016-02-201-2/+2
| | | | | | | | | | | | | | | 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.
* Merge GH #407 Add m_ prefix to more member variablesJack Lloyd2016-01-121-16/+16
|\
| * Prefix more member vars with m_ prefixRené Korthaus2016-01-111-16/+16
| |
* | Get rid of "extra ';'" warnings and force semicolon after macrosSimon Warta2016-01-111-4/+1
|/
* Mass-prefix member vars with m_René Korthaus2016-01-082-17/+17
|
* String comparision fixesDaniel Neus2016-01-041-1/+1
| | | | fix PVS-Studio perfomance warnings
* Throw Lookup_Error instead of bare Exception when creating an obj failsJack Lloyd2015-12-201-24/+24
| | | | | | | in the algo factory. Fixes remaining issues of GH #369 - test_pubkey.cpp was expecting Lookup_Error when something isn't found.
* Deprecate lookup.h functions GH #366Jack Lloyd2015-12-191-1/+19
|
* Remove all remaining uses of throwing a std:: exception directlyJack Lloyd2015-12-191-1/+1
| | | | See GH #340 and 6b9a3a5 for background
* Missing addsJack Lloyd2015-12-112-2/+1
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-111-3/+3
| | | | | | | | 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
* Minor sanity updates for OctetStringSimon Warta2015-12-092-23/+24
|
* Added myself to credits/copyright.Matej Kenda2015-11-201-0/+1
|
* Merged two sections of Botan namespace as suggested by randombit. ↵Matej Kenda2015-11-191-5/+4
| | | | Preprocessing sections are now split in two.
* Fixed default ctor for WinCS_MutexMatej Kenda2015-11-041-1/+1
|
* #321: changed implementation of CriticalSection locking in algo registry.Matej Kenda2015-11-041-34/+38
|
* Algo_Registry: Use CRITICAL_SECTION instead of std::mutex to prevent hang in ↵Matej Kenda2015-11-031-5/+49
| | | | DllMain when initialising global constants.
* Avoid concatination of charsSimon Warta2015-09-221-5/+5
| | | | | | | Ever tried? auto str = "some long string"; auto str2 = str + '\n'; It's not with the brainfuck finding the bug.
* Internal header cleanupsJack Lloyd2015-09-192-2/+1
| | | | Only user-visible change is the removal of get_byte.h
* Handle dependencies re static linking. GH #279Jack Lloyd2015-09-175-146/+94
| | | | | | | | | | | | | | 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.
* Fix static lib registration for block, hash, mac, stream, kdfJack Lloyd2015-09-101-3/+5
| | | | | | | | | | | 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).
* Remove alloc module; move secmem.h to base and locking_allocator to utilsJack Lloyd2015-08-292-1/+206
|
* Reverse the algorithm priority orderingJack Lloyd2015-08-291-7/+10
| | | | | | 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.
* Fix typosSimon Warta2015-07-242-2/+2
| | | | Thanks to @vlajos https://github.com/vlajos/misspell_fixer