mirror of
https://github.com/yuzu-emu/mbedtls.git
synced 2025-01-12 21:05:43 +00:00
25838b795f
And use those tools in a few places. For now the purpose is just to validate those tools before using them in all occurrences of transport-specific code. The effect of these changes was measured with the following script: ``` set -eu build() { printf "\n$1\n" CC=arm-none-eabi-gcc CFLAGS='-Werror -Os -march=armv6-m -mthumb' \ AR=arm-none-eabi-ar LD=arm-none-eabi-ld make clean lib >/dev/null arm-none-eabi-size -t library/libmbedtls.a } git checkout -- include/mbedtls/config.h scripts/config.pl unset MBEDTLS_NET_C scripts/config.pl unset MBEDTLS_TIMING_C scripts/config.pl unset MBEDTLS_FS_IO scripts/config.pl unset MBEDTLS_ENTROPY_NV_SEED scripts/config.pl set MBEDTLS_NO_PLATFORM_ENTROPY build "both" scripts/config.pl unset MBEDTLS_SSL_PROTO_TLS build "DTLS-only" scripts/config.pl set MBEDTLS_SSL_PROTO_TLS scripts/config.pl unset MBEDTLS_SSL_PROTO_DTLS scripts/config.pl unset MBEDTLS_SSL_DTLS_HELLO_VERIFY scripts/config.pl unset MBEDTLS_SSL_DTLS_ANTI_REPLAY scripts/config.pl unset MBEDTLS_SSL_DTLS_BADMAC_LIMIT scripts/config.pl unset MBEDTLS_SSL_DTLS_CLIENT_PORT_REUSE build "TLS-only" git checkout -- include/mbedtls/config.h ``` The output of the script is as follows: ``` both text data bss dec hex filename 1820 0 4 1824 720 debug.o (ex library/libmbedtls.a) 0 0 0 0 0 net_sockets.o (ex library/libmbedtls.a) 548 0 0 548 224 ssl_cache.o (ex library/libmbedtls.a) 11155 0 596 11751 2de7 ssl_ciphersuites.o (ex library/libmbedtls.a) 17160 0 0 17160 4308 ssl_cli.o (ex library/libmbedtls.a) 460 0 0 460 1cc ssl_cookie.o (ex library/libmbedtls.a) 17637 0 0 17637 44e5 ssl_srv.o (ex library/libmbedtls.a) 800 0 0 800 320 ssl_ticket.o (ex library/libmbedtls.a) 39322 60 0 39382 99d6 ssl_tls.o (ex library/libmbedtls.a) 88902 60 600 89562 15dda (TOTALS) DTLS-only text data bss dec hex filename 1820 0 4 1824 720 debug.o (ex library/libmbedtls.a) 0 0 0 0 0 net_sockets.o (ex library/libmbedtls.a) 548 0 0 548 224 ssl_cache.o (ex library/libmbedtls.a) 11155 0 596 11751 2de7 ssl_ciphersuites.o (ex library/libmbedtls.a) 17072 0 0 17072 42b0 ssl_cli.o (ex library/libmbedtls.a) 460 0 0 460 1cc ssl_cookie.o (ex library/libmbedtls.a) 17565 0 0 17565 449d ssl_srv.o (ex library/libmbedtls.a) 800 0 0 800 320 ssl_ticket.o (ex library/libmbedtls.a) 38953 60 0 39013 9865 ssl_tls.o (ex library/libmbedtls.a) 88373 60 600 89033 15bc9 (TOTALS) TLS-only text data bss dec hex filename 1820 0 4 1824 720 debug.o (ex library/libmbedtls.a) 0 0 0 0 0 net_sockets.o (ex library/libmbedtls.a) 548 0 0 548 224 ssl_cache.o (ex library/libmbedtls.a) 11155 0 596 11751 2de7 ssl_ciphersuites.o (ex library/libmbedtls.a) 14916 0 0 14916 3a44 ssl_cli.o (ex library/libmbedtls.a) 460 0 0 460 1cc ssl_cookie.o (ex library/libmbedtls.a) 15852 0 0 15852 3dec ssl_srv.o (ex library/libmbedtls.a) 800 0 0 800 320 ssl_ticket.o (ex library/libmbedtls.a) 27623 60 0 27683 6c23 ssl_tls.o (ex library/libmbedtls.a) 73174 60 600 73834 1206a (TOTALS) ``` It can be seen that a DTLS-only build is now starting to be a bit smaller than a dual-mode build, which is the purpose of the new build option. |
||
---|---|---|
.. | ||
.gitignore | ||
aes.c | ||
aesni.c | ||
arc4.c | ||
aria.c | ||
asn1parse.c | ||
asn1write.c | ||
base64.c | ||
bignum.c | ||
blowfish.c | ||
camellia.c | ||
ccm.c | ||
certs.c | ||
chacha20.c | ||
chachapoly.c | ||
cipher.c | ||
cipher_wrap.c | ||
cmac.c | ||
CMakeLists.txt | ||
ctr_drbg.c | ||
debug.c | ||
des.c | ||
dhm.c | ||
ecdh.c | ||
ecdsa.c | ||
ecjpake.c | ||
ecp.c | ||
ecp_curves.c | ||
entropy.c | ||
entropy_poll.c | ||
error.c | ||
gcm.c | ||
havege.c | ||
hkdf.c | ||
hmac_drbg.c | ||
Makefile | ||
md.c | ||
md2.c | ||
md4.c | ||
md5.c | ||
md_wrap.c | ||
memory_buffer_alloc.c | ||
net_sockets.c | ||
nist_kw.c | ||
oid.c | ||
padlock.c | ||
pem.c | ||
pk.c | ||
pk_wrap.c | ||
pkcs5.c | ||
pkcs11.c | ||
pkcs12.c | ||
pkparse.c | ||
pkwrite.c | ||
platform.c | ||
platform_util.c | ||
poly1305.c | ||
ripemd160.c | ||
rsa.c | ||
rsa_internal.c | ||
sha1.c | ||
sha256.c | ||
sha512.c | ||
ssl_cache.c | ||
ssl_ciphersuites.c | ||
ssl_cli.c | ||
ssl_cookie.c | ||
ssl_srv.c | ||
ssl_ticket.c | ||
ssl_tls.c | ||
threading.c | ||
timing.c | ||
version.c | ||
version_features.c | ||
x509.c | ||
x509_create.c | ||
x509_crl.c | ||
x509_crt.c | ||
x509_csr.c | ||
x509write_crt.c | ||
x509write_csr.c | ||
xtea.c |