summaryrefslogtreecommitdiff
path: root/src/lib/libssl/bs_ber.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* Avoid signed vs unsigned warnings from clang by adding two casts,jsing2016-12-031-2/+4
| | | | | | slightly rewriting some code and changing the type of an array. ok bcook@ doug@
* Check for failure with CBB_init() in bs_ber.c.doug2015-06-211-2/+3
| | | | From BoringSSL commit 3fa65f0f05f67615d9daf48940e07f84d094ac6e.
* Use explicit int in bs_ber.c.doug2015-06-171-8/+8
| | | | ok miod@ jsing@
* Be more strict about BER and DER terminology.doug2015-06-161-19/+23
| | | | | | | | bs_ber.c does not convert BER to DER. It's a hack to convert a DER-like encoding with one violation (indefinite form) to strict DER. Rename the functions to reflect this. ok miod@ jsing@
* Make CBS_get_any_asn1_element() more compliant with DER encoding.doug2015-06-151-7/+19
| | | | | | | | | | | | | | | | | CBS_get_any_asn1_element violates DER encoding by allowing indefinite form. All callers except bs_ber.c expect DER encoding. The callers must check to see if it was indefinite or not. Rather than exposing all callers to this behavior, cbs_get_any_asn1_element_internal() allows specifying whether you want to allow the normally forbidden indefinite form. This is used by CBS_get_any_asn1_element() for strict DER encoding and by a new static function in bs_ber.c for the relaxed version. While I was here, I added comments to differentiate between ASN.1 restrictions and CBS limitations. ok miod@
* Add whitespace and replace OPENSSL_free with free in documentation.doug2015-04-291-2/+2
| | | | ok jsing@
* Call CBS_mem_equal() rather than reimplementing it.doug2015-04-291-3/+2
| | | | ok jsing@
* KNF bytestring files.doug2015-02-061-179/+211
| | | | | | | | 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/+220
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@