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-11-19Add malloc failure tests.Adam Langley
This commit fixes a number of crashes caused by malloc failures. They were found using the -malloc-test=0 option to runner.go which runs tests many times, causing a different allocation call to fail in each case. (This test only works on Linux and only looks for crashes caused by allocation failures, not memory leaks or other errors.) This is not the complete set of crashes! More can be found by collecting core dumps from running with -malloc-test=0. Change-Id: Ia61d19f51e373bccb7bc604642c51e043a74bd83 Reviewed-on: https://boringssl-review.googlesource.com/2320 Reviewed-by: Adam Langley <agl@google.com>
2014-11-06Shush some dead assignments.David Benjamin
Appease clang scan-build a bit. I'm not sure it's actually worth silencing all of them because some of them look like preserving invariants between local variables, but some are clearly pointless or can be restructured slightly. Change-Id: I0bc81e2589bb402ff3ef0182d7a8921e31b85052 Reviewed-on: https://boringssl-review.googlesource.com/2205 Reviewed-by: Adam Langley <agl@google.com>
2014-11-06Fix a2i_ASN1_* leak on failure.David Benjamin
Caught by clang scan-build. Change-Id: I1097848052026361e24fd1202cc0c831c3f83e49 Reviewed-on: https://boringssl-review.googlesource.com/2201 Reviewed-by: Adam Langley <agl@google.com>
2014-10-29Move the X509_NAME typedef into x509.h.David Benjamin
X509_NAME is one of the symbols that collide with wincrypt.h. Move it to x509.h so libraries which only use the pure-crypto portions of BoringSSL without X.509 needn't have to resolve the collision. Change-Id: I057873498e58fe4a4cf264356f9a58d7a15397b7 Reviewed-on: https://boringssl-review.googlesource.com/2080 Reviewed-by: Adam Langley <agl@google.com>
2014-10-14Don't mix and match libraries and errors.David Benjamin
The same library code applies for both the error and the function, so modules cannot easily report errors from each other. Switch evp/algorithm.c's error codes to the EVP library. Remove the original error codes so it's obvious some changes are needed. - X509_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED -> EVP_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED ASN1_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED -> EVP_R_DIGEST_AND_KEY_TYPE_NOT_SUPPORTED (Actually, the X509 version of this error code doesn't exist in OpenSSL. It should have been ASN1.) - ASN1_R_UNKNOWN_SIGNATURE_ALGORITHM -> EVP_R_UNKNOWN_SIGNATURE_ALGORITHM - ASN1_R_WRONG_PUBLIC_KEY_TYPE -> EVP_R_WRONG_PUBLIC_KEY_TYPE - ASN1_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM -> EVP_R_UNKNOWN_MESSAGE_DIGEST_ALGORITHM Change-Id: I05b1a05b465d800c85f7d63ca74588edf40847b9 Reviewed-on: https://boringssl-review.googlesource.com/1940 Reviewed-by: Adam Langley <agl@google.com>
2014-10-10Remove misspelled error code.David Benjamin
One ASN1_R_UNKNOWN_FORMAT got mispelled into ASN1_R_UNKOWN_FORMAT and duplicated. Change-Id: If123ef848ffe68afa021f5f3e3fb08eac92c5f94 Reviewed-on: https://boringssl-review.googlesource.com/1911 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-19Remove some dead code.Adam Langley
This change removes the old ASN.1 functions (ASN1_seq_unpack and ASN1_seq_pack) which have always been disabled in BoringSSL. It also removes code enabled by OPENSSL_EXPORT_VAR_AS_FUNCTION, which we have never used. Change-Id: I1fe323abf945a8a5828a04cc195c072e100a5095 Reviewed-on: https://boringssl-review.googlesource.com/1556 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-08-08Fix OID handling.Emilia Kasper
- Upon parsing, reject OIDs with invalid base-128 encoding. - Always NUL-terminate the destination buffer in OBJ_obj2txt printing function. CVE-2014-3508 (Imported from upstream's c01618dd822cc724c05eeb52455874ad068ec6a5) Change-Id: I12bdeeaa700183195e4c2f474f964f8ae7a04549 Reviewed-on: https://boringssl-review.googlesource.com/1440 Reviewed-by: David Benjamin <davidben@chromium.org> Reviewed-by: Adam Langley <agl@google.com>
2014-08-01Add visibility rules.Adam Langley
This change marks public symbols as dynamically exported. This means that it becomes viable to build a shared library of libcrypto and libssl with -fvisibility=hidden. On Windows, one not only needs to mark functions for export in a component, but also for import when using them from a different component. Because of this we have to build with |BORINGSSL_IMPLEMENTATION| defined when building the code. Other components, when including our headers, won't have that defined and then the |OPENSSL_EXPORT| tag becomes an import tag instead. See the #defines in base.h In the asm code, symbols are now hidden by default and those that need to be exported are wrapped by a C function. In order to support Chromium, a couple of libssl functions were moved to ssl.h from ssl_locl.h: ssl_get_new_session and ssl_update_cache. Change-Id: Ib4b76e2f1983ee066e7806c24721e8626d08a261 Reviewed-on: https://boringssl-review.googlesource.com/1350 Reviewed-by: Adam Langley <agl@google.com>
2014-07-29ASN1 sanity check.Adam Langley
Primitive encodings shouldn't use indefinite length constructed form. PR#2438 (partial). (Imported from upstream's 9223a31eb72dc46085ce97736c119c541973511e) Change-Id: I832d0bcda491c03c799b7b70184a1a3ec16b1592
2014-07-29Memory leak and NULL dereference fixes.Adam Langley
PR#3403 (Imported from upstream's e42c208235a86beee16ff0d0e6ca4e164a57d21a) Change-Id: Ibcdd8c95604f661055bfb1e91b15fd3686a04c0d
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-07-07Remove CHARSET_EBCDICAlex Chernyakhovsky
Since crypto/ebcdic.{c,h} are not present in BoringSSL, remove the #ifdefs Changes were made by running find . -type f -name *.c | xargs unifdef -m -U CHARSET_EBCDIC find . -type f -name *.h | xargs unifdef -m -U CHARSET_EBCDIC using unifdef 2.10. An additional two ifdefs (CHARSET_EBCDIC_not) were removed manually. Change-Id: Ie174bb00782cc44c63b0f9fab69619b3a9f66d42 Reviewed-on: https://boringssl-review.googlesource.com/1093 Reviewed-by: Adam Langley <agl@google.com>
2014-07-01Add license to charmap.pl.Adam Langley
I have confirmed with Dr. Stephen Henson (the author) that the file is licensed under the OpenSSL license. Change-Id: I97dc4c74b363184e1b36e5835bad684d66696d54
2014-06-21Set default global mask to UTF8 only.Adam Langley
(Imported from upstream's 08b172b975bcd5854f9201b9f89d05dc330adb79)
2014-06-21Const correctness.Adam Langley
This change fixes a number of build warnings.
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.)