aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/base
Commit message (Collapse)AuthorAgeFilesLines
* Remove support for Visual C++ 2013Jack Lloyd2018-10-011-28/+5
| | | | Closes GH #1557
* Spell check the documentationJack Lloyd2018-09-281-1/+1
|
* Inline SymmetricAlgorithm::verify_key_setJack Lloyd2018-05-212-4/+9
| | | | Instead just put the throw into a compiled function.
* Add message to BOTAN_ARG_CHECK and use it more widelyJack Lloyd2018-05-132-12/+27
|
* Add defensive assert to buffer_insertJack Lloyd2018-04-071-0/+2
| | | | | Otherwise an integer overflow bug elsewhere could turn into a heap overflow.
* Make stream, block, hash and cipher mode base classes optionalJack Lloyd2018-01-122-7/+24
|
* Wrap use of MAC in BOTAN_HAS_MAC in lookup.hSimon Warta2018-01-111-1/+7
|
* Remove dependency: base depends on macSimon Warta2018-01-111-1/+0
|
* Fix pragma message to avoid warningschregger2017-12-121-1/+1
| | | Missing parentheses around pragma message caused warnings in Visual Studio.
* Fix secure_allocator with std::string on VS2013Daniel Neus2017-11-161-5/+21
| | | | Closes #1295
* Add checks that keyed algorithms are actually keyed before useJack Lloyd2017-10-261-0/+7
| | | | | Previously calling update or encrypt without calling set_key first would result in invalid outputs or else crashing.
* Avoid empty methods, use =default or add a commentJack Lloyd2017-10-032-2/+2
| | | | Sonar
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-031-1/+1
| | | | | | | 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.
* In secure_allocator, hide mlock/new usage in a function in mem_opsJack Lloyd2017-09-291-20/+2
| | | | | | | 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.
* Add back size_type typedefJack Lloyd2017-09-291-0/+1
| | | | | | | 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.
* Of course MSVC 2013 has to be specialJack Lloyd2017-09-291-0/+7
|
* Simplifiy secure_allocatorJack Lloyd2017-09-291-44/+4
| | | | | | | | | 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)
* Further header cleanupsJack Lloyd2017-09-281-1/+1
|
* Move the SecureVector typedef to secmem.hJack Lloyd2017-09-272-12/+3
| | | | No point making someone include a deprecated header to get this.
* You can't have attributes on a template typedef, apparently.Jack Lloyd2017-09-261-1/+0
| | | | [ci skip]
* Add some more includes to botan.hJack Lloyd2017-09-261-10/+34
| | | | | | This is basically just for Monotone [ci skip]
* Apply final annotations to the library alsoJack Lloyd2017-09-224-4/+4
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* Deprecate botan/botan.h headerJack Lloyd2017-09-211-57/+13
| | | | No actual reason for this header to exist.
* Header file cleanupsJack Lloyd2017-09-212-3/+3
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-209-18/+18
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Add API stability annotations.Jack Lloyd2017-09-196-10/+10
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* 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.