aboutsummaryrefslogtreecommitdiffstats
path: root/src/asn1
Commit message (Collapse)AuthorAgeFilesLines
* Convert the BER/DER coders to use size_t instead of u32bit for smalllloyd2011-02-094-8/+8
| | | | integer values. Update callers.
* Some cleanups, and add an <ios> include for Sun Studio 12lloyd2011-02-091-2/+2
|
* Use constlloyd2011-01-311-4/+4
|
* Fix compilelloyd2010-11-231-1/+1
|
* Fix pr 127 and pr 128. Don't require the common name and country codeslloyd2010-11-192-35/+26
| | | | | | in newly generated DNs, there are reasonable cases where you do not need or want either. Also fix the saving of dn_bits, and remove X509_DN::do_decode and inline it into its only caller (decode_from).
* is_string_type was only used in one place, asn1_alt.cpp, so make it anlloyd2010-11-033-17/+18
| | | | anon namespace function there.
* Split some of the ASN.1 types into their own headerslloyd2010-10-136-58/+98
|
* s/u32bit/size_t/ in asn1lloyd2010-10-137-75/+77
|
* Use size_t in all of math, remove to_u32bitlloyd2010-10-121-1/+8
|
* Fix a bug in X509_Time: when decoding, the tag would not be set, solloyd2010-10-071-18/+24
| | | | reencoding the same object would fail. This affected CRL updates.
* Add strict comparisons for X509_Timelloyd2010-09-172-0/+8
|
* Update all uses of MemoryRegion::append to use either push_back or operator+=lloyd2010-09-154-35/+30
|
* First set of changes for avoiding use implicit vector->pointer conversionslloyd2010-09-131-5/+5
|
* Anywhere where we use MemoryRegion::begin to get access to the raw pointerlloyd2010-09-133-7/+7
| | | | | representation (rather than in an interator context), instead use &buf[0], which works for both MemoryRegion and std::vector
* Rename MemoryRegion::destroy to MemoryRegion::clear to match STLlloyd2010-09-083-9/+8
|
* Big, invasive but mostly automated change, with a further attempt atlloyd2010-09-071-2/+4
| | | | | | | | | | | | | | 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.
* Doxygenlloyd2010-06-212-7/+22
|
* Replace "@return a blah" and "@return the blah" with just "@return blah"lloyd2010-06-161-3/+3
|
* More Doxygen fixeslloyd2010-06-155-13/+13
|
* Fix a few hundred Doxygen warningslloyd2010-06-151-3/+6
|
* Add a couple of new helper functions to BER_Decoder:lloyd2010-03-192-3/+30
| | | | | | | | | | decode_and_check takes an expected value; if the decoded value does not match, a Decoding_Error with a specified string is thrown. Useful for checking embedded version codes. decode_octet_string_bigint is for decoding INTEGER values that are stored as OCTET STRINGs. Totally obnoxious and useless, but common especially in the ECC standards.
* Catch parse errors in OID, throw Invalid_OIDlloyd2010-03-041-1/+9
|
* Move the get_byte template to its own header, because many fileslloyd2010-02-022-3/+3
| | | | including loadstor.h actually just needed get_byte and nothing else.
* Replace time_t_to_tm with calendar_value which returns a struct representinglloyd2009-12-241-8/+8
| | | | the calendar time without tying to a particular format. From the C++0x branch.
* Un-internal loadstor.h (and its header deps, rotate.h andlloyd2009-12-213-3/+3
| | | | | | | | | | | | | | bswap.h); too many external apps rely on loadstor.h existing. Define 64-bit generic bswap in terms of 32-bit bswap, since it's not much slower if 32-bit is also generic, and much faster if it's not. This may be quite helpful on 32-bit x86 in particular. Change formulation of generic 32-bit bswap. It may be faster or slower depending on the CPU, especially the latency and throuput of rotate instructions, but should be faster on an ideally superscalar processor with rotate instructions (ie, what I expect future CPUs to look more like).
* Add missing BOTAN_DLL exports.lloyd2009-12-161-2/+2
| | | | Move most of the engine headers to internal
* Make many more headers internal-only.lloyd2009-12-165-7/+7
| | | | | | | | | | | | | Fixes for the amalgamation generator for internal headers. Remove BOTAN_DLL exporting macros from all internal-only headers; the classes/functions there don't need to be exported, and avoiding the PIC/GOT indirection can be a big win. Add missing BOTAN_DLLs where necessary, mostly gfpmath and cvc For GCC, use -fvisibility=hidden and set BOTAN_DLL to the visibility __attribute__ to export those classes/functions.
* Full working amalgamation build, plus internal-only headers concept.lloyd2009-12-161-2/+5
|
* Consolidate the non-canonical epoch timers, like cpuid and Win32'slloyd2009-12-012-2/+1
| | | | | | | | | | | | | | QueryPerformanceCounter, into an entropy source hres_timer. Its results, if any, do not count as contributing entropy to the poll. Convert the other (monotonic/fixed epoch) timers to a single function get_nanoseconds_clock(), living in time.h, which statically chooses the 'best' timer type (clock_gettime, gettimeofday, std::clock, in that order depending on what is available). Add feature test macros for clock_gettime and gettimeofday. Remove the Timer class and timer.h. Remove the Timer& argument to the algorithm benchmark function.
* Add missing dependency on timerlloyd2009-11-201-0/+1
|
* Rename/remove some secmem member variables for better matching with STLlloyd2009-11-172-3/+3
| | | | | | | | containers (specifically vector). Rename is_empty to empty Remove has_items Rename create to resize
* Remove the 'realname' attribute on all modules and cc/cpu/os info files.lloyd2009-10-291-2/+0
| | | | | Pretty much useless and unused, except for listing the module names in build.h and the short versions totally suffice for that.
* The get_tm function was duplicated. Move single version to timer.{h,cpp}lloyd2009-09-171-20/+2
|
* Move some files around to break up dependencies between directorieslloyd2009-07-161-0/+2
|
* Add a script that reads the output of print_deps.py and rewriteslloyd2009-07-151-5/+5
| | | | | | the info.txt files with the right module dependencies. Apply it across the codebase.
* Thomas Moschny passed along a request from the Fedora packagers which camelloyd2009-03-3016-531/+563
| | | | | | | | | | | | | | | up during the Fedora submission review, that each source file include some text about the license. One handy Perl script later and each file now has the line Distributed under the terms of the Botan license after the copyright notices. While I was in there modifying every file anyway, I also stripped out the remainder of the block comments (lots of astericks before and after the text); this is stylistic thing I picked up when I was first learning C++ but in retrospect it is not a good style as the structure makes it harder to modify comments (with the result that comments become fewer, shorter and are less likely to be updated, which are not good things).
* Split the last parts of the 'core' modulelloyd2008-11-083-52/+0
| | | | Add some missing info.txts
* Add Doxygen comments to asn1_oid.h (from InSiTo)lloyd2008-10-131-14/+58
|
* Move oids.h to oid_lookup. Allows for much smaller build by disabling asn1lloyd2008-10-011-0/+1
|
* Rewrite part of the module loading code in configure.pl, now dependencieslloyd2008-09-301-1/+1
| | | | | | seem to be handled correctly (er, at least mostly), and more importantly the asm MPI modules are detected and used correctly (at least on x86-64 and x86).
* Better dependency handlinglloyd2008-09-291-1/+5
|
* Fix loading issueslloyd2008-09-291-0/+2
|
* Rename all modinfo.txt files to info.txt, since they are all (none) oflloyd2008-09-291-0/+0
| | | | | them modules now. In any case there is no distinction so info.txt seems better.
* Remove more dependencies on the global state object.lloyd2008-09-291-1/+1
| | | | | | | New argument to X509_CRL constructor, a boolean that specifies if an exception should be thrown upon encountering an unknown extension type marked as critical. Previously this was controlled globally via the x509/crl/unknown_critical policy flag.
* Hardcode use of Latin1 encoding if an encoding using ASN.1 DIRECTORY STRINGlloyd2008-09-291-5/+2
| | | | | | | | is encountered and the charaters will not fit into PRINTABLE STRING. Previously was toggle-able between Latin1 and UTF-8 via policy config. However does not seem worth the depencencies especially as AFAIK nobody has ever touched this setting. If its functionality turns out to be needed then something can be arranged later on.
* Move almost all of the ASN.1, BER, and DER codec related code into newlloyd2008-09-2818-0/+2887
module asn1 Move hex and base64 codecs into new codecs directory. Also move zlib and bzip2 to codecs from compress.