Browse Source

mbedtls: Update to upstream version 2.28.7

Rémi Verschelde 1 year ago
parent
commit
dec635119e
100 changed files with 231 additions and 1334 deletions
  1. 2 2
      thirdparty/README.md
  2. 1 13
      thirdparty/mbedtls/include/mbedtls/aes.h
  3. 1 13
      thirdparty/mbedtls/include/mbedtls/aesni.h
  4. 1 13
      thirdparty/mbedtls/include/mbedtls/arc4.h
  5. 1 13
      thirdparty/mbedtls/include/mbedtls/aria.h
  6. 1 13
      thirdparty/mbedtls/include/mbedtls/asn1.h
  7. 1 13
      thirdparty/mbedtls/include/mbedtls/asn1write.h
  8. 1 13
      thirdparty/mbedtls/include/mbedtls/base64.h
  9. 1 13
      thirdparty/mbedtls/include/mbedtls/bignum.h
  10. 1 13
      thirdparty/mbedtls/include/mbedtls/blowfish.h
  11. 1 13
      thirdparty/mbedtls/include/mbedtls/bn_mul.h
  12. 1 13
      thirdparty/mbedtls/include/mbedtls/camellia.h
  13. 1 13
      thirdparty/mbedtls/include/mbedtls/ccm.h
  14. 1 13
      thirdparty/mbedtls/include/mbedtls/certs.h
  15. 1 13
      thirdparty/mbedtls/include/mbedtls/chacha20.h
  16. 1 13
      thirdparty/mbedtls/include/mbedtls/chachapoly.h
  17. 1 13
      thirdparty/mbedtls/include/mbedtls/check_config.h
  18. 1 13
      thirdparty/mbedtls/include/mbedtls/cipher.h
  19. 1 13
      thirdparty/mbedtls/include/mbedtls/cipher_internal.h
  20. 1 13
      thirdparty/mbedtls/include/mbedtls/cmac.h
  21. 1 13
      thirdparty/mbedtls/include/mbedtls/compat-1.3.h
  22. 4 13
      thirdparty/mbedtls/include/mbedtls/config.h
  23. 1 13
      thirdparty/mbedtls/include/mbedtls/constant_time.h
  24. 1 13
      thirdparty/mbedtls/include/mbedtls/ctr_drbg.h
  25. 1 13
      thirdparty/mbedtls/include/mbedtls/debug.h
  26. 1 13
      thirdparty/mbedtls/include/mbedtls/des.h
  27. 1 13
      thirdparty/mbedtls/include/mbedtls/dhm.h
  28. 1 13
      thirdparty/mbedtls/include/mbedtls/ecdh.h
  29. 1 13
      thirdparty/mbedtls/include/mbedtls/ecdsa.h
  30. 1 13
      thirdparty/mbedtls/include/mbedtls/ecjpake.h
  31. 1 13
      thirdparty/mbedtls/include/mbedtls/ecp.h
  32. 1 13
      thirdparty/mbedtls/include/mbedtls/ecp_internal.h
  33. 1 13
      thirdparty/mbedtls/include/mbedtls/entropy.h
  34. 1 13
      thirdparty/mbedtls/include/mbedtls/entropy_poll.h
  35. 1 13
      thirdparty/mbedtls/include/mbedtls/error.h
  36. 1 13
      thirdparty/mbedtls/include/mbedtls/gcm.h
  37. 1 13
      thirdparty/mbedtls/include/mbedtls/havege.h
  38. 1 13
      thirdparty/mbedtls/include/mbedtls/hkdf.h
  39. 1 13
      thirdparty/mbedtls/include/mbedtls/hmac_drbg.h
  40. 1 13
      thirdparty/mbedtls/include/mbedtls/md.h
  41. 1 13
      thirdparty/mbedtls/include/mbedtls/md2.h
  42. 1 13
      thirdparty/mbedtls/include/mbedtls/md4.h
  43. 1 13
      thirdparty/mbedtls/include/mbedtls/md5.h
  44. 1 13
      thirdparty/mbedtls/include/mbedtls/md_internal.h
  45. 1 13
      thirdparty/mbedtls/include/mbedtls/memory_buffer_alloc.h
  46. 1 13
      thirdparty/mbedtls/include/mbedtls/net.h
  47. 1 13
      thirdparty/mbedtls/include/mbedtls/net_sockets.h
  48. 1 13
      thirdparty/mbedtls/include/mbedtls/nist_kw.h
  49. 1 13
      thirdparty/mbedtls/include/mbedtls/oid.h
  50. 1 13
      thirdparty/mbedtls/include/mbedtls/padlock.h
  51. 1 13
      thirdparty/mbedtls/include/mbedtls/pem.h
  52. 1 13
      thirdparty/mbedtls/include/mbedtls/pk.h
  53. 1 13
      thirdparty/mbedtls/include/mbedtls/pk_internal.h
  54. 1 13
      thirdparty/mbedtls/include/mbedtls/pkcs11.h
  55. 1 13
      thirdparty/mbedtls/include/mbedtls/pkcs12.h
  56. 1 13
      thirdparty/mbedtls/include/mbedtls/pkcs5.h
  57. 1 13
      thirdparty/mbedtls/include/mbedtls/platform.h
  58. 1 13
      thirdparty/mbedtls/include/mbedtls/platform_time.h
  59. 1 13
      thirdparty/mbedtls/include/mbedtls/platform_util.h
  60. 1 13
      thirdparty/mbedtls/include/mbedtls/poly1305.h
  61. 1 13
      thirdparty/mbedtls/include/mbedtls/ripemd160.h
  62. 10 13
      thirdparty/mbedtls/include/mbedtls/rsa.h
  63. 1 13
      thirdparty/mbedtls/include/mbedtls/rsa_internal.h
  64. 1 13
      thirdparty/mbedtls/include/mbedtls/sha1.h
  65. 1 13
      thirdparty/mbedtls/include/mbedtls/sha256.h
  66. 1 13
      thirdparty/mbedtls/include/mbedtls/sha512.h
  67. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl.h
  68. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl_cache.h
  69. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl_ciphersuites.h
  70. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl_cookie.h
  71. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl_internal.h
  72. 1 13
      thirdparty/mbedtls/include/mbedtls/ssl_ticket.h
  73. 1 13
      thirdparty/mbedtls/include/mbedtls/threading.h
  74. 1 13
      thirdparty/mbedtls/include/mbedtls/timing.h
  75. 5 17
      thirdparty/mbedtls/include/mbedtls/version.h
  76. 1 13
      thirdparty/mbedtls/include/mbedtls/x509.h
  77. 1 13
      thirdparty/mbedtls/include/mbedtls/x509_crl.h
  78. 1 13
      thirdparty/mbedtls/include/mbedtls/x509_crt.h
  79. 1 13
      thirdparty/mbedtls/include/mbedtls/x509_csr.h
  80. 1 13
      thirdparty/mbedtls/include/mbedtls/xtea.h
  81. 1 13
      thirdparty/mbedtls/library/aes.c
  82. 1 13
      thirdparty/mbedtls/library/aesni.c
  83. 1 13
      thirdparty/mbedtls/library/arc4.c
  84. 1 13
      thirdparty/mbedtls/library/aria.c
  85. 1 13
      thirdparty/mbedtls/library/asn1parse.c
  86. 1 13
      thirdparty/mbedtls/library/asn1write.c
  87. 1 13
      thirdparty/mbedtls/library/base64.c
  88. 45 67
      thirdparty/mbedtls/library/bignum.c
  89. 71 0
      thirdparty/mbedtls/library/bignum_internal.h
  90. 1 13
      thirdparty/mbedtls/library/blowfish.c
  91. 1 13
      thirdparty/mbedtls/library/camellia.c
  92. 1 13
      thirdparty/mbedtls/library/ccm.c
  93. 1 13
      thirdparty/mbedtls/library/certs.c
  94. 1 13
      thirdparty/mbedtls/library/chacha20.c
  95. 1 13
      thirdparty/mbedtls/library/chachapoly.c
  96. 1 13
      thirdparty/mbedtls/library/check_crypto_config.h
  97. 1 13
      thirdparty/mbedtls/library/cipher.c
  98. 1 13
      thirdparty/mbedtls/library/cipher_wrap.c
  99. 1 13
      thirdparty/mbedtls/library/cmac.c
  100. 1 13
      thirdparty/mbedtls/library/common.h

