Skip to content

Commit 1baf25d

Browse files
committed
modules/openssl: Optimize build size by disabling unused cryptographic algorithms
Reduce OpenSSL libcrypto.so.3 size by 103KB (3.1%) through aggressive algorithm disabling via configure flags. Removed unused cryptographic algorithms while maintaining compatibility with TPM2-TSS requirements. Disabled algorithms: - Legacy ciphers: DES, RC2/RC4, IDEA, Blowfish, CAST - Hash functions: MD2/MD4/MD5, RIPEMD160, Whirlpool - Modern algorithms: ChaCha20, Poly1305, ARIA, Camellia - Elliptic curves: EC2M curves, SM2/SM4 Chinese algorithms - Key exchange: DH, DSA, SRP, GOST - Protocol versions: SSL 3.0, TLS 1.0/1.1 - Advanced features: OCB, SIV, CMAC, BLAKE2, engines Size impact: - libcrypto.so.3: 3,280,536 → 3,177,880 bytes (-103KB, -3.1%) - tools.cpio total: ~621KB cumulative savings vs master Maintains required algorithms for TPM2 operations (SHA, AES, SM3). Signed-off-by: Thierry Laurion <insurgo@riseup.net>
1 parent 953d2b7 commit 1baf25d

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

modules/openssl

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,14 @@ openssl_configure := \
2525
no-des \
2626
no-dh \
2727
no-dsa \
28+
no-dtls \
29+
no-ec2m \
2830
no-ecdh \
2931
no-ecdsa \
32+
no-engine \
33+
no-gost \
3034
no-idea \
35+
no-md2 \
3136
no-md4 \
3237
no-mdc2 \
3338
no-ocb \
@@ -41,7 +46,11 @@ openssl_configure := \
4146
no-siv \
4247
no-sm2 \
4348
no-sm4 \
49+
no-srp \
50+
no-ssl3 \
4451
no-tests \
52+
no-tls1 \
53+
no-tls1_1 \
4554
no-whirlpool \
4655

4756
openssl_target := $(MAKE_JOBS) \

0 commit comments

Comments
 (0)