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
2015-07-16Remove the func parameter to OPENSSL_PUT_ERROR.David Benjamin
Much of this was done automatically with find . -name '*.c' | xargs sed -E -i '' -e 's/(OPENSSL_PUT_ERROR\([a-zA-Z_0-9]+, )[a-zA-Z_0-9]+, ([a-zA-Z_0-9]+\);)/\1\2/' find . -name '*.c' | xargs sed -E -i '' -e 's/(OPENSSL_PUT_ERROR\([a-zA-Z_0-9]+, )[a-zA-Z_0-9]+, ([a-zA-Z_0-9]+\);)/\1\2/' BUG=468039 Change-Id: I4c75fd95dff85ab1d4a546b05e6aed1aeeb499d8 Reviewed-on: https://boringssl-review.googlesource.com/5276 Reviewed-by: Adam Langley <agl@google.com>
2015-07-07Fix my screwup in review.Adam Langley
I could have sworn that I did this in Gerrit's edit, but it apparently didn't take. Change-Id: I73049000d832709d88768754f8dec5ef32dc4a73
2015-07-07Implement ECDSA_SIG_{parse,marshal} with crypto/bytestring.David Benjamin
This is the first structure to be implemented with the new BIGNUM ASN.1 routines. Object reuse in the legacy d2i/i2d functions is implemented by releasing whatever was in *out before and setting it to the newly-allocated object. As with the new d2i_SSL_SESSION, this is a weaker form of object reuse, but should suffice for reasonable callers. As ECDSA_SIG is more likely to be parsed alone than as part of another structure (and using CBB is slightly tedious), add convenient functions which take byte arrays. For consistency with SSL_SESSION, they are named to/from_bytes. from_bytes, unlike the CBS variant, rejects trailing data. Note this changes some test expectations: BER signatures now push an error code. That they didn't do this was probably a mistake. BUG=499653 Change-Id: I9ec74db53e70d9a989412cc9e2b599be0454caec Reviewed-on: https://boringssl-review.googlesource.com/5269 Reviewed-by: Adam Langley <agl@google.com>
2015-05-05Remove unnecessary NULL checks, part 3.David Benjamin
Finish up the e's. Change-Id: Iabb8da000fbca6efee541edb469b90896f60d54b Reviewed-on: https://boringssl-review.googlesource.com/4516 Reviewed-by: Adam Langley <agl@google.com>
2015-04-13Eliminate unnecessary includes from low-level crypto modules.Brian Smith
Beyond generally eliminating unnecessary includes, eliminate as many includes of headers that declare/define particularly error-prone functionality like strlen, malloc, and free. crypto/err/internal.h was added to remove the dependency on openssl/thread.h from the public openssl/err.h header. The include of <stdlib.h> in openssl/mem.h was retained since it defines OPENSSL_malloc and friends as macros around the stdlib.h functions. The public x509.h, x509v3.h, and ssl.h headers were not changed in order to minimize breakage of source compatibility with external code. Change-Id: I0d264b73ad0a720587774430b2ab8f8275960329 Reviewed-on: https://boringssl-review.googlesource.com/4220 Reviewed-by: Adam Langley <agl@google.com>
2015-02-12Add in missing curly braces part 2.David Benjamin
ECC code. Change-Id: I1a960620edbb30e10dcbab0e8053a1deb9db3262 Reviewed-on: https://boringssl-review.googlesource.com/3402 Reviewed-by: Adam Langley <agl@google.com>
2015-02-02Remove string.h from base.h.Adam Langley
Including string.h in base.h causes any file that includes a BoringSSL header to include string.h. Generally this wouldn't be a problem, although string.h might slow down the compile if it wasn't otherwise needed. However, it also causes problems for ipsec-tools in Android because OpenSSL didn't have this behaviour. This change removes string.h from base.h and, instead, adds it to each .c file that requires it. Change-Id: I5968e50b0e230fd3adf9b72dd2836e6f52d6fb37 Reviewed-on: https://boringssl-review.googlesource.com/3200 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2015-01-09Fix various certificate fingerprint issues.Adam Langley
By using non-DER or invalid encodings outside the signed portion of a certificate the fingerprint can be changed without breaking the signature. Although no details of the signed portion of the certificate can be changed this can cause problems with some applications: e.g. those using the certificate fingerprint for blacklists. 1. Reject signatures with non zero unused bits. If the BIT STRING containing the signature has non zero unused bits reject the signature. All current signature algorithms require zero unused bits. 2. Check certificate algorithm consistency. Check the AlgorithmIdentifier inside TBS matches the one in the certificate signature. NB: this will result in signature failure errors for some broken certificates. 3. Check DSA/ECDSA signatures use DER. Reencode DSA/ECDSA signatures and compare with the original received signature. Return an error if there is a mismatch. This will reject various cases including garbage after signature (thanks to Antti Karjalainen and Tuomo Untinen from the Codenomicon CROSS program for discovering this case) and use of BER or invalid ASN.1 INTEGERs (negative or with leading zeroes). CVE-2014-8275 (Imported from upstream's 85cfc188c06bd046420ae70dd6e302f9efe022a9 and 4c52816d35681c0533c25fdd3abb4b7c6962302d) Change-Id: Ic901aea8ea6457df27dc542a11c30464561e322b Reviewed-on: https://boringssl-review.googlesource.com/2783 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-09-03Fix minor issues found by Clang's analysis.Adam Langley
Thanks to Denis Denisov for running the analysis. Change-Id: I80810261e013423e746fd8d8afefb3581cffccc0 Reviewed-on: https://boringssl-review.googlesource.com/1701 Reviewed-by: Adam Langley <agl@google.com>
2014-07-30Align EVP return values with BoringSSL convention.Adam Langley
Where possible, functions should return one for success and zero for error. The use of additional negative values to indicate an error is, itself, error prone. This change fixes many EVP functions to remove the possibility of negative return values. Existing code that is testing for <= 0 will continue to function, although there is the possibility that some code was differentiating between negative values (error) and zero (invalid signature) for the verify functions and will now show the wrong error message. Change-Id: I982512596bb18a82df65861394dbd7487783bd3d Reviewed-on: https://boringssl-review.googlesource.com/1333 Reviewed-by: Adam Langley <agl@google.com>
2014-07-11Fix OPENSSL_PUT_ERROR typos.David Benjamin
Change-Id: Ie4c96643278a09774b324da4b286ceeadef8855b Reviewed-on: https://boringssl-review.googlesource.com/1150 Reviewed-by: Adam Langley <agl@google.com>
2014-06-21Safe (EC)DSA nonces.Adam Langley
This change causes (EC)DSA nonces be to calculated by hashing the message and private key along with entropy.
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.)