+ 2 - 2
thirdparty/README.md

@@ -519,7 +519,7 @@ in the MSVC debugger.
 ## mbedtls
 ## mbedtls
 
 
 - Upstream: https://github.com/Mbed-TLS/mbedtls
 - Upstream: https://github.com/Mbed-TLS/mbedtls
-- Version: 2.28.5 (47e8cc9db2e469d902b0e3093ae9e482c3d87188, 2023)
+- Version: 2.28.7 (555f84735aecdbd76a566cf087ec8425dfb0c8ab, 2024)
 - License: Apache 2.0
 - License: Apache 2.0
 
 
 File extracted from upstream release tarball:
 File extracted from upstream release tarball:
@@ -528,7 +528,7 @@ File extracted from upstream release tarball:
   except `config_psa.h` and `psa_util.h`
   except `config_psa.h` and `psa_util.h`
 - All `.c` and `.h` from `library/` to `thirdparty/mbedtls/library/` except
 - All `.c` and `.h` from `library/` to `thirdparty/mbedtls/library/` except
   those starting with `psa_*`
   those starting with `psa_*`
-- The `LICENSE` file
+- The `LICENSE` file (edited to keep only the Apache 2.0 variant)
 - Applied the patch `windows-arm64-hardclock.diff` to fix Windows ARM64 build
 - Applied the patch `windows-arm64-hardclock.diff` to fix Windows ARM64 build
   Applied the patch `windows-entropy-bcrypt.diff` to fix Windows Store support
   Applied the patch `windows-entropy-bcrypt.diff` to fix Windows Store support
 - Added 2 files `godot_core_mbedtls_platform.c` and `godot_core_mbedtls_config.h`
 - Added 2 files `godot_core_mbedtls_platform.c` and `godot_core_mbedtls_config.h`

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/aes.h

@@ -22,19 +22,7 @@
 
 
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_AES_H
 #ifndef MBEDTLS_AES_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/aesni.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_AESNI_H
 #ifndef MBEDTLS_AESNI_H
 #define MBEDTLS_AESNI_H
 #define MBEDTLS_AESNI_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/arc4.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  *
  *
  */
  */
 #ifndef MBEDTLS_ARC4_H
 #ifndef MBEDTLS_ARC4_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/aria.h

@@ -11,19 +11,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_ARIA_H
 #ifndef MBEDTLS_ARIA_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/asn1.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ASN1_H
 #ifndef MBEDTLS_ASN1_H
 #define MBEDTLS_ASN1_H
 #define MBEDTLS_ASN1_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/asn1write.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ASN1_WRITE_H
 #ifndef MBEDTLS_ASN1_WRITE_H
 #define MBEDTLS_ASN1_WRITE_H
 #define MBEDTLS_ASN1_WRITE_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/base64.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_BASE64_H
 #ifndef MBEDTLS_BASE64_H
 #define MBEDTLS_BASE64_H
 #define MBEDTLS_BASE64_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/bignum.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_BIGNUM_H
 #ifndef MBEDTLS_BIGNUM_H
 #define MBEDTLS_BIGNUM_H
 #define MBEDTLS_BIGNUM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/blowfish.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_BLOWFISH_H
 #ifndef MBEDTLS_BLOWFISH_H
 #define MBEDTLS_BLOWFISH_H
 #define MBEDTLS_BLOWFISH_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/bn_mul.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  *      Multiply source vector [s] with b, add result
  *      Multiply source vector [s] with b, add result

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/camellia.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_CAMELLIA_H
 #ifndef MBEDTLS_CAMELLIA_H
 #define MBEDTLS_CAMELLIA_H
 #define MBEDTLS_CAMELLIA_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ccm.h

