boringssl/crypto/x509
David Benjamin 17cf2cb1d2 Work around language and compiler bug in memcpy, etc.
Most C standard library functions are undefined if passed NULL, even
when the corresponding length is zero. This gives them (and, in turn,
all functions which call them) surprising behavior on empty arrays.
Some compilers will miscompile code due to this rule. See also
https://www.imperialviolet.org/2016/06/26/nonnull.html

Add OPENSSL_memcpy, etc., wrappers which avoid this problem.

BUG=23

Change-Id: I95f42b23e92945af0e681264fffaf578e7f8465e
Reviewed-on: https://boringssl-review.googlesource.com/12928
Commit-Queue: David Benjamin <davidben@google.com>
Reviewed-by: Adam Langley <agl@google.com>
2016-12-21 20:34:47 +00:00
..
a_digest.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
a_sign.c Move all signature algorithm code to crypto/x509. 2016-02-26 22:39:02 +00:00
a_strex.c Fix ASN1_STRING_to_UTF8 could not convert NumericString 2016-07-26 22:41:42 +00:00
a_verify.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
algorithm.c Align with upstream's error strings, take two. 2016-03-15 16:02:12 +00:00
asn1_gen.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
by_dir.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
by_file.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
charmap.h OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
CMakeLists.txt Move all signature algorithm code to crypto/x509. 2016-02-26 22:39:02 +00:00
i2d_pr.c Slightly simplify and deprecate i2d_{Public,Private}Key. 2016-02-17 16:31:26 +00:00
internal.h Move all signature algorithm code to crypto/x509. 2016-02-26 22:39:02 +00:00
pkcs7_test.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
pkcs7.c Check for overflow when parsing a CBS with d2i_*. 2015-11-16 23:17:42 +00:00
rsa_pss.c Remove trailing ';' from macros 2016-09-12 19:17:26 +00:00
t_crl.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
t_req.c Remove the func parameter to OPENSSL_PUT_ERROR. 2015-07-16 02:02:37 +00:00
t_x509.c Remove the last of BIO_print_errors. 2016-11-03 16:44:32 +00:00
t_x509a.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
vpm_int.h OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_att.c Fix an error path leak in int X509_ATTRIBUTE_set1_data() 2016-07-26 19:53:44 +00:00
x509_cmp.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_d2.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_def.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_ext.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_lu.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_obj.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_r2x.c Fix a few leaks in X509_REQ_to_X509. 2016-09-09 20:17:16 +00:00
x509_req.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_set.c Add various 1.1.0 accessors. 2016-08-10 16:52:15 +00:00
x509_test.cc Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_trs.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_txt.c Ensure verify error is set when X509_verify_cert() fails. 2016-06-09 17:29:39 +00:00
x509_v3.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509_vfy.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509_vpm.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509.c Align with upstream's error strings, take two. 2016-03-15 16:02:12 +00:00
x509cset.c Finish aligning up_ref functions with OpenSSL 1.1.0. 2016-08-11 16:51:52 +00:00
x509name.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x509rset.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509spki.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x509type.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_algor.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_all.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_attrib.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_crl.c Correctly find all critical CRL extensions. 2016-10-24 20:09:28 +00:00
x_exten.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_info.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_name.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x_pkey.c Work around language and compiler bug in memcpy, etc. 2016-12-21 20:34:47 +00:00
x_pubkey.c Change |EVP_PKEY_up_ref| to return int. 2016-07-12 17:55:41 +00:00
x_req.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_sig.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_spki.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_val.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00
x_x509.c Fix X509_parse_from_buffer when failing to parse. 2016-12-08 16:20:49 +00:00
x_x509a.c OpenSSL reformat x509/, x509v3/, pem/ and asn1/. 2016-01-19 17:01:51 +00:00