aboutsummaryrefslogtreecommitdiffstats
path: root/src/lib/asn1/der_enc.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Make ctz and high_bit faster and const-time-ishJack Lloyd2018-12-221-1/+1
| | | | | | | They get compiled as const-time on x86-64 with GCC but I don't think this can be totally relied on. But it is anyway an improvement. And, faster, because we compute it recursively
* Allow passing a writer function callback to DER_EncoderJack Lloyd2018-06-081-9/+9
|
* DER improvementsJack Lloyd2018-05-221-27/+58
| | | | | | | | | | | Let DER_Encoder write to a user specified vector instead of only to an internal vector. This allows encoding to a std::vector without having to first write to a locked vector and then copying out the result. Add ASN1_Object::BER_encode convenience method. Replaces X509_Object::BER_encode which had the same logic but was restricted to a subtype. This replaces many cases where DER_Encoder was just used to encode a single object (X509_DN, AlgorithmIdentifier, etc).
* Cleanups and optimizations in DER_EncoderJack Lloyd2018-05-211-67/+63
|
* Simplify overloads in DER_EncoderJack Lloyd2017-12-191-33/+0
|
* Address some bool/int conversion warnings from SonarJack Lloyd2017-10-061-1/+1
| | | | Nothing major but probably good to clean these up.
* 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.
* Header file cleanupsJack Lloyd2017-09-211-1/+0
| | | | Some help from include-what-you-use
* Fix various MSVC warningsJack Lloyd2017-08-311-1/+1
| | | | Based on VC2017 output
* Convert to using standard uintN_t integer typesJack Lloyd2016-12-181-33/+33
| | | | | | 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 asserts to help out CoverityJack Lloyd2016-02-091-0/+2
| | | | | | It somehow deduces an input that is both > 0 and for which high_bit never finds a bit set and returns 0. In both cases that would lead to block being 0 and a negative shift.
* Mass-prefix member vars with m_René Korthaus2016-01-081-24/+24
|
* Internal header cleanupsJack Lloyd2015-09-191-1/+1
| | | | Only user-visible change is the removal of get_byte.h
* lib/asn1: Convert &vec[0] to vec.data()Simon Warta2015-06-271-6/+6
|
* Ensure all files have copyright and license info.lloyd2015-01-101-1/+1
| | | | | Update license header line to specify the terms and refer to the file, neither of which it included before.
* Move lib into srclloyd2014-01-101-0/+410