@@ -29,19 +29,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CCM_H
 #ifndef MBEDTLS_CCM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/certs.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_CERTS_H
 #ifndef MBEDTLS_CERTS_H
 #define MBEDTLS_CERTS_H
 #define MBEDTLS_CERTS_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/chacha20.h

@@ -14,19 +14,7 @@
 
 
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CHACHA20_H
 #ifndef MBEDTLS_CHACHA20_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/chachapoly.h

@@ -14,19 +14,7 @@
 
 
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CHACHAPOLY_H
 #ifndef MBEDTLS_CHACHAPOLY_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/check_config.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/cipher.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CIPHER_H
 #ifndef MBEDTLS_CIPHER_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/cipher_internal.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_CIPHER_WRAP_H
 #ifndef MBEDTLS_CIPHER_WRAP_H
 #define MBEDTLS_CIPHER_WRAP_H
 #define MBEDTLS_CIPHER_WRAP_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/cmac.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CMAC_H
 #ifndef MBEDTLS_CMAC_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/compat-1.3.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #if !defined(MBEDTLS_CONFIG_FILE)
 #if !defined(MBEDTLS_CONFIG_FILE)

+ 4 - 13
thirdparty/mbedtls/include/mbedtls/config.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CONFIG_H
 #ifndef MBEDTLS_CONFIG_H
@@ -863,6 +851,9 @@
  * contexts and therefore is a compatibility break for applications that access
  * contexts and therefore is a compatibility break for applications that access
  * fields of a mbedtls_ecdh_context structure directly. See also
  * fields of a mbedtls_ecdh_context structure directly. See also
  * MBEDTLS_ECDH_LEGACY_CONTEXT in include/mbedtls/ecdh.h.
  * MBEDTLS_ECDH_LEGACY_CONTEXT in include/mbedtls/ecdh.h.
+ *
+ * The Everest code is provided under the Apache 2.0 license only; therefore enabling this
+ * option is not compatible with taking the library under the GPL v2.0-or-later license.
  */
  */
 //#define MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
 //#define MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED
 
 

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/constant_time.h

@@ -2,19 +2,7 @@
  *  Constant-time functions
  *  Constant-time functions
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CONSTANT_TIME_H
 #ifndef MBEDTLS_CONSTANT_TIME_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ctr_drbg.h

@@ -23,19 +23,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_CTR_DRBG_H
 #ifndef MBEDTLS_CTR_DRBG_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/debug.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_DEBUG_H
 #ifndef MBEDTLS_DEBUG_H
 #define MBEDTLS_DEBUG_H
 #define MBEDTLS_DEBUG_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/des.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  *
  *
  */
  */
 #ifndef MBEDTLS_DES_H
 #ifndef MBEDTLS_DES_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/dhm.h

@@ -45,19 +45,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_DHM_H
 #ifndef MBEDTLS_DHM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ecdh.h

@@ -14,19 +14,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_ECDH_H
 #ifndef MBEDTLS_ECDH_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ecdsa.h

@@ -12,19 +12,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_ECDSA_H
 #ifndef MBEDTLS_ECDSA_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ecjpake.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ECJPAKE_H
 #ifndef MBEDTLS_ECJPAKE_H
 #define MBEDTLS_ECJPAKE_H
 #define MBEDTLS_ECJPAKE_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ecp.h

@@ -16,19 +16,7 @@
 
 
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_ECP_H
 #ifndef MBEDTLS_ECP_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ecp_internal.h

@@ -6,19 +6,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/entropy.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ENTROPY_H
 #ifndef MBEDTLS_ENTROPY_H
 #define MBEDTLS_ENTROPY_H
 #define MBEDTLS_ENTROPY_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/entropy_poll.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ENTROPY_POLL_H
 #ifndef MBEDTLS_ENTROPY_POLL_H
 #define MBEDTLS_ENTROPY_POLL_H
 #define MBEDTLS_ENTROPY_POLL_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/error.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_ERROR_H
 #ifndef MBEDTLS_ERROR_H
 #define MBEDTLS_ERROR_H
 #define MBEDTLS_ERROR_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/gcm.h

@@ -13,19 +13,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_GCM_H
 #ifndef MBEDTLS_GCM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/havege.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_HAVEGE_H
 #ifndef MBEDTLS_HAVEGE_H
 #define MBEDTLS_HAVEGE_H
 #define MBEDTLS_HAVEGE_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/hkdf.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_HKDF_H
 #ifndef MBEDTLS_HKDF_H
 #define MBEDTLS_HKDF_H
 #define MBEDTLS_HKDF_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/hmac_drbg.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_HMAC_DRBG_H
 #ifndef MBEDTLS_HMAC_DRBG_H
 #define MBEDTLS_HMAC_DRBG_H
 #define MBEDTLS_HMAC_DRBG_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/md.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_MD_H
 #ifndef MBEDTLS_MD_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/md2.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  *
  *
  */
  */
 #ifndef MBEDTLS_MD2_H
 #ifndef MBEDTLS_MD2_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/md4.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  *
  *
  */
  */
 #ifndef MBEDTLS_MD4_H
 #ifndef MBEDTLS_MD4_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/md5.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_MD5_H
 #ifndef MBEDTLS_MD5_H
 #define MBEDTLS_MD5_H
 #define MBEDTLS_MD5_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/md_internal.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_MD_WRAP_H
 #ifndef MBEDTLS_MD_WRAP_H
 #define MBEDTLS_MD_WRAP_H
 #define MBEDTLS_MD_WRAP_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/memory_buffer_alloc.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H
 #ifndef MBEDTLS_MEMORY_BUFFER_ALLOC_H
 #define MBEDTLS_MEMORY_BUFFER_ALLOC_H
 #define MBEDTLS_MEMORY_BUFFER_ALLOC_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/net.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #if !defined(MBEDTLS_CONFIG_FILE)
 #if !defined(MBEDTLS_CONFIG_FILE)
 #include "mbedtls/config.h"
 #include "mbedtls/config.h"

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/net_sockets.h

@@ -21,19 +21,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_NET_SOCKETS_H
 #ifndef MBEDTLS_NET_SOCKETS_H
 #define MBEDTLS_NET_SOCKETS_H
 #define MBEDTLS_NET_SOCKETS_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/nist_kw.h

