Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/boringssl.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-10-01Don't use ssize_t in base64_test.c.David Benjamin
Windows doesn't have it, and it should have been size_t anyway. Change-Id: I901b8d78182576eaa52384d3ffef4810ff48cf7b Reviewed-on: https://boringssl-review.googlesource.com/1861 Reviewed-by: Adam Langley <agl@google.com>
2014-09-12Add a CRYPTO_library_init and static-initializer-less build option.David Benjamin
Chromium does not like static initializers, and the CPU logic uses one to initialize CPU bits. However, the crypto library lacks an explicit initialization function, which could complicate (no compile-time errors) porting existing code which uses crypto/, but not ssl/. Add an explicit CRYPTO_library_init function, but make it a no-op by default. It only does anything (and is required) if building with BORINGSSL_NO_STATIC_INITIALIZER. Change-Id: I6933bdc3447fb382b1f87c788e5b8142d6f3fe39 Reviewed-on: https://boringssl-review.googlesource.com/1770 Reviewed-by: Adam Langley <agl@google.com>
2014-08-26Introduce EVP_DecodeBase64.David Benjamin
This fixes several of the problems with the old API. - Padding was completely ignored. - ='s in the middle of the input were accepted. - It tries to be helpful and strips leading/trailing whitespace. Change-Id: I99b9d5e6583f7eaf9bf0b6ee9ca39799811b58dc Reviewed-on: https://boringssl-review.googlesource.com/1602 Reviewed-by: Adam Langley <agl@google.com>
2014-08-21Convert all zero-argument functions to '(void)'David Benjamin
Otherwise, in C, it becomes a K&R function declaration which doesn't actually type-check the number of arguments. Change-Id: I0731a9fefca46fb1c266bfb1c33d464cf451a22e Reviewed-on: https://boringssl-review.googlesource.com/1582 Reviewed-by: Adam Langley <agl@google.com>
2014-08-14Add EVP_EncodedLength.Adam Langley
Several callers of EVP_EncodeBlock are doing ad-hoc versions of this function without any overflow checks. Change-Id: I4d0cad2347ea8c44b42465e8b14b2783db69ee8f Reviewed-on: https://boringssl-review.googlesource.com/1511 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-08-12Windows build fixes.Adam Langley
Windows doesn't have ssize_t, sadly. There's SSIZE_T, but defining an OPENSSL_SSIZE_T seems worse than just using an int. Change-Id: I09bb5aa03f96da78b619e551f92ed52ce24d9f3f Reviewed-on: https://boringssl-review.googlesource.com/1352 Reviewed-by: Adam Langley <agl@google.com>
2014-07-18Document that EVP_EncodeBlock writes a trailing NUL.David Benjamin
Fix base64_test.c to account for this. Change-Id: I0b3e8062a2130fb01a7e6f175968484769c406f9 Reviewed-on: https://boringssl-review.googlesource.com/1250 Reviewed-by: Adam Langley <agl@google.com>
2014-07-17Touchup a couple of blank lines from 7b35b58a.Adam Langley
Change-Id: I5ed3aaa5d57e5350c4a3779e501bf5fc143997fb
2014-07-17Fix EVP_DecodeBlock and add tests.David Benjamin
Another signedness error. Leave a TODO to possibly resolve EVP_DecodeBlock's ignoring padding. Document some of the Init/Update/Finish versions' behavior. Change-Id: I78a72c3163f8543172a7008b2d09fb10e003d957 Reviewed-on: https://boringssl-review.googlesource.com/1230 Reviewed-by: Adam Langley <agl@google.com>
2014-07-16base64: fix underflow in EVP_EncodeBlock.Adam Langley
When I switched the base64 code to use size_t, I missed that one of the loops was counting down, not up, and depended on the loop variable going negative. Additionally this change fixes a bug in NETSCAPE_SPKI_b64_encode where the size of the result buffer was incorrectly calculated and a possible memory leak. Change-Id: Ibdf644244291274f50b314f3bb13a61b46858ca1 Reviewed-on: https://boringssl-review.googlesource.com/1220 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-07-15Move public headers to include/openssl/Adam Langley
Previously, public headers lived next to the respective code and there were symlinks from include/openssl to them. This doesn't work on Windows. This change moves the headers to live in include/openssl. In cases where some symlinks pointed to the same header, I've added a file that just includes the intended target. These cases are all for backwards-compat. Change-Id: I6e285b74caf621c644b5168a4877db226b07fd92 Reviewed-on: https://boringssl-review.googlesource.com/1180 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-06-21Base64 padding fix.Adam Langley
https://rt.openssl.org/Ticket/Display.html?id=2608 Previously, this input to the base64 code: ================================================================================- Would cause the output length of EVP_DecodeUpdate to be negative. When that happened in the base64 BIO, it would crash. In PEM decoding, the ASN.1 code actually maintains signed lengths and manages to simply error out!
2014-06-21Inital import.Adam Langley
Initial fork from f2d678e6e89b6508147086610e985d4e8416e867 (1.0.2 beta). (This change contains substantial changes from the original and effectively starts a new history.)