aa58513f40
In the ancient times, before ex_data and OpenSSL, SSLeay supported a single app_data slot in various types. Later app_data begat ex_data, and app_data was replaced by compatibility macros to ex_data index zero. Today, app_data is still in use, but ex_data never reserved index zero for app_data. This causes some danger where, if the first ex_data registration did not use NULL callbacks, the registration's callbacks would collide with app_data. Instead, add an option to the types with app_data to reserve index zero. Also switch SSL_get_ex_data_X509_STORE_CTX_idx to always return zero rather than allocate a new one. It used to be that you used X509_STORE_CTX_get_app_data. I only found one consumer that we probably don't care about, but, to be safe and since it's easy, go with the conservative option. (Although SSL_get_ex_data_X509_STORE_CTX_idx wasn't guaranteed to alias app_data, in practice it always did. No consumer ever calls X509_STORE_CTX_get_ex_new_index.) Change-Id: Ie75b279d60aefd003ffef103f99021c5d696a5e9 Reviewed-on: https://boringssl-review.googlesource.com/5313 Reviewed-by: Adam Langley <agl@google.com> |
||
---|---|---|
.. | ||
a_digest.c | ||
a_sign.c | ||
a_strex.c | ||
a_verify.c | ||
asn1_gen.c | ||
by_dir.c | ||
by_file.c | ||
charmap.h | ||
CMakeLists.txt | ||
i2d_pr.c | ||
pkcs7_test.c | ||
pkcs7.c | ||
t_crl.c | ||
t_req.c | ||
t_x509.c | ||
t_x509a.c | ||
vpm_int.h | ||
x509_att.c | ||
x509_cmp.c | ||
x509_d2.c | ||
x509_def.c | ||
x509_ext.c | ||
x509_lu.c | ||
x509_obj.c | ||
x509_r2x.c | ||
x509_req.c | ||
x509_set.c | ||
x509_trs.c | ||
x509_txt.c | ||
x509_v3.c | ||
x509_vfy.c | ||
x509_vpm.c | ||
x509.c | ||
x509cset.c | ||
x509name.c | ||
x509rset.c | ||
x509spki.c | ||
x509type.c | ||
x_algor.c | ||
x_all.c | ||
x_attrib.c | ||
x_crl.c | ||
x_exten.c | ||
x_info.c | ||
x_name.c | ||
x_pkey.c | ||
x_pubkey.c | ||
x_req.c | ||
x_sig.c | ||
x_spki.c | ||
x_val.c | ||
x_x509.c | ||
x_x509a.c |