@@ -17,19 +17,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_NIST_KW_H
 #ifndef MBEDTLS_NIST_KW_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/oid.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_OID_H
 #ifndef MBEDTLS_OID_H
 #define MBEDTLS_OID_H
 #define MBEDTLS_OID_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/padlock.h

@@ -9,19 +9,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PADLOCK_H
 #ifndef MBEDTLS_PADLOCK_H
 #define MBEDTLS_PADLOCK_H
 #define MBEDTLS_PADLOCK_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pem.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PEM_H
 #ifndef MBEDTLS_PEM_H
 #define MBEDTLS_PEM_H
 #define MBEDTLS_PEM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pk.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_PK_H
 #ifndef MBEDTLS_PK_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pk_internal.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_PK_WRAP_H
 #ifndef MBEDTLS_PK_WRAP_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pkcs11.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PKCS11_H
 #ifndef MBEDTLS_PKCS11_H
 #define MBEDTLS_PKCS11_H
 #define MBEDTLS_PKCS11_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pkcs12.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PKCS12_H
 #ifndef MBEDTLS_PKCS12_H
 #define MBEDTLS_PKCS12_H
 #define MBEDTLS_PKCS12_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/pkcs5.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PKCS5_H
 #ifndef MBEDTLS_PKCS5_H
 #define MBEDTLS_PKCS5_H
 #define MBEDTLS_PKCS5_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/platform.h

@@ -21,19 +21,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PLATFORM_H
 #ifndef MBEDTLS_PLATFORM_H
 #define MBEDTLS_PLATFORM_H
 #define MBEDTLS_PLATFORM_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/platform_time.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PLATFORM_TIME_H
 #ifndef MBEDTLS_PLATFORM_TIME_H
 #define MBEDTLS_PLATFORM_TIME_H
 #define MBEDTLS_PLATFORM_TIME_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/platform_util.h

@@ -6,19 +6,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_PLATFORM_UTIL_H
 #ifndef MBEDTLS_PLATFORM_UTIL_H
 #define MBEDTLS_PLATFORM_UTIL_H
 #define MBEDTLS_PLATFORM_UTIL_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/poly1305.h

@@ -14,19 +14,7 @@
 
 
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_POLY1305_H
 #ifndef MBEDTLS_POLY1305_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ripemd160.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_RIPEMD160_H
 #ifndef MBEDTLS_RIPEMD160_H
 #define MBEDTLS_RIPEMD160_H
 #define MBEDTLS_RIPEMD160_H

+ 10 - 13
thirdparty/mbedtls/include/mbedtls/rsa.h

@@ -11,19 +11,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_RSA_H
 #ifndef MBEDTLS_RSA_H
 #define MBEDTLS_RSA_H
 #define MBEDTLS_RSA_H
