update main-with-bazel from master branch
This commit is contained in:
@@ -714,7 +714,7 @@ int BIO_get_ex_new_index(long argl, void *argp,
|
||||
CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class, argl, argp, free_func);
|
||||
}
|
||||
|
||||
int BIO_set_ex_data(BIO *bio, int idx, void *data) {
|
||||
|
||||
@@ -934,7 +934,7 @@ err:
|
||||
|
||||
int DSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class, argl, argp, free_func);
|
||||
}
|
||||
|
||||
int DSA_set_ex_data(DSA *dsa, int idx, void *arg) {
|
||||
|
||||
@@ -132,8 +132,8 @@ struct crypto_ex_data_func_st {
|
||||
CRYPTO_EX_DATA_FUNCS *next;
|
||||
};
|
||||
|
||||
int CRYPTO_get_ex_new_index(CRYPTO_EX_DATA_CLASS *ex_data_class, long argl,
|
||||
void *argp, CRYPTO_EX_free *free_func) {
|
||||
int CRYPTO_get_ex_new_index_ex(CRYPTO_EX_DATA_CLASS *ex_data_class, long argl,
|
||||
void *argp, CRYPTO_EX_free *free_func) {
|
||||
CRYPTO_EX_DATA_FUNCS *funcs = OPENSSL_malloc(sizeof(CRYPTO_EX_DATA_FUNCS));
|
||||
if (funcs == NULL) {
|
||||
return -1;
|
||||
@@ -214,7 +214,7 @@ void CRYPTO_free_ex_data(CRYPTO_EX_DATA_CLASS *ex_data_class, void *obj,
|
||||
}
|
||||
|
||||
uint32_t num_funcs = CRYPTO_atomic_load_u32(&ex_data_class->num_funcs);
|
||||
// |CRYPTO_get_ex_new_index| will not allocate indices beyond |INT_MAX|.
|
||||
// |CRYPTO_get_ex_new_index_ex| will not allocate indices beyond |INT_MAX|.
|
||||
assert(num_funcs <= (size_t)(INT_MAX - ex_data_class->num_reserved));
|
||||
|
||||
// Defer dereferencing |ex_data_class->funcs| and |funcs->next|. It must come
|
||||
|
||||
@@ -534,7 +534,7 @@ int EC_KEY_generate_key_fips(EC_KEY *eckey) {
|
||||
int EC_KEY_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(g_ec_ex_data_class_bss_get(), argl, argp,
|
||||
return CRYPTO_get_ex_new_index_ex(g_ec_ex_data_class_bss_get(), argl, argp,
|
||||
free_func);
|
||||
}
|
||||
|
||||
|
||||
@@ -439,7 +439,7 @@ int RSA_is_opaque(const RSA *rsa) {
|
||||
|
||||
int RSA_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(g_rsa_ex_data_class_bss_get(), argl, argp,
|
||||
return CRYPTO_get_ex_new_index_ex(g_rsa_ex_data_class_bss_get(), argl, argp,
|
||||
free_func);
|
||||
}
|
||||
|
||||
|
||||
@@ -905,12 +905,12 @@ typedef struct {
|
||||
#define CRYPTO_EX_DATA_CLASS_INIT_WITH_APP_DATA \
|
||||
{CRYPTO_MUTEX_INIT, NULL, NULL, 0, 1}
|
||||
|
||||
// CRYPTO_get_ex_new_index allocates a new index for |ex_data_class|. Each class
|
||||
// of object should provide a wrapper function that uses the correct
|
||||
// CRYPTO_get_ex_new_index_ex allocates a new index for |ex_data_class|. Each
|
||||
// class of object should provide a wrapper function that uses the correct
|
||||
// |CRYPTO_EX_DATA_CLASS|. It returns the new index on success and -1 on error.
|
||||
OPENSSL_EXPORT int CRYPTO_get_ex_new_index(CRYPTO_EX_DATA_CLASS *ex_data_class,
|
||||
long argl, void *argp,
|
||||
CRYPTO_EX_free *free_func);
|
||||
OPENSSL_EXPORT int CRYPTO_get_ex_new_index_ex(
|
||||
CRYPTO_EX_DATA_CLASS *ex_data_class, long argl, void *argp,
|
||||
CRYPTO_EX_free *free_func);
|
||||
|
||||
// CRYPTO_set_ex_data sets an extra data pointer on a given object. Each class
|
||||
// of object should provide a wrapper function.
|
||||
|
||||
@@ -1409,7 +1409,7 @@ int X509_STORE_CTX_get_ex_new_index(long argl, void *argp,
|
||||
CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class, argl, argp, free_func);
|
||||
}
|
||||
|
||||
int X509_STORE_CTX_set_ex_data(X509_STORE_CTX *ctx, int idx, void *data) {
|
||||
|
||||
@@ -380,7 +380,7 @@ int X509_up_ref(X509 *x) {
|
||||
int X509_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class, argl, argp, free_func);
|
||||
}
|
||||
|
||||
int X509_set_ex_data(X509 *r, int idx, void *arg) {
|
||||
|
||||
@@ -109,7 +109,7 @@ extern "C" {
|
||||
// A consumer may use this symbol in the preprocessor to temporarily build
|
||||
// against multiple revisions of BoringSSL at the same time. It is not
|
||||
// recommended to do so for longer than is necessary.
|
||||
#define BORINGSSL_API_VERSION 30
|
||||
#define BORINGSSL_API_VERSION 31
|
||||
|
||||
#if defined(BORINGSSL_SHARED_LIBRARY)
|
||||
|
||||
|
||||
@@ -179,7 +179,7 @@ OPENSSL_EXPORT void *TYPE_get_app_data(const TYPE *t);
|
||||
// |parent|. As |parent| will shortly be destroyed, callers must not perform
|
||||
// operations that would increment its reference count, pass ownership, or
|
||||
// assume the object outlives the function call. The arguments |argl| and |argp|
|
||||
// contain opaque values that were given to |CRYPTO_get_ex_new_index|.
|
||||
// contain opaque values that were given to |CRYPTO_get_ex_new_index_ex|.
|
||||
//
|
||||
// This callback may be called with a NULL value for |ptr| if |parent| has no
|
||||
// value set for this index. However, the callbacks may also be skipped entirely
|
||||
|
||||
+3
-2
@@ -2673,7 +2673,8 @@ int SSL_set_quic_method(SSL *ssl, const SSL_QUIC_METHOD *quic_method) {
|
||||
|
||||
int SSL_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused, CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class_ssl, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class_ssl, argl, argp,
|
||||
free_func);
|
||||
}
|
||||
|
||||
int SSL_set_ex_data(SSL *ssl, int idx, void *data) {
|
||||
@@ -2687,7 +2688,7 @@ void *SSL_get_ex_data(const SSL *ssl, int idx) {
|
||||
int SSL_CTX_get_ex_new_index(long argl, void *argp, CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class_ssl_ctx, argl, argp,
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class_ssl_ctx, argl, argp,
|
||||
free_func);
|
||||
}
|
||||
|
||||
|
||||
@@ -1203,7 +1203,7 @@ int SSL_SESSION_get_ex_new_index(long argl, void *argp,
|
||||
CRYPTO_EX_unused *unused,
|
||||
CRYPTO_EX_dup *dup_unused,
|
||||
CRYPTO_EX_free *free_func) {
|
||||
return CRYPTO_get_ex_new_index(&g_ex_data_class, argl, argp, free_func);
|
||||
return CRYPTO_get_ex_new_index_ex(&g_ex_data_class, argl, argp, free_func);
|
||||
}
|
||||
|
||||
int SSL_SESSION_set_ex_data(SSL_SESSION *session, int idx, void *arg) {
|
||||
|
||||
Reference in New Issue
Block a user