feat: godot-engine-source-4.3-stable
This commit is contained in:
parent
c59a7dcade
commit
7125d019b5
11149 changed files with 5070401 additions and 0 deletions
98
engine/thirdparty/mbedtls/patches/msvc-redeclaration-bug.diff
vendored
Normal file
98
engine/thirdparty/mbedtls/patches/msvc-redeclaration-bug.diff
vendored
Normal file
|
|
@ -0,0 +1,98 @@
|
|||
diff --git a/thirdparty/mbedtls/include/psa/crypto.h b/thirdparty/mbedtls/include/psa/crypto.h
|
||||
index 92f9c824e9..1cc2e7e729 100644
|
||||
--- a/thirdparty/mbedtls/include/psa/crypto.h
|
||||
+++ b/thirdparty/mbedtls/include/psa/crypto.h
|
||||
@@ -107,7 +107,9 @@ psa_status_t psa_crypto_init(void);
|
||||
|
||||
/** Return an initial value for a key attributes structure.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_key_attributes_t psa_key_attributes_init(void);
|
||||
+#endif
|
||||
|
||||
/** Declare a key as persistent and set its key identifier.
|
||||
*
|
||||
@@ -333,7 +335,9 @@ static void psa_set_key_bits(psa_key_attributes_t *attributes,
|
||||
*
|
||||
* \return The key type stored in the attribute structure.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_key_type_t psa_get_key_type(const psa_key_attributes_t *attributes);
|
||||
+#endif
|
||||
|
||||
/** Retrieve the key size from key attributes.
|
||||
*
|
||||
@@ -936,7 +940,9 @@ typedef struct psa_hash_operation_s psa_hash_operation_t;
|
||||
|
||||
/** Return an initial value for a hash operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_hash_operation_t psa_hash_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Set up a multipart hash operation.
|
||||
*
|
||||
@@ -1295,7 +1301,9 @@ typedef struct psa_mac_operation_s psa_mac_operation_t;
|
||||
|
||||
/** Return an initial value for a MAC operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_mac_operation_t psa_mac_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Set up a multipart MAC calculation operation.
|
||||
*
|
||||
@@ -1708,7 +1716,9 @@ typedef struct psa_cipher_operation_s psa_cipher_operation_t;
|
||||
|
||||
/** Return an initial value for a cipher operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_cipher_operation_t psa_cipher_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Set the key for a multipart symmetric encryption operation.
|
||||
*
|
||||
@@ -2226,7 +2236,9 @@ typedef struct psa_aead_operation_s psa_aead_operation_t;
|
||||
|
||||
/** Return an initial value for an AEAD operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_aead_operation_t psa_aead_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Set the key for a multipart authenticated encryption operation.
|
||||
*
|
||||
@@ -3213,7 +3225,9 @@ typedef struct psa_key_derivation_s psa_key_derivation_operation_t;
|
||||
|
||||
/** Return an initial value for a key derivation operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_key_derivation_operation_t psa_key_derivation_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Set up a key derivation operation.
|
||||
*
|
||||
diff --git a/thirdparty/mbedtls/include/psa/crypto_extra.h b/thirdparty/mbedtls/include/psa/crypto_extra.h
|
||||
index 6ed1f6c43a..2686b9d74d 100644
|
||||
--- a/thirdparty/mbedtls/include/psa/crypto_extra.h
|
||||
+++ b/thirdparty/mbedtls/include/psa/crypto_extra.h
|
||||
@@ -915,7 +915,9 @@ typedef struct psa_pake_cipher_suite_s psa_pake_cipher_suite_t;
|
||||
|
||||
/** Return an initial value for a PAKE cipher suite object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_pake_cipher_suite_t psa_pake_cipher_suite_init(void);
|
||||
+#endif
|
||||
|
||||
/** Retrieve the PAKE algorithm from a PAKE cipher suite.
|
||||
*
|
||||
@@ -1048,7 +1050,9 @@ typedef struct psa_jpake_computation_stage_s psa_jpake_computation_stage_t;
|
||||
|
||||
/** Return an initial value for a PAKE operation object.
|
||||
*/
|
||||
+#if !(defined(__cplusplus) && defined(_MSC_VER))
|
||||
static psa_pake_operation_t psa_pake_operation_init(void);
|
||||
+#endif
|
||||
|
||||
/** Get the length of the password in bytes from given inputs.
|
||||
*
|
||||
132
engine/thirdparty/mbedtls/patches/no-flexible-arrays.diff
vendored
Normal file
132
engine/thirdparty/mbedtls/patches/no-flexible-arrays.diff
vendored
Normal file
|
|
@ -0,0 +1,132 @@
|
|||
diff --git a/thirdparty/mbedtls/include/psa/crypto.h b/thirdparty/mbedtls/include/psa/crypto.h
|
||||
index 7083bd911b..92f9c824e9 100644
|
||||
--- a/thirdparty/mbedtls/include/psa/crypto.h
|
||||
+++ b/thirdparty/mbedtls/include/psa/crypto.h
|
||||
@@ -3834,12 +3834,14 @@ psa_status_t psa_key_derivation_output_key(
|
||||
* It is implementation-dependent whether a failure to initialize
|
||||
* results in this error code.
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
psa_status_t psa_key_derivation_output_key_ext(
|
||||
const psa_key_attributes_t *attributes,
|
||||
psa_key_derivation_operation_t *operation,
|
||||
const psa_key_production_parameters_t *params,
|
||||
size_t params_data_length,
|
||||
mbedtls_svc_key_id_t *key);
|
||||
+#endif
|
||||
|
||||
/** Compare output data from a key derivation operation to an expected value.
|
||||
*
|
||||
@@ -4180,10 +4182,12 @@ psa_status_t psa_generate_key(const psa_key_attributes_t *attributes,
|
||||
* It is implementation-dependent whether a failure to initialize
|
||||
* results in this error code.
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
psa_status_t psa_generate_key_ext(const psa_key_attributes_t *attributes,
|
||||
const psa_key_production_parameters_t *params,
|
||||
size_t params_data_length,
|
||||
mbedtls_svc_key_id_t *key);
|
||||
+#endif
|
||||
|
||||
/**@}*/
|
||||
|
||||
diff --git a/thirdparty/mbedtls/include/psa/crypto_struct.h b/thirdparty/mbedtls/include/psa/crypto_struct.h
|
||||
index 3913551aa8..e2c227b2eb 100644
|
||||
--- a/thirdparty/mbedtls/include/psa/crypto_struct.h
|
||||
+++ b/thirdparty/mbedtls/include/psa/crypto_struct.h
|
||||
@@ -223,11 +223,13 @@ static inline struct psa_key_derivation_s psa_key_derivation_operation_init(
|
||||
return v;
|
||||
}
|
||||
|
||||
+#ifndef __cplusplus
|
||||
struct psa_key_production_parameters_s {
|
||||
/* Future versions may add other fields in this structure. */
|
||||
uint32_t flags;
|
||||
uint8_t data[];
|
||||
};
|
||||
+#endif
|
||||
|
||||
/** The default production parameters for key generation or key derivation.
|
||||
*
|
||||
diff --git a/thirdparty/mbedtls/include/psa/crypto_types.h b/thirdparty/mbedtls/include/psa/crypto_types.h
|
||||
index c21bad86cc..a36b6ee65d 100644
|
||||
--- a/thirdparty/mbedtls/include/psa/crypto_types.h
|
||||
+++ b/thirdparty/mbedtls/include/psa/crypto_types.h
|
||||
@@ -477,7 +477,9 @@ typedef uint16_t psa_key_derivation_step_t;
|
||||
* - Other key types: reserved for future use. \c flags must be 0.
|
||||
*
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
typedef struct psa_key_production_parameters_s psa_key_production_parameters_t;
|
||||
+#endif
|
||||
|
||||
/**@}*/
|
||||
|
||||
diff --git a/thirdparty/mbedtls/library/psa_crypto_core.h b/thirdparty/mbedtls/library/psa_crypto_core.h
|
||||
index 9462d2e8be..c059162efe 100644
|
||||
--- a/thirdparty/mbedtls/library/psa_crypto_core.h
|
||||
+++ b/thirdparty/mbedtls/library/psa_crypto_core.h
|
||||
@@ -351,9 +351,11 @@ psa_status_t psa_export_public_key_internal(
|
||||
* \param[in] params The key production parameters to check.
|
||||
* \param params_data_length Size of `params->data` in bytes.
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
int psa_key_production_parameters_are_default(
|
||||
const psa_key_production_parameters_t *params,
|
||||
size_t params_data_length);
|
||||
+#endif
|
||||
|
||||
/**
|
||||
* \brief Generate a key.
|
||||
@@ -378,12 +380,14 @@ int psa_key_production_parameters_are_default(
|
||||
* \retval #PSA_ERROR_BUFFER_TOO_SMALL
|
||||
* The size of \p key_buffer is too small.
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
psa_status_t psa_generate_key_internal(const psa_key_attributes_t *attributes,
|
||||
const psa_key_production_parameters_t *params,
|
||||
size_t params_data_length,
|
||||
uint8_t *key_buffer,
|
||||
size_t key_buffer_size,
|
||||
size_t *key_buffer_length);
|
||||
+#endif
|
||||
|
||||
/** Sign a message with a private key. For hash-and-sign algorithms,
|
||||
* this includes the hashing step.
|
||||
diff --git a/thirdparty/mbedtls/library/psa_crypto_driver_wrappers.h b/thirdparty/mbedtls/library/psa_crypto_driver_wrappers.h
|
||||
index ea6aee32eb..6919971aca 100644
|
||||
--- a/thirdparty/mbedtls/library/psa_crypto_driver_wrappers.h
|
||||
+++ b/thirdparty/mbedtls/library/psa_crypto_driver_wrappers.h
|
||||
@@ -728,6 +728,7 @@ static inline psa_status_t psa_driver_wrapper_get_key_buffer_size_from_key_data(
|
||||
}
|
||||
}
|
||||
|
||||
+#ifndef __cplusplus
|
||||
static inline psa_status_t psa_driver_wrapper_generate_key(
|
||||
const psa_key_attributes_t *attributes,
|
||||
const psa_key_production_parameters_t *params, size_t params_data_length,
|
||||
@@ -832,6 +833,7 @@ static inline psa_status_t psa_driver_wrapper_generate_key(
|
||||
|
||||
return( status );
|
||||
}
|
||||
+#endif
|
||||
|
||||
static inline psa_status_t psa_driver_wrapper_import_key(
|
||||
const psa_key_attributes_t *attributes,
|
||||
diff --git a/thirdparty/mbedtls/library/psa_crypto_rsa.h b/thirdparty/mbedtls/library/psa_crypto_rsa.h
|
||||
index ffeef26be1..6d695ddf50 100644
|
||||
--- a/thirdparty/mbedtls/library/psa_crypto_rsa.h
|
||||
+++ b/thirdparty/mbedtls/library/psa_crypto_rsa.h
|
||||
@@ -130,10 +130,12 @@ psa_status_t mbedtls_psa_rsa_export_public_key(
|
||||
* \retval #PSA_ERROR_BUFFER_TOO_SMALL
|
||||
* The size of \p key_buffer is too small.
|
||||
*/
|
||||
+#ifndef __cplusplus
|
||||
psa_status_t mbedtls_psa_rsa_generate_key(
|
||||
const psa_key_attributes_t *attributes,
|
||||
const psa_key_production_parameters_t *params, size_t params_data_length,
|
||||
uint8_t *key_buffer, size_t key_buffer_size, size_t *key_buffer_length);
|
||||
+#endif
|
||||
|
||||
/** Sign an already-calculated hash with an RSA private key.
|
||||
*
|
||||
Loading…
Add table
Add a link
Reference in a new issue