@@ -724,6 +712,10 @@ int mbedtls_rsa_rsaes_oaep_encrypt(mbedtls_rsa_context *ctx,
  *                 It is the generic wrapper for performing a PKCS#1 decryption
  *                 It is the generic wrapper for performing a PKCS#1 decryption
  *                 operation using the \p mode from the context.
  *                 operation using the \p mode from the context.
  *
  *
+ * \warning        When \p ctx->padding is set to #MBEDTLS_RSA_PKCS_V15,
+ *                 mbedtls_rsa_rsaes_pkcs1_v15_decrypt() is called, which is an
+ *                 inherently dangerous function (CWE-242).
+ *
  * \note           The output buffer length \c output_max_len should be
  * \note           The output buffer length \c output_max_len should be
  *                 as large as the size \p ctx->len of \p ctx->N (for example,
  *                 as large as the size \p ctx->len of \p ctx->N (for example,
  *                 128 Bytes if RSA-1024 is used) to be able to hold an
  *                 128 Bytes if RSA-1024 is used) to be able to hold an
@@ -773,6 +765,11 @@ int mbedtls_rsa_pkcs1_decrypt(mbedtls_rsa_context *ctx,
  * \brief          This function performs a PKCS#1 v1.5 decryption
  * \brief          This function performs a PKCS#1 v1.5 decryption
  *                 operation (RSAES-PKCS1-v1_5-DECRYPT).
  *                 operation (RSAES-PKCS1-v1_5-DECRYPT).
  *
  *
+ * \warning        This is an inherently dangerous function (CWE-242). Unless
+ *                 it is used in a side channel free and safe way (eg.
+ *                 implementing the TLS protocol as per 7.4.7.1 of RFC 5246),
+ *                 the calling code is vulnerable.
+ *
  * \note           The output buffer length \c output_max_len should be
  * \note           The output buffer length \c output_max_len should be
  *                 as large as the size \p ctx->len of \p ctx->N, for example,
  *                 as large as the size \p ctx->len of \p ctx->N, for example,
  *                 128 Bytes if RSA-1024 is used, to be able to hold an
  *                 128 Bytes if RSA-1024 is used, to be able to hold an

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/rsa_internal.h

@@ -36,19 +36,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  *
  *
  */
  */
 
 

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/sha1.h

@@ -12,19 +12,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SHA1_H
 #ifndef MBEDTLS_SHA1_H
 #define MBEDTLS_SHA1_H
 #define MBEDTLS_SHA1_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/sha256.h

@@ -8,19 +8,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SHA256_H
 #ifndef MBEDTLS_SHA256_H
 #define MBEDTLS_SHA256_H
 #define MBEDTLS_SHA256_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/sha512.h

@@ -7,19 +7,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SHA512_H
 #ifndef MBEDTLS_SHA512_H
 #define MBEDTLS_SHA512_H
 #define MBEDTLS_SHA512_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_H
 #ifndef MBEDTLS_SSL_H
 #define MBEDTLS_SSL_H
 #define MBEDTLS_SSL_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl_cache.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_CACHE_H
 #ifndef MBEDTLS_SSL_CACHE_H
 #define MBEDTLS_SSL_CACHE_H
 #define MBEDTLS_SSL_CACHE_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl_ciphersuites.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_CIPHERSUITES_H
 #ifndef MBEDTLS_SSL_CIPHERSUITES_H
 #define MBEDTLS_SSL_CIPHERSUITES_H
 #define MBEDTLS_SSL_CIPHERSUITES_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl_cookie.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_COOKIE_H
 #ifndef MBEDTLS_SSL_COOKIE_H
 #define MBEDTLS_SSL_COOKIE_H
 #define MBEDTLS_SSL_COOKIE_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl_internal.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_INTERNAL_H
 #ifndef MBEDTLS_SSL_INTERNAL_H
 #define MBEDTLS_SSL_INTERNAL_H
 #define MBEDTLS_SSL_INTERNAL_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/ssl_ticket.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_SSL_TICKET_H
 #ifndef MBEDTLS_SSL_TICKET_H
 #define MBEDTLS_SSL_TICKET_H
 #define MBEDTLS_SSL_TICKET_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/threading.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_THREADING_H
 #ifndef MBEDTLS_THREADING_H
 #define MBEDTLS_THREADING_H
 #define MBEDTLS_THREADING_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/timing.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_TIMING_H
 #ifndef MBEDTLS_TIMING_H
 #define MBEDTLS_TIMING_H
 #define MBEDTLS_TIMING_H

+ 5 - 17
thirdparty/mbedtls/include/mbedtls/version.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  * This set of compile-time defines and run-time variables can be used to
  * This set of compile-time defines and run-time variables can be used to
@@ -38,16 +26,16 @@
  */
  */
 #define MBEDTLS_VERSION_MAJOR  2
 #define MBEDTLS_VERSION_MAJOR  2
 #define MBEDTLS_VERSION_MINOR  28
 #define MBEDTLS_VERSION_MINOR  28
-#define MBEDTLS_VERSION_PATCH  5
+#define MBEDTLS_VERSION_PATCH  7
 
 
 /**
 /**
  * The single version number has the following structure:
  * The single version number has the following structure:
  *    MMNNPP00
  *    MMNNPP00
  *    Major version | Minor version | Patch version
  *    Major version | Minor version | Patch version
  */
  */
-#define MBEDTLS_VERSION_NUMBER         0x021C0500
-#define MBEDTLS_VERSION_STRING         "2.28.5"
-#define MBEDTLS_VERSION_STRING_FULL    "Mbed TLS 2.28.5"
+#define MBEDTLS_VERSION_NUMBER         0x021C0700
+#define MBEDTLS_VERSION_STRING         "2.28.7"
+#define MBEDTLS_VERSION_STRING_FULL    "Mbed TLS 2.28.7"
 
 
 #if defined(MBEDTLS_VERSION_C)
 #if defined(MBEDTLS_VERSION_C)
 
 

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/x509.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_X509_H
 #ifndef MBEDTLS_X509_H
 #define MBEDTLS_X509_H
 #define MBEDTLS_X509_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/x509_crl.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_X509_CRL_H
 #ifndef MBEDTLS_X509_CRL_H
 #define MBEDTLS_X509_CRL_H
 #define MBEDTLS_X509_CRL_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/x509_crt.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_X509_CRT_H
 #ifndef MBEDTLS_X509_CRT_H
 #define MBEDTLS_X509_CRT_H
 #define MBEDTLS_X509_CRT_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/x509_csr.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_X509_CSR_H
 #ifndef MBEDTLS_X509_CSR_H
 #define MBEDTLS_X509_CSR_H
 #define MBEDTLS_X509_CSR_H

+ 1 - 13
thirdparty/mbedtls/include/mbedtls/xtea.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #ifndef MBEDTLS_XTEA_H
 #ifndef MBEDTLS_XTEA_H
 #define MBEDTLS_XTEA_H
 #define MBEDTLS_XTEA_H

+ 1 - 13
thirdparty/mbedtls/library/aes.c

@@ -2,19 +2,7 @@
  *  FIPS-197 compliant AES implementation
  *  FIPS-197 compliant AES implementation
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  *  The AES block cipher was designed by Vincent Rijmen and Joan Daemen.
  *  The AES block cipher was designed by Vincent Rijmen and Joan Daemen.

+ 1 - 13
thirdparty/mbedtls/library/aesni.c

@@ -2,19 +2,7 @@
  *  AES-NI support functions
  *  AES-NI support functions
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/library/arc4.c

@@ -2,19 +2,7 @@
  *  An implementation of the ARCFOUR algorithm
  *  An implementation of the ARCFOUR algorithm
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  *  The ARCFOUR algorithm was publicly disclosed on 94/09.
  *  The ARCFOUR algorithm was publicly disclosed on 94/09.

+ 1 - 13
thirdparty/mbedtls/library/aria.c

@@ -2,19 +2,7 @@
  *  ARIA implementation
  *  ARIA implementation
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/library/asn1parse.c

@@ -2,19 +2,7 @@
  *  Generic ASN.1 parsing
  *  Generic ASN.1 parsing
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/asn1write.c

@@ -2,19 +2,7 @@
  * ASN.1 buffer writing functionality
  * ASN.1 buffer writing functionality
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/base64.c

@@ -2,19 +2,7 @@
  *  RFC 1521 base64 encoding/decoding
  *  RFC 1521 base64 encoding/decoding
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 45 - 67
thirdparty/mbedtls/library/bignum.c

@@ -2,19 +2,7 @@
  *  Multi-precision integer library
  *  Multi-precision integer library
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*
@@ -42,6 +30,7 @@
 #include "mbedtls/platform_util.h"
 #include "mbedtls/platform_util.h"
 #include "mbedtls/error.h"
 #include "mbedtls/error.h"
 #include "constant_time_internal.h"
 #include "constant_time_internal.h"
+#include "bignum_internal.h"
 
 
 #include <limits.h>
 #include <limits.h>
 #include <string.h>
 #include <string.h>
@@ -1919,48 +1908,24 @@ int mbedtls_mpi_mod_int(mbedtls_mpi_uint *r, const mbedtls_mpi *A, mbedtls_mpi_s
 /*
 /*
  * Fast Montgomery initialization (thanks to Tom St Denis)
  * Fast Montgomery initialization (thanks to Tom St Denis)
  */
  */
-static void mpi_montg_init(mbedtls_mpi_uint *mm, const mbedtls_mpi *N)
+mbedtls_mpi_uint mbedtls_mpi_montmul_init(const mbedtls_mpi_uint *N)
 {
 {
-    mbedtls_mpi_uint x, m0 = N->p[0];
-    unsigned int i;
+    mbedtls_mpi_uint x = N[0];
 
 
-    x  = m0;
-    x += ((m0 + 2) & 4) << 1;
+    x += ((N[0] + 2) & 4) << 1;
 
 
-    for (i = biL; i >= 8; i /= 2) {
-        x *= (2 - (m0 * x));
+    for (unsigned int i = biL; i >= 8; i /= 2) {
+        x *= (2 - (N[0] * x));
     }
     }
 
 
-    *mm = ~x + 1;
+    return ~x + 1;
 }
 }
 
 
-/** Montgomery multiplication: A = A * B * R^-1 mod N  (HAC 14.36)
- *
- * \param[in,out]   A   One of the numbers to multiply.
- *                      It must have at least as many limbs as N
- *                      (A->n >= N->n), and any limbs beyond n are ignored.
- *                      On successful completion, A contains the result of
- *                      the multiplication A * B * R^-1 mod N where
- *                      R = (2^ciL)^n.
- * \param[in]       B   One of the numbers to multiply.
- *                      It must be nonzero and must not have more limbs than N
- *                      (B->n <= N->n).
- * \param[in]       N   The modulo. N must be odd.
- * \param           mm  The value calculated by `mpi_montg_init(&mm, N)`.
- *                      This is -N^-1 mod 2^ciL.
- * \param[in,out]   T   A bignum for temporary storage.
- *                      It must be at least twice the limb size of N plus 2
- *                      (T->n >= 2 * (N->n + 1)).
- *                      Its initial content is unused and
- *                      its final content is indeterminate.
- *                      Note that unlike the usual convention in the library
- *                      for `const mbedtls_mpi*`, the content of T can change.
- */
-static void mpi_montmul(mbedtls_mpi *A,
-                        const mbedtls_mpi *B,
-                        const mbedtls_mpi *N,
-                        mbedtls_mpi_uint mm,
-                        const mbedtls_mpi *T)
+void mbedtls_mpi_montmul(mbedtls_mpi *A,
+                         const mbedtls_mpi *B,
+                         const mbedtls_mpi *N,
+                         mbedtls_mpi_uint mm,
+                         const mbedtls_mpi *T)
 {
 {
     size_t i, n, m;
     size_t i, n, m;
     mbedtls_mpi_uint u0, u1, *d;
     mbedtls_mpi_uint u0, u1, *d;
@@ -2008,7 +1973,8 @@ static void mpi_montmul(mbedtls_mpi *A,
 /*
 /*
  * Montgomery reduction: A = A * R^-1 mod N
  * Montgomery reduction: A = A * R^-1 mod N
  *
  *
- * See mpi_montmul() regarding constraints and guarantees on the parameters.
+ * See mbedtls_mpi_montmul() regarding constraints and guarantees on the
+ * parameters.
  */
  */
 static void mpi_montred(mbedtls_mpi *A, const mbedtls_mpi *N,
 static void mpi_montred(mbedtls_mpi *A, const mbedtls_mpi *N,
                         mbedtls_mpi_uint mm, const mbedtls_mpi *T)
                         mbedtls_mpi_uint mm, const mbedtls_mpi *T)
@@ -2019,7 +1985,7 @@ static void mpi_montred(mbedtls_mpi *A, const mbedtls_mpi *N,
     U.n = U.s = (int) z;
     U.n = U.s = (int) z;
     U.p = &z;
     U.p = &z;
 
 
-    mpi_montmul(A, &U, N, mm, T);
+    mbedtls_mpi_montmul(A, &U, N, mm, T);
 }
 }
 
 
 /**
 /**
@@ -2051,6 +2017,20 @@ cleanup:
     return ret;
     return ret;
 }
 }
 
 
+int mbedtls_mpi_get_mont_r2_unsafe(mbedtls_mpi *X,
+                                   const mbedtls_mpi *N)
+{
+    int ret = MBEDTLS_ERR_ERROR_CORRUPTION_DETECTED;
+
+    MBEDTLS_MPI_CHK(mbedtls_mpi_lset(X, 1));
+    MBEDTLS_MPI_CHK(mbedtls_mpi_shift_l(X, N->n * 2 * biL));
+    MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(X, X, N));
+    MBEDTLS_MPI_CHK(mbedtls_mpi_shrink(X, N->n));
+
+cleanup:
+    return ret;
+}
+
 /*
 /*
  * Sliding-window exponentiation: X = A^E mod N  (HAC 14.85)
  * Sliding-window exponentiation: X = A^E mod N  (HAC 14.85)
  */
  */
@@ -2088,7 +2068,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
     /*
     /*
      * Init temps and window size
      * Init temps and window size
      */
      */
-    mpi_montg_init(&mm, N);
+    mm = mbedtls_mpi_montmul_init(N->p);
     mbedtls_mpi_init(&RR); mbedtls_mpi_init(&T);
     mbedtls_mpi_init(&RR); mbedtls_mpi_init(&T);
     mbedtls_mpi_init(&Apos);
     mbedtls_mpi_init(&Apos);
     mbedtls_mpi_init(&WW);
     mbedtls_mpi_init(&WW);
@@ -2142,10 +2122,10 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
 
 
     j = N->n + 1;
     j = N->n + 1;
     /* All W[i] including the accumulator must have at least N->n limbs for
     /* All W[i] including the accumulator must have at least N->n limbs for
-     * the mpi_montmul() and mpi_montred() calls later. Here we ensure that
-     * W[1] and the accumulator W[x_index] are large enough. later we'll grow
-     * other W[i] to the same length. They must not be shrunk midway through
-     * this function!
+     * the mbedtls_mpi_montmul() and mpi_montred() calls later. Here we ensure
+     * that W[1] and the accumulator W[x_index] are large enough. later we'll
+     * grow other W[i] to the same length. They must not be shrunk midway
+     * through this function!
      */
      */
     MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[x_index], j));
     MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[x_index], j));
     MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[1],  j));
     MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[1],  j));
