关闭掉一些不需要编译的内部算法源码目录可以:
具体办法,修改Configure档案下的编译目录,比如,只需要chacha20-poly1305:
# Top level directories to build
#$config{dirs} = [ "crypto", "ssl", "engines", "apps", "test", "util", "tools", "fuzz" ];
# crypto/ subdirectories to build
#$config{sdirs} = [
# "objects",
# "md2", "md4", "md5", "sha", "mdc2", "hmac", "ripemd", "whrlpool", "poly1305", "blake2", "siphash", "sm3",
# "des", "aes", "rc2", "rc4", "rc5", "idea", "aria", "bf", "cast", "camellia", "seed", "sm4", "chacha", "modes",
# "bn", "ec", "rsa", "dsa", "dh", "sm2", "dso", "engine",
# "buffer", "bio", "stack", "lhash", "rand", "err",
# "evp", "asn1", "pem", "x509", "x509v3", "conf", "txt_db", "pkcs7", "pkcs12", "comp", "ocsp", "ui",
# "cms", "ts", "srp", "cmac", "ct", "async", "kdf", "store"
# ];
# Top level directories to build
$config{dirs} = [ "crypto"];
# crypto/ subdirectories to build
$config{sdirs} = [
"poly1305", "chacha"
];
如何裁减openssl库常怀感恩之心——鲁迅 常规编译的openssl库一般包含libssl和libcrypto两个目标库文件,libssl.so通常为0.5M左右, libcrypto.so为2....