aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/misc
Commit message (Collapse)AuthorAgeFilesLines
* Add wrappers for reinterpret_cast between char* and uint8_t*Jack Lloyd2017-10-031-3/+3
| | | | | | | 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.
* Correct Doxygen errorJack Lloyd2017-09-241-1/+0
| | | | [ci skip]
* More header cleanupsJack Lloyd2017-09-234-2/+6
|
* Avoid creating invalid iterator references when input_len == 0Jack Lloyd2017-09-221-4/+10
|
* Avoid creating hash objects directly in TSS codeJack Lloyd2017-09-221-8/+7
|
* Reject very small inputs to the package transformJack Lloyd2017-09-221-0/+3
| | | | Causes breakage - #825
* Update cryptobox decryptionJack Lloyd2017-09-222-39/+77
|
* Cryptobox code modernizationJack Lloyd2017-09-221-42/+35
| | | | Only encrypt so it's easy to verify everything still works.
* Avoid including HMAC directlyJack Lloyd2017-09-221-3/+2
| | | | Doing it this way allows using OpenSSL etc
* Apply final annotations to the library alsoJack Lloyd2017-09-225-5/+5
| | | | | Done by a perl script which converted all classes to final, followed by selective reversion where it caused compilation failures.
* More include header cleanupsJack Lloyd2017-09-211-1/+0
|
* Header file cleanupsJack Lloyd2017-09-214-4/+8
| | | | Some help from include-what-you-use
* Change header guard format to BOTAN_FOO_H_Jack Lloyd2017-09-208-16/+16
| | | | | | ISO C++ reserves names with double underscores in them Closes #512
* Complete the final annotation changesJack Lloyd2017-09-192-2/+2
|
* Add API stability annotations.Jack Lloyd2017-09-196-19/+21
| | | | | Defined in build.h, all equal to BOTAN_DLL so ties into existing system for exporting symbols.
* Deprecate package transformJack Lloyd2017-09-191-0/+2
| | | | | Unclear what's up with #825 but in any case this function is funky and I don't care enough to try to debug/fix it...
* Use constant_time_compare instead of same_memJack Lloyd2017-09-162-3/+6
| | | | New name, same great operation
* More MSVC warnings fixesJack Lloyd2017-08-311-2/+2
|
* Update modern and nist policies with recent additionsJack Lloyd2017-06-301-0/+1
|
* Add HOTP (RFC 4226) and TOTP (RFC 6238)Jack Lloyd2017-05-195-0/+242
|
* Content:Tomasz Frydrych2017-04-031-1/+1
| | | | | | | | | * 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
* Remove "Dirty hack" for multiple defines in lex_me_harder()Simon Warta2017-04-026-6/+18
|
* Remove SRP6 file supportJack Lloyd2016-12-312-133/+0
| | | | | | | | | | | | | It turns out SRP6 files use a different base64 alphabet than standard, and additionally Botan's decoding of the group id seems wrong though I haven't verified this second was a bug. In any case this code couldn't parse anything it was supposed to and never could. I had already planned on adding a database backed SRP store and removing this code but the fact that it's actually not functional for purpose suggests it's best to remove this now rather than let someone chance upon it and be endlessly frustrated that it doesn't seem to work because all the verifiers are garbled.
* Add a simple test of the all or nothing transformJack Lloyd2016-12-311-2/+2
|
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-1814-99/+99
| | | | | | 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.
* Check missing Pipe::read return valuesJack Lloyd2016-11-092-6/+12
|
* Simplify some code by using T::create_or_throwJack Lloyd2016-11-032-14/+4
|
* Move cert/x509 to top level and pem and pbes2 to pubkey.Jack Lloyd2016-11-036-504/+0
| | | | | | | | | The `cert` dir was just an artifact of having previously supported CVC (smartcard cert format), removed a long time ago. The pem and pbes2 code is directly related to the pubkey code, in fact the only caller of pbes2 (likely anywhere, not just in the library) is in pkcs8.cpp
* Remove openpgp moduleJack Lloyd2016-10-303-266/+0
| | | | | | | Just handled base64 encoding/decoding with a CRC and that's it. This would be better off being rewritten as part of a larger effort to support a meaningful subset of OpenPGP, and does not seem useful on its own.
* Remove bogus filter dependency in TSSJack Lloyd2016-10-282-2/+0
| | | | [ci skip]
* Fix doxygen warnings [ci skip]René Korthaus2016-10-192-1/+1
|
* Improve misc doxygen [ci skip]René Korthaus2016-10-192-0/+18
|
* Update SRP6 versionJack Lloyd2016-10-171-1/+1
| | | | API changed in 227d59d88 but did not bump the version.
* Add IncludeOS target. Make filesystem support optional.Jack Lloyd2016-10-102-7/+5
|
* Remove Transform base classJack Lloyd2016-04-211-2/+1
| | | | | | | | | | | | | | | | | | | | | | 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.
* cppcheck fixes: Class 'X' has a constructor with 1 argument that is not ↵Daniel Neus2016-03-052-2/+2
| | | | explicit.
* Fix remaining Wshadow warnings and enable on gcc and clangRené Korthaus2016-02-181-4/+4
|
* Mass-prefix member vars with m_René Korthaus2016-01-085-38/+43
|
* String comparision fixesDaniel Neus2016-01-041-1/+1
| | | | fix PVS-Studio perfomance warnings
* Remove all remaining uses of throwing a std:: exception directlyJack Lloyd2015-12-191-1/+1
| | | | See GH #340 and 6b9a3a5 for background
* CLI rewriteJack Lloyd2015-12-193-201/+0
| | | | | | | | | | | | | | | | | | The command line tools' origin as a collection of examples and test programs glued together led to some unfortunate problems; lots of hardcoded values, missing parameters, and obsolete crypto. Adds a small library for writing command line programs of the sort needed here (cli.h), which cuts the length of many of the commands in half and makes commands more pleasant to write and extend. Generalizes a lot of the commands also, eg previously only signing/verification with DSA/SHA-1 was included! Removes the fuzzer entry point since that's fairly useless outside of an instrumented build. Removes the in-library API for benchmarking.
* Missing addsJack Lloyd2015-12-111-1/+0
|
* Reroot the exception hierarchy into a toplevel Exception classJack Lloyd2015-12-114-10/+10
| | | | | | | | 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
* Build fixJack Lloyd2015-10-142-2/+3
|
* Add null pointer check to pbes2_decrypt, fix message in pbes2_encryptJack Lloyd2015-10-141-1/+3
|
* Move DataSource to utils and rewrite PEM encoding to avoid filtersJack Lloyd2015-10-142-12/+31
| | | | | Removes filters as as an internal dependency pretty much entirely (outside of some dusty corners in misc).
* Add missing null pointer check to PBES2Jack Lloyd2015-10-111-0/+3
|
* Avoid concatination of charsSimon Warta2015-09-221-4/+4
| | | | | | | Ever tried? auto str = "some long string"; auto str2 = str + '\n'; It's not with the brainfuck finding the bug.
* Remove use of lookup.h in favor of new T::create API.Jack Lloyd2015-09-215-25/+24
|
* Internal header cleanupsJack Lloyd2015-09-193-4/+2
| | | | Only user-visible change is the removal of get_byte.h