@@ -2165,9 +2145,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
      * If 1st call, pre-compute R^2 mod N
      * If 1st call, pre-compute R^2 mod N
      */
      */
     if (prec_RR == NULL || prec_RR->p == NULL) {
     if (prec_RR == NULL || prec_RR->p == NULL) {
-        MBEDTLS_MPI_CHK(mbedtls_mpi_lset(&RR, 1));
-        MBEDTLS_MPI_CHK(mbedtls_mpi_shift_l(&RR, N->n * 2 * biL));
-        MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&RR, &RR, N));
+        mbedtls_mpi_get_mont_r2_unsafe(&RR, N);
 
 
         if (prec_RR != NULL) {
         if (prec_RR != NULL) {
             memcpy(prec_RR, &RR, sizeof(mbedtls_mpi));
             memcpy(prec_RR, &RR, sizeof(mbedtls_mpi));
@@ -2183,7 +2161,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
         MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&W[1], A, N));
         MBEDTLS_MPI_CHK(mbedtls_mpi_mod_mpi(&W[1], A, N));
         /* This should be a no-op because W[1] is already that large before
         /* This should be a no-op because W[1] is already that large before
          * mbedtls_mpi_mod_mpi(), but it's necessary to avoid an overflow
          * mbedtls_mpi_mod_mpi(), but it's necessary to avoid an overflow
-         * in mpi_montmul() below, so let's make sure. */
+         * in mbedtls_mpi_montmul() below, so let's make sure. */
         MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[1], N->n + 1));
         MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[1], N->n + 1));
     } else {
     } else {
         MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[1], A));
         MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[1], A));
