summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bs_cbs.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Add whitespace and replace OPENSSL_free with free in documentation.doug2015-04-291-3/+3
| | | | ok jsing@
* Avoid NULL deref in CBS_get_any_asn1_element().doug2015-04-291-2/+3
| | | | | | This function is documented as allowing NULL for out_header_len. ok jsing@
* Added error checking for len argument in cbs_get_u().doug2015-04-291-1/+4
| | | | tweak + ok jsing@
* free() can handle NULL.doug2015-04-291-8/+4
| | | | ok jsing@
* Check for invalid leading zeros in CBS_get_asn1_uint64.doug2015-04-251-3/+8
| | | | | | | | | | ASN.1 integers cannot have all zeros or all ones for the first 9 bits. This rule ensures the numbers are encoded with the smallest number of content octets (see ITU-T Rec X.690 section 8.3.2). Based on BoringSSL commit 5933723b7b592e9914f703d630b596e140c93e16 ok deraadt@ jsing@
* KNF bytestring files.doug2015-02-061-307/+356
| | | | | | | | I checked that this doesn't change anything. Compiled with clang using -Wno-pointer-sign -g0 to reduce the differences. Only difference in the asm is due to assert(0) line number changes in bs_cbs.c and bs_cbb.c. miod is ok with the general process.
* Import BoringSSL's crypto bytestring and crypto bytebuilder APIs.doug2015-02-061-0/+390
This is imported with as few changes as possible for the initial commit. I removed OPENSSL_EXPORT, replaced OPENSSL_malloc() etc with malloc() and changed a few header includes. BoringSSL has this as part of their public API. We're leaving it internal to libssl for now. Based on BoringSSL's CBB/CBS API as of commit c5cc15b4f5b1d6e9b9112cb8d30205a638aa2c54. input + ok jsing@, miod@