Files
godot/thirdparty/mbedtls/patches/0001-msvc-2019-psa-redeclaration.patch
noahbackus 9d30169a8d
Some checks failed
🔗 GHA / 📊 Static checks (push) Has been cancelled
🔗 GHA / 🤖 Android (push) Has been cancelled
🔗 GHA / 🍏 iOS (push) Has been cancelled
🔗 GHA / 🐧 Linux (push) Has been cancelled
🔗 GHA / 🍎 macOS (push) Has been cancelled
🔗 GHA / 🏁 Windows (push) Has been cancelled
🔗 GHA / 🌐 Web (push) Has been cancelled
initial commit, 4.5 stable
2025-09-16 20:46:46 -04:00

99 lines
3.4 KiB
Diff

diff --git a/thirdparty/mbedtls/include/psa/crypto.h b/thirdparty/mbedtls/include/psa/crypto.h
index 2fe9f35ec3..ed7da26276 100644
--- a/thirdparty/mbedtls/include/psa/crypto.h
+++ b/thirdparty/mbedtls/include/psa/crypto.h
@@ -119,7 +119,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.
*
@@ -348,7 +350,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.
*
@@ -951,7 +955,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.
*
@@ -1310,7 +1316,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.
*
@@ -1723,7 +1731,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.
*
@@ -2241,7 +2251,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.
*
@@ -3228,7 +3240,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 70740901e1..e503c9e3ca 100644
--- a/thirdparty/mbedtls/include/psa/crypto_extra.h
+++ b/thirdparty/mbedtls/include/psa/crypto_extra.h
@@ -1164,7 +1164,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.
*
@@ -1297,7 +1299,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.
*