cosmopolitan/third_party/mbedtls
Justine Tunney fa20edc44d
Reduce header complexity
- Remove most __ASSEMBLER__ __LINKER__ ifdefs
- Rename libc/intrin/bits.h to libc/serialize.h
- Block pthread cancelation in fchmodat() polyfill
- Remove `clang-format off` statements in third_party
2023-11-28 14:39:42 -08:00
..
test Reduce header complexity 2023-11-28 14:39:42 -08:00
aes.c Reduce header complexity 2023-11-28 14:39:42 -08:00
aes.h Reduce header complexity 2023-11-28 14:39:42 -08:00
aesce.c Reduce header complexity 2023-11-28 14:39:42 -08:00
aesce.h Reduce header complexity 2023-11-28 14:39:42 -08:00
aesni.c Reduce header complexity 2023-11-28 14:39:42 -08:00
aesni.h Reduce header complexity 2023-11-28 14:39:42 -08:00
asn1.h Reduce header complexity 2023-11-28 14:39:42 -08:00
asn1parse.c Reduce header complexity 2023-11-28 14:39:42 -08:00
asn1write.c Reduce header complexity 2023-11-28 14:39:42 -08:00
asn1write.h Reduce header complexity 2023-11-28 14:39:42 -08:00
base64.c Reduce header complexity 2023-11-28 14:39:42 -08:00
base64.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bigmul.c Reduce header complexity 2023-11-28 14:39:42 -08:00
bigmul4.c Reduce header complexity 2023-11-28 14:39:42 -08:00
bignum.c Reduce header complexity 2023-11-28 14:39:42 -08:00
bignum.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bignum_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
bigshift.c Reduce header complexity 2023-11-28 14:39:42 -08:00
blake2b256.c Reduce header complexity 2023-11-28 14:39:42 -08:00
BUILD.mk Rename makefiles BUILD.mk 2023-11-28 11:21:08 -08:00
ccm.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ccm.h Reduce header complexity 2023-11-28 14:39:42 -08:00
certs.c Reduce header complexity 2023-11-28 14:39:42 -08:00
certs.h Reduce header complexity 2023-11-28 14:39:42 -08:00
chacha20.c Reduce header complexity 2023-11-28 14:39:42 -08:00
chacha20.h Reduce header complexity 2023-11-28 14:39:42 -08:00
chachapoly.c Reduce header complexity 2023-11-28 14:39:42 -08:00
chachapoly.h Reduce header complexity 2023-11-28 14:39:42 -08:00
check.inc Reduce header complexity 2023-11-28 14:39:42 -08:00
chk.h Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
cipher.c Reduce header complexity 2023-11-28 14:39:42 -08:00
cipher.h Reduce header complexity 2023-11-28 14:39:42 -08:00
cipher_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
cipher_wrap.c Reduce header complexity 2023-11-28 14:39:42 -08:00
common.h Add SSL to redbean 2021-06-24 13:20:50 -07:00
config.h Fix some aarch64 build issues 2023-07-08 10:47:45 -07:00
ctr_drbg.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ctr_drbg.h Reduce header complexity 2023-11-28 14:39:42 -08:00
debug.c Reduce header complexity 2023-11-28 14:39:42 -08:00
debug.h Add SSL to redbean 2021-06-24 13:20:50 -07:00
des.c Reduce header complexity 2023-11-28 14:39:42 -08:00
des.h Reduce header complexity 2023-11-28 14:39:42 -08:00
describecode.c Do work on curl/mbedtls/zstd 2023-07-07 10:13:35 -07:00
dhm.c Reduce header complexity 2023-11-28 14:39:42 -08:00
dhm.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ecdh.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecdh.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ecdh_everest.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecdh_everest.h Make stronger crypto nearly as fast 2021-07-26 16:19:45 -07:00
ecdsa.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecdsa.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp256.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp384.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp_curves.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ecp_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ecpshl.c Reduce header complexity 2023-11-28 14:39:42 -08:00
endian.h Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
entropy.c Reduce header complexity 2023-11-28 14:39:42 -08:00
entropy.h Reduce header complexity 2023-11-28 14:39:42 -08:00
entropy_poll.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
entropy_poll.h Reduce header complexity 2023-11-28 14:39:42 -08:00
error.c Reduce header complexity 2023-11-28 14:39:42 -08:00
error.h Reduce header complexity 2023-11-28 14:39:42 -08:00
everest.c Reduce header complexity 2023-11-28 14:39:42 -08:00
everest.h Reduce header complexity 2023-11-28 14:39:42 -08:00
fastdiv.h Reduce header complexity 2023-11-28 14:39:42 -08:00
formatclientciphers.c Reduce header complexity 2023-11-28 14:39:42 -08:00
gcm.c Reduce header complexity 2023-11-28 14:39:42 -08:00
gcm.h Reduce header complexity 2023-11-28 14:39:42 -08:00
getalertdescription.c Do work on curl/mbedtls/zstd 2023-07-07 10:13:35 -07:00
getciphersuite.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
getciphersuitename.c Make exciting improvements 2022-03-18 03:02:00 -07:00
getsslstatename.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
hkdf.c Reduce header complexity 2023-11-28 14:39:42 -08:00
hkdf.h Reduce header complexity 2023-11-28 14:39:42 -08:00
hmac_drbg.c Reduce header complexity 2023-11-28 14:39:42 -08:00
hmac_drbg.h Reduce header complexity 2023-11-28 14:39:42 -08:00
iana.h Reduce header complexity 2023-11-28 14:39:42 -08:00
isciphersuitegood.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
karatsuba.c Fix warnings 2023-09-01 20:50:18 -07:00
LICENSE Import Mbed TLS v2.26.0 2021-06-24 11:12:45 -07:00
math.h Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
md.c Reduce header complexity 2023-11-28 14:39:42 -08:00
md.h Reduce header complexity 2023-11-28 14:39:42 -08:00
md5.c Reduce header complexity 2023-11-28 14:39:42 -08:00
md5.h Reduce header complexity 2023-11-28 14:39:42 -08:00
md5t.c Reduce header complexity 2023-11-28 14:39:42 -08:00
mdtype.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
memory_buffer_alloc.c Reduce header complexity 2023-11-28 14:39:42 -08:00
memory_buffer_alloc.h Reduce header complexity 2023-11-28 14:39:42 -08:00
net_sockets.c Make improvements 2023-09-18 21:04:47 -07:00
net_sockets.h Reduce header complexity 2023-11-28 14:39:42 -08:00
nist_kw.c Reduce header complexity 2023-11-28 14:39:42 -08:00
nist_kw.h Reduce header complexity 2023-11-28 14:39:42 -08:00
oid.c Reduce header complexity 2023-11-28 14:39:42 -08:00
oid.h Reduce header complexity 2023-11-28 14:39:42 -08:00
param.c Unbloat the build 2022-08-11 00:15:29 -07:00
pem.c Reduce header complexity 2023-11-28 14:39:42 -08:00
pem.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pk.c Reduce header complexity 2023-11-28 14:39:42 -08:00
pk.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pk_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pk_wrap.c Reduce header complexity 2023-11-28 14:39:42 -08:00
pkcs5.c Reduce header complexity 2023-11-28 14:39:42 -08:00
pkcs5.h Reduce header complexity 2023-11-28 14:39:42 -08:00
pkparse.c Reduce header complexity 2023-11-28 14:39:42 -08:00
pktype.c Add SSL to redbean 2021-06-24 13:20:50 -07:00
pkwrite.c Reduce header complexity 2023-11-28 14:39:42 -08:00
platform.c Add SNI support to redbean and improve SSL perf 2021-07-23 13:56:13 -07:00
platform.h Clean up some code 2023-11-16 17:31:07 -08:00
poly1305.c Reduce header complexity 2023-11-28 14:39:42 -08:00
poly1305.h Reduce header complexity 2023-11-28 14:39:42 -08:00
profile.h Fix Landlock Make so it can read pattern rule vars 2022-08-13 17:23:05 -07:00
rando.c Fold LIBC_RAND into LIBC_STDIO/TINYMATH/INTRIN 2022-08-11 12:32:00 -07:00
README.cosmo Make improvements 2023-09-18 21:04:47 -07:00
rsa.c Reduce header complexity 2023-11-28 14:39:42 -08:00
rsa.h Reduce header complexity 2023-11-28 14:39:42 -08:00
rsa_internal.c Reduce header complexity 2023-11-28 14:39:42 -08:00
rsa_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
san.c Reduce header complexity 2023-11-28 14:39:42 -08:00
san.h Add SSL to redbean 2021-06-24 13:20:50 -07:00
secp256r1.c Fix warnings 2023-09-01 20:50:18 -07:00
secp384r1.c Fix warnings 2023-09-01 20:50:18 -07:00
select.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sha1.c Reduce header complexity 2023-11-28 14:39:42 -08:00
sha1.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sha1t.c Reduce header complexity 2023-11-28 14:39:42 -08:00
sha256.c Reduce header complexity 2023-11-28 14:39:42 -08:00
sha256.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sha256t.c Reduce header complexity 2023-11-28 14:39:42 -08:00
sha512.c Reduce header complexity 2023-11-28 14:39:42 -08:00
sha512.h Reduce header complexity 2023-11-28 14:39:42 -08:00
sha512t.c Reduce header complexity 2023-11-28 14:39:42 -08:00
shakedescription.c Do work on curl/mbedtls/zstd 2023-07-07 10:13:35 -07:00
shiftright-avx.c Fix warnings 2023-09-01 20:50:18 -07:00
shiftright.c Reduce build latency and fix old cpu bugs 2021-08-05 14:43:53 -07:00
sigalg.c Add SSL to redbean 2021-06-24 13:20:50 -07:00
speed.sh Make numerous improvements 2021-09-28 01:52:34 -07:00
srtp.c Add SSL to redbean 2021-06-24 13:20:50 -07:00
ssl.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_cache.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_cache.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_ciphersuites.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_ciphersuites.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_cli.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_cookie.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_cookie.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_internal.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_invasive.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_msg.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_srv.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_ticket.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_ticket.h Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_tls.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_tls13_keys.c Reduce header complexity 2023-11-28 14:39:42 -08:00
ssl_tls13_keys.h Add SSL to redbean 2021-06-24 13:20:50 -07:00
version.h Reduce header complexity 2023-11-28 14:39:42 -08:00
x509.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509.h Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_create.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_crl.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_crl.h Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_crt.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_crt.h Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_csr.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509_csr.h Reduce header complexity 2023-11-28 14:39:42 -08:00
x509write_crt.c Reduce header complexity 2023-11-28 14:39:42 -08:00
x509write_csr.c Reduce header complexity 2023-11-28 14:39:42 -08:00
zeroize.c Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00

