Merge pull request #4448 from sysown/v2.6.0-update_to_openssl_v3.2.1

update OpenSSL from v3.1.4 to v3.2.1
pull/4258/head
René Cannaò 2 years ago committed by GitHub
commit b3dcee9c53
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1 +1 @@
openssl-3.1.4
openssl-3.2.1

@ -17,9 +17,15 @@ echo "extracting 'struct bio_st' from 'lib/mysql_data_stream.cpp'"
LIBBIOST=$(cd ../../; cat ./lib/mysql_data_stream.cpp | sed '/^\/\*/,/*\//d' | sed -n '/^struct bio_st {/,/}/p')
echo -n "Comparing ... "
if [[ "$LIBBIOST" == "$DEPBIOST" ]]; then
echo "PASS - bio_st is a match!";
if [[ "$LIBBIOST" =~ "$DEPBIOST" ]]; then
echo "PASS - bio_st is a match!"
else
echo "FAIL - bio_st does not match!";
echo "FAIL - bio_st does not match!"
echo
echo ">>> lib/mysql_data_stream.cpp"
echo "$LIBBIOST"
echo "==="
echo "$DEPBIOST"
echo "<<< deps/libssl/openssl/crypto/bio/bio_local.h"
exit 1
fi

@ -10,36 +10,39 @@
#include <openssl/x509v3.h>
/*
in libssl 1.1.0
struct bio_st {
const BIO_METHOD *method;
long (*callback) (struct bio_st *, int, const char *, int, long, long);
char *cb_arg;
int init;
int shutdown;
int flags;
int retry_reason;
int num;
void *ptr;
struct bio_st *next_bio;
struct bio_st *prev_bio;
int references;
uint64_t num_read;
uint64_t num_write;
CRYPTO_EX_DATA ex_data;
CRYPTO_RWLOCK *lock;
};
*/
typedef int CRYPTO_REF_COUNT;
/**
* @brief This is the 'bio_st' struct definition from libssl 3.0.0. NOTE: This is an internal struct from
* @brief This is the 'bio_st' struct definition from libssl. NOTE: This is an internal struct from
* OpenSSL library, currently it's used for performing checks on the reads/writes performed on the BIO objects.
* It's extremely important to keep this struct up to date with each OpenSSL dependency update.
*/
typedef int CRYPTO_REF_COUNT;
#if (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x10100000
#pragma message "libssl 1.1.x detected"
struct bio_st {
const BIO_METHOD *method;
/* bio, mode, argp, argi, argl, ret */
BIO_callback_fn callback;
BIO_callback_fn_ex callback_ex;
char *cb_arg; /* first argument for the callback */
int init;
int shutdown;
int flags; /* extra storage */
int retry_reason;
int num;
void *ptr;
struct bio_st *next_bio; /* used by filter BIOs */
struct bio_st *prev_bio; /* used by filter BIOs */
CRYPTO_REF_COUNT references;
uint64_t num_read;
uint64_t num_write;
CRYPTO_EX_DATA ex_data;
CRYPTO_RWLOCK *lock;
};
#elif (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30000000 || (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30100000
#pragma message "libssl 3.0.x / 3.1.x detected"
struct bio_st {
OSSL_LIB_CTX *libctx;
const BIO_METHOD *method;
@ -64,6 +67,35 @@ struct bio_st {
CRYPTO_RWLOCK *lock;
};
#elif (OPENSSL_VERSION_NUMBER & 0xFFFF0000) == 0x30200000
#pragma message "libssl 3.2.x detected"
struct bio_st {
OSSL_LIB_CTX *libctx;
const BIO_METHOD *method;
/* bio, mode, argp, argi, argl, ret */
#ifndef OPENSSL_NO_DEPRECATED_3_0
BIO_callback_fn callback;
#endif
BIO_callback_fn_ex callback_ex;
char *cb_arg; /* first argument for the callback */
int init;
int shutdown;
int flags; /* extra storage */
int retry_reason;
int num;
void *ptr;
struct bio_st *next_bio; /* used by filter BIOs */
struct bio_st *prev_bio; /* used by filter BIOs */
CRYPTO_REF_COUNT references;
uint64_t num_read;
uint64_t num_write;
CRYPTO_EX_DATA ex_data;
};
#else
#error "libssl version not supported: OPENSSL_VERSION_NUMBER = " ##OPENSSL_VERSION_NUMBER
#endif
#define RESULTSET_BUFLEN_DS_16K 16000
#define RESULTSET_BUFLEN_DS_1M 1000*1024

Loading…
Cancel
Save