aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* More vector->pointer conversion removals.lloyd2010-09-1318-42/+49
| | | | | | | | | | | Add RandomNumberGenerator::random_vec, which takes an length n and returns a new SecureVector with randomized contents of that size. This nicely covers most of the cases where randomize was being called on a vector, and is a little cleaner in the code as well, instead of vec.resize(length); rng.randomize(&vec[0], vec.size()); we just write vec = rng.random_vec(length);
* First set of changes for avoiding use implicit vector->pointer conversionslloyd2010-09-1328-131/+163
|
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-1365-209/+218
| | | | | representation (rather than in an interator context), instead use &buf[0], which works for both MemoryRegion and std::vector
* Not an error removing build if it didn't exist at alllloyd2010-09-101-1/+2
|
* Use a true lexicographic ordering in MemoryRegion::operator<lloyd2010-09-091-8/+11
|
* Read input as binarylloyd2010-09-081-1/+1
|
* Add an (undocumented) option --dirty-tree which does not delete the buildlloyd2010-09-081-4/+19
| | | | directory. Useful for me when testing under Windows (no ccache).
* Update the dynamic engine protocol. The initial version had an enginelloyd2010-09-081-30/+15
| | | | | | | | | | | | | destructor function which would delete the engine; this was to handle the case that the heaps were not shared between the application and the library. However in this case we have bigger problems, because we want to be able to pass std::strings into the engine, and additionally be able to return objects from the library which are later deleted by the algorithm factory. So without a major restructuring we can't support this style of operation anyway; the DLL and application must share the same heap. This can be done on Windows using the /MD linking scheme for both the library and the DLL. The library already uses this model by default on Windows.
* Wording changeslloyd2010-09-081-3/+3
|
* Dynamic loading confirmed to work on Windows (tested Windows 7 x64)lloyd2010-09-081-0/+1
|
* Under certain compilation modules, HMODULE isn't a void* but rather alloyd2010-09-081-2/+2
| | | | | | pointer to a nonce struct; presumably for slightly better typechecking. In case we're compiling under such a mode, case the first argument to FreeLibrary and GetProcAddress to a HMODULE.
* In the nmake clean target, delete additional stuff that VC++ drops intolloyd2010-09-081-0/+1
| | | | the directory when building a DLL
* Fix binary input in DataSource_Stream - the conditional was backwards.lloyd2010-09-082-11/+10
| | | | | Use a slightly cleaner invocation that doesn't require duplicating so much code between the binary and non-binary cases.
* Document recent changeslloyd2010-09-081-2/+5
|
* Specify the target host and port for tls_client on the command linelloyd2010-09-081-3/+18
|
* Really fix RC4 suites - it was set to use a key of 128 bytes == 1024 bits!lloyd2010-09-081-1/+1
| | | | Tested against a GnuTLS server.
* Rename MemoryRegion::destroy to MemoryRegion::clear to match STLlloyd2010-09-0811-21/+20
|
* Fix RC4 suiteslloyd2010-09-081-1/+1
|
* Big, invasive but mostly automated change, with a further attempt atlloyd2010-09-0772-158/+166
| | | | | | | | | | | | | | harmonising MemoryRegion with std::vector: The MemoryRegion::clear() function would zeroise the buffer, but keep the memory allocated and the size unchanged. This is very different from STL's clear(), which is basically the equivalent to what is called destroy() in MemoryRegion. So to be able to replace MemoryRegion with a std::vector, we have to rename destroy() to clear() and we have to expose the current functionality of clear() in some other way, since vector doesn't support this operation. Do so by adding a global function named zeroise() which takes a MemoryRegion which is zeroed. Remove clear() to ensure all callers are updated.
* Oops... renamed this quite a while ago, never updated examplelloyd2010-09-071-6/+6
|
* Realization while thinking about the recently added truncate: in a STLlloyd2010-09-077-52/+39
| | | | | | | | | | | | | | | | | | container like vector, truncate is simply resize, but what MemoryRegion called resize will zap the entire contents, and then what was resize was called grow_to. This is really problematic in terms of the goal of replacing MemoryRegion with a vector with a custom allocator. In this checkin: - Remove MemoryRegion::grow_to and MemoryRegion::truncate - Change the semantics of MemoryRegion::resize to change the size while keeping any current contents intact (up to the new size), zero initializing any new values. Unrelated, just noticed the lack while I was in there, add a version of CryptoBox::decrypt taking a std::string for the input.
* Add a basic test for cryptoboxlloyd2010-09-071-0/+46
|
* Call test that was defined but not usedlloyd2010-09-071-4/+5
|
* Avoid name clashing, Sun Studio doesn't like thislloyd2010-09-071-2/+3
|
* Disable a couple of very noisy warnings which don't provde a hugelloyd2010-09-071-1/+2
| | | | | amount of value. Add a note that -library=stlport4 may be needed on Linux (seems to depend on glibc version).
* Prevent loop variable shadowinglloyd2010-09-071-12/+12
|
* Remove trailing comma from enum decllloyd2010-09-071-1/+1
|
* Prevent shadowing of one loop param with anotherlloyd2010-09-071-1/+1
|
* Update CPU optimization flags for Sun Studio to the previous decade.lloyd2010-09-071-6/+10
| | | | | | | Also use -xO5 instead of -xO2; everything seems to work under -xO5 on x86-32 and x86-64 with my version of Sun Studio. Curiously, several things are miscompiled with -xO2! Definitely doesn't give me positive feelings about this optimizer.
* My version of Sun Studio has the same reverse iterator bug as GCC 3lloyd2010-09-071-1/+1
|
* The SSSE3 intrinsics apparently work under Sun Studio as welllloyd2010-09-071-0/+1
|
* Cast the first argument to msync, munmap, mlock, and munlock to char*lloyd2010-09-072-4/+4
| | | | | to fix compilation on Solaris. Everybody else, including POSIX.1, uses void* here, but as usual Solaris likes to be special.
* If the numeric_limits tests fail, make the output a little less dramaticlloyd2010-09-031-4/+4
|
* Fix comparison functorlloyd2010-09-031-3/+3
|
* According to Thomas Maier-Komor in a post to botan-devel, the rightlloyd2010-09-031-0/+2
| | | | | way to create a static library using Sun Studio is to invoke the compiler with the -xar flag.
* Clean up the unix process running entropy source a little bit. Tweaklloyd2010-09-033-24/+35
| | | | | | priorities slightly, pushing netstat -s and netstat -an higher since they change freqently and don't have a huge amount of output. Use the -n flag with lsof, which inhibits name lookups which we don't need.
* Work around Sun Studio multimap insert buglloyd2010-09-031-0/+5
|
* The modern name for Sun Workshop Pro is Sun Studiolloyd2010-09-031-1/+1
|
* Uglify Data_Store::search_with a little to go through multimap_insertlloyd2010-09-031-1/+7
| | | | to avoid a Sun Studio bug.
* Remove calling getsid, it causes problems with too many differentlloyd2010-09-031-3/+1
| | | | | various compilers/platforms, and likely doesn't contribute much of anything. Also only grab real uid and gid, ignoring effective ids.
* Remove declaration of Hex_Encoder::encode, which was removed in an earlierlloyd2010-09-031-8/+4
| | | | checkin.
* Fix dependency update scriptslloyd2010-09-032-2/+2
|
* Add dependencies for SSL modulelloyd2010-09-031-0/+20
|
* Remove filter/pipe dependency herelloyd2010-09-032-14/+6
|
* Document recent changeslloyd2010-09-031-0/+4
|
* Wrap lineslloyd2010-09-031-7/+23
|
* Update some callers that were using Hex_Encoder or Hex_Decoder butlloyd2010-09-034-35/+26
| | | | | | | | | | | | | | | | | | really didn't need to. The ones in symkey and big_code were actually calling accessor functions to do the encoding themselves without a Pipe (should have definitely recognized that as a code smell). These versions have changed semantically with this checkin - previously they would completely ignore bad inputs, but now invalid inputs are rejected. For instance, you cannot say SymmetricKey key("Only some of this is hex, most of it isn't"); And expect to get a valid key formed by filtering out the non-hex characters and then decoding it. This is almost certainly a good thing. Also fix include in Botan.xs
* Add a simple function to MemoryRegion to truncate to a specified size.lloyd2010-09-031-0/+10
| | | | Required by the hex decoder.
* Use the standalone version of the hex decoder instead of the wrapper thatlloyd2010-09-038-122/+102
| | | | previously existed in misc.cpp that emulated it via a pipe and filter.
* Add a standalone version of hex encoding and decoding, defining the filterslloyd2010-09-038-137/+334
| | | | | | | | in terms of these calls. The header for the hex filter is renamed hex_filt.h. This probably won't affect people because filters.h (included by botan.h) already included hex.h, and now just includes hex_filt.h instead.