DESCRIPTION

  Mbed TLS is a crypto library built by ARM that's been released
  under a more permissive license than alternatives like OpenSSL
  and is useful for interoperating with systems that require TLS

SOURCE

  https://github.com/ARMmbed/mbedtls/archive/refs/tags/v2.26.0.tar.gz

LICENSE

  Apache 2.o

LOCAL CHANGES

  - Support ECANCELED (similar to EINTR) needed by pthread_cancel()

  - Strengthened server against DOS by removing expensive protections
    for old Internet Explorer against Lucky Thirteen timing attacks.

  - Reduce build+test latency from 15 seconds to 5 seconds.

  - Features have been added that enable this library to produce SSL
    certificates that can be used by Google Chrome. This required we
    add featurces for editing Subject Alternative Names and Extended
    Key Usage X.509 extension fields since upstream mbedtls can only
    do that currently for Netscape Navigator.

  - Local changes needed to be made to test_suite_ssl.datax due to it
    not taking into consideration disabled features like DTLS.

  - Local changes needed to be made to test_suite_x509parse.datax due
    to the features we added for subject alternative name parsing.

  - We've slimmed things down to meet our own specific local needs.
    For example, we don't need the PSA code since we don't target ARM
    hardware. We also don't need algorithms like camellia, blowfish,
    ripemd, arc4, ecjpake, etc. We want security code that's simple,
    readable, and easy to maintain. For example, the formally verified
    eliptic curve diffie-helman code was 38 files and most of it was
    dead code which could be consolidated into one < 1 kLOC file.

  - The only breaking API change that's been made is to redefine int
    arrays of things like long lists of ciphersuites to be uint8_t or
    uint16_t instead when appropriate.

  - Exported test code so it (a) doesn't have python as a build time
    dependency, (b) doesn't print to stdout on success, (c) bundles
    its dependencies inside a zip container so the tests are able to
    run hermetically if the binary is scp'd to some machine, and (d)
    doesn't have large amounts of duplicated generated code.

  - Fix mbedtls_mpi_sub_abs() to not call malloc/free/memcpy since
    it's called 11,124 times during as SSL handshake.

  - Make P-256 and P-384 modulus goes 5x faster.

  - Make chacha20 26% faster.

  - Make base64 100x faster.

  - Make gcm faster.