@@ -2191,7 +2169,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
 
 
     /* Note that this is safe because W[1] always has at least N->n limbs
     /* Note that this is safe because W[1] always has at least N->n limbs
      * (it grew above and was preserved by mbedtls_mpi_copy()). */
      * (it grew above and was preserved by mbedtls_mpi_copy()). */
-    mpi_montmul(&W[1], &RR, N, mm, &T);
+    mbedtls_mpi_montmul(&W[1], &RR, N, mm, &T);
 
 
     /*
     /*
      * W[x_index] = R^2 * R^-1 mod N = R mod N
      * W[x_index] = R^2 * R^-1 mod N = R mod N
@@ -2217,7 +2195,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
         MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[j], &W[1]));
         MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[j], &W[1]));
 
 
         for (i = 0; i < window_bitsize - 1; i++) {
         for (i = 0; i < window_bitsize - 1; i++) {
-            mpi_montmul(&W[j], &W[j], N, mm, &T);
+            mbedtls_mpi_montmul(&W[j], &W[j], N, mm, &T);
         }
         }
 
 
         /*
         /*
@@ -2227,7 +2205,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
             MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[i], N->n + 1));
             MBEDTLS_MPI_CHK(mbedtls_mpi_grow(&W[i], N->n + 1));
             MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[i], &W[i - 1]));
             MBEDTLS_MPI_CHK(mbedtls_mpi_copy(&W[i], &W[i - 1]));
 
 
-            mpi_montmul(&W[i], &W[1], N, mm, &T);
+            mbedtls_mpi_montmul(&W[i], &W[1], N, mm, &T);
         }
         }
     }
     }
 
 
@@ -2263,7 +2241,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
              * out of window, square W[x_index]
              * out of window, square W[x_index]
              */
              */
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, x_index));
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, x_index));
-            mpi_montmul(&W[x_index], &WW, N, mm, &T);
+            mbedtls_mpi_montmul(&W[x_index], &WW, N, mm, &T);
             continue;
             continue;
         }
         }
 
 
@@ -2282,7 +2260,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
             for (i = 0; i < window_bitsize; i++) {
             for (i = 0; i < window_bitsize; i++) {
                 MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size,
                 MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size,
                                            x_index));
                                            x_index));
-                mpi_montmul(&W[x_index], &WW, N, mm, &T);
+                mbedtls_mpi_montmul(&W[x_index], &WW, N, mm, &T);
             }
             }
 
 
             /*
             /*
@@ -2290,7 +2268,7 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
              */
              */
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size,
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size,
                                        exponent_bits_in_window));
                                        exponent_bits_in_window));
-            mpi_montmul(&W[x_index], &WW, N, mm, &T);
+            mbedtls_mpi_montmul(&W[x_index], &WW, N, mm, &T);
 
 
             state--;
             state--;
             nbits = 0;
             nbits = 0;
@@ -2303,13 +2281,13 @@ int mbedtls_mpi_exp_mod(mbedtls_mpi *X, const mbedtls_mpi *A,
      */
      */
     for (i = 0; i < nbits; i++) {
     for (i = 0; i < nbits; i++) {
         MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, x_index));
         MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, x_index));
-        mpi_montmul(&W[x_index], &WW, N, mm, &T);
+        mbedtls_mpi_montmul(&W[x_index], &WW, N, mm, &T);
 
 
         exponent_bits_in_window <<= 1;
         exponent_bits_in_window <<= 1;
 
 
         if ((exponent_bits_in_window & ((size_t) 1 << window_bitsize)) != 0) {
         if ((exponent_bits_in_window & ((size_t) 1 << window_bitsize)) != 0) {
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, 1));
             MBEDTLS_MPI_CHK(mpi_select(&WW, W, w_table_used_size, 1));
-            mpi_montmul(&W[x_index], &WW, N, mm, &T);
+            mbedtls_mpi_montmul(&W[x_index], &WW, N, mm, &T);
         }
         }
     }
     }
 
 

+ 71 - 0
thirdparty/mbedtls/library/bignum_internal.h

@@ -0,0 +1,71 @@
+/**
+ *  Low level bignum functions
+ *
+ *  Copyright The Mbed TLS Contributors
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
+ */
+
+#ifndef MBEDTLS_BIGNUM_INTERNAL_H
+#define MBEDTLS_BIGNUM_INTERNAL_H
+
+#include "mbedtls/bignum.h"
+
+/**
+ * \brief Calculate the square of the Montgomery constant. (Needed
+ *        for conversion and operations in Montgomery form.)
+ *
+ * \param[out] X  A pointer to the result of the calculation of
+ *                the square of the Montgomery constant:
+ *                2^{2*n*biL} mod N.
+ * \param[in]  N  Little-endian presentation of the modulus, which must be odd.
+ *
+ * \return        0 if successful.
+ * \return        #MBEDTLS_ERR_MPI_ALLOC_FAILED if there is not enough space
+ *                to store the value of Montgomery constant squared.
+ * \return        #MBEDTLS_ERR_MPI_DIVISION_BY_ZERO if \p N modulus is zero.
+ * \return        #MBEDTLS_ERR_MPI_NEGATIVE_VALUE if \p N modulus is negative.
+ */
+int mbedtls_mpi_get_mont_r2_unsafe(mbedtls_mpi *X,
+                                   const mbedtls_mpi *N);
+
+/**
+ * \brief Calculate initialisation value for fast Montgomery modular
+ *        multiplication
+ *
+ * \param[in] N  Little-endian presentation of the modulus. This must have
+ *               at least one limb.
+ *
+ * \return       The initialisation value for fast Montgomery modular multiplication
+ */
+mbedtls_mpi_uint mbedtls_mpi_montmul_init(const mbedtls_mpi_uint *N);
+
+/** Montgomery multiplication: A = A * B * R^-1 mod N  (HAC 14.36)
+ *
+ * \param[in,out]   A   One of the numbers to multiply.
+ *                      It must have at least as many limbs as N
+ *                      (A->n >= N->n), and any limbs beyond n are ignored.
+ *                      On successful completion, A contains the result of
+ *                      the multiplication A * B * R^-1 mod N where
+ *                      R = (2^ciL)^n.
+ * \param[in]       B   One of the numbers to multiply.
+ *                      It must be nonzero and must not have more limbs than N
+ *                      (B->n <= N->n).
+ * \param[in]       N   The modulo. N must be odd.
+ * \param           mm  The value calculated by
+ *                      `mbedtls_mpi_montg_init(&mm, N)`.
+ *                      This is -N^-1 mod 2^ciL.
+ * \param[in,out]   T   A bignum for temporary storage.
+ *                      It must be at least twice the limb size of N plus 2
+ *                      (T->n >= 2 * (N->n + 1)).
+ *                      Its initial content is unused and
+ *                      its final content is indeterminate.
+ *                      Note that unlike the usual convention in the library
+ *                      for `const mbedtls_mpi*`, the content of T can change.
+ */
+void mbedtls_mpi_montmul(mbedtls_mpi *A,
+                         const mbedtls_mpi *B,
+                         const mbedtls_mpi *N,
+                         mbedtls_mpi_uint mm,
+                         const mbedtls_mpi *T);
+
+#endif /* MBEDTLS_BIGNUM_INTERNAL_H */

+ 1 - 13
thirdparty/mbedtls/library/blowfish.c

@@ -2,19 +2,7 @@
  *  Blowfish implementation
  *  Blowfish implementation
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  *  The Blowfish block cipher was designed by Bruce Schneier in 1993.
  *  The Blowfish block cipher was designed by Bruce Schneier in 1993.

+ 1 - 13
thirdparty/mbedtls/library/camellia.c

@@ -2,19 +2,7 @@
  *  Camellia implementation
  *  Camellia implementation
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 /*
 /*
  *  The Camellia block cipher was designed by NTT and Mitsubishi Electric
  *  The Camellia block cipher was designed by NTT and Mitsubishi Electric

+ 1 - 13
thirdparty/mbedtls/library/ccm.c

@@ -2,19 +2,7 @@
  *  NIST SP800-38C compliant CCM implementation
  *  NIST SP800-38C compliant CCM implementation
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/library/certs.c

@@ -2,19 +2,7 @@
  *  X.509 test certificates
  *  X.509 test certificates
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/chacha20.c

@@ -6,19 +6,7 @@
  * \author Daniel King <[email protected]>
  * \author Daniel King <[email protected]>
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/chachapoly.c

@@ -4,19 +4,7 @@
  * \brief ChaCha20-Poly1305 AEAD construction based on RFC 7539.
  * \brief ChaCha20-Poly1305 AEAD construction based on RFC 7539.
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 #include "common.h"
 #include "common.h"
 
 

+ 1 - 13
thirdparty/mbedtls/library/check_crypto_config.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/library/cipher.c

@@ -6,19 +6,7 @@
  * \author Adriaan de Jong <[email protected]>
  * \author Adriaan de Jong <[email protected]>
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/cipher_wrap.c

@@ -6,19 +6,7 @@
  * \author Adriaan de Jong <[email protected]>
  * \author Adriaan de Jong <[email protected]>
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #include "common.h"
 #include "common.h"

+ 1 - 13
thirdparty/mbedtls/library/cmac.c

@@ -4,19 +4,7 @@
  * \brief NIST SP800-38B compliant CMAC implementation for AES and 3DES
  * \brief NIST SP800-38B compliant CMAC implementation for AES and 3DES
  *
  *
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 /*
 /*

+ 1 - 13
thirdparty/mbedtls/library/common.h

@@ -5,19 +5,7 @@
  */
  */
 /*
 /*
  *  Copyright The Mbed TLS Contributors
  *  Copyright The Mbed TLS Contributors
- *  SPDX-License-Identifier: Apache-2.0
- *
- *  Licensed under the Apache License, Version 2.0 (the "License"); you may
- *  not use this file except in compliance with the License.
- *  You may obtain a copy of the License at
- *
- *  http://www.apache.org/licenses/LICENSE-2.0
- *
- *  Unless required by applicable law or agreed to in writing, software
- *  distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
- *  WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- *  See the License for the specific language governing permissions and
- *  limitations under the License.
+ *  SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
  */
  */
 
 
 #ifndef MBEDTLS_LIBRARY_COMMON_H
 #ifndef MBEDTLS_LIBRARY_COMMON_H

Some files were not shown because too many files changed in this diff