Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

windows: libssl isn't actually needed in the wheels #76

Open
enkore opened this issue Jul 22, 2023 · 1 comment · May be fixed by #78
Open

windows: libssl isn't actually needed in the wheels #76

enkore opened this issue Jul 22, 2023 · 1 comment · May be fixed by #78
Assignees
Labels
enhancement New feature or request

Comments

@enkore
Copy link
Member

enkore commented Jul 22, 2023

That's also why auditwheel doesn't include it for manylinux, it's not referenced. This translates to about 200k wheel size reduction, half a meg installed.

This also means we don't actually need to build the libssl portion, iirc it's possible to just build libcrypto, which should speed builds up a bit. I'll check... we could also ponder not building all the legacy algos in libcrypto. We're shipping everything enabled by default, which is pretty much everything, from DES to CAST5 and RC4. I think most of the stuff that's in our libcrypto can't actually be used at all from the libssh side. It would probably be quite reasonable to disable most of them: SSH is only going to use AES or Chapoly, it doesn't need TEA or MD2. (On that topic, I'm not sure if all the X.509 stuff is needed, maybe for kerberos or reading putty-type keys? OpenSSH itself doesn't use X509-style PKI - this would be another massive chunk of code).

@enkore enkore added the enhancement New feature or request label Jul 22, 2023
@enkore
Copy link
Member Author

enkore commented Jul 22, 2023

ssh.dll imports:

BIO_ctrl
BIO_free
BIO_new
BIO_new_mem_buf
BIO_s_mem
BN_CTX_free
BN_CTX_new
BN_bin2bn
BN_bn2bin
BN_clear_free
BN_cmp
BN_copy
BN_dup
BN_free
BN_hex2bn
BN_is_bit_set
BN_new
BN_num_bits
BN_set_word
BN_sub
DH_compute_key
DH_free
DH_generate_key
DH_get0_key
DH_get0_pqg
DH_new
DH_set0_key
DH_set0_pqg
DH_size
DSA_SIG_free
DSA_SIG_get0
DSA_SIG_new
DSA_SIG_set0
DSA_free
DSA_generate_key
DSA_generate_parameters_ex
DSA_get0_key
DSA_get0_pqg
DSA_new
DSA_set0_key
DSA_set0_pqg
DSA_size
ECDH_compute_key
ECDSA_SIG_free
ECDSA_SIG_get0
ECDSA_SIG_new
ECDSA_SIG_set0
EC_GROUP_cmp
EC_GROUP_get_curve_name
EC_GROUP_get_degree
EC_KEY_free
EC_KEY_generate_key
EC_KEY_get0_group
EC_KEY_get0_private_key
EC_KEY_get0_public_key
EC_KEY_new_by_curve_name
EC_KEY_set_asn1_flag
EC_KEY_set_private_key
EC_KEY_set_public_key
EC_KEY_up_ref
EC_POINT_clear_free
EC_POINT_cmp
EC_POINT_free
EC_POINT_new
EC_POINT_oct2point
EC_POINT_point2oct
ERR_error_string
ERR_get_error
EVP_CIPHER_CTX_ctrl
EVP_CIPHER_CTX_free
EVP_CIPHER_CTX_new
EVP_CIPHER_CTX_reset
EVP_CIPHER_CTX_set_padding
EVP_DecryptFinal
EVP_DecryptInit_ex
EVP_DecryptUpdate
EVP_DigestFinal
EVP_DigestInit_ex
EVP_DigestSignFinal
EVP_DigestSignInit
EVP_DigestUpdate
EVP_DigestVerifyFinal
EVP_DigestVerifyInit
EVP_EncryptFinal
EVP_EncryptInit_ex
EVP_EncryptUpdate
EVP_MD_CTX_free
EVP_MD_CTX_new
EVP_PKEY_base_id
EVP_PKEY_bits
EVP_PKEY_free
EVP_PKEY_get1_DSA
EVP_PKEY_get1_EC_KEY
EVP_PKEY_get1_RSA
EVP_PKEY_new
EVP_PKEY_new_mac_key
EVP_PKEY_set1_DSA
EVP_PKEY_set1_EC_KEY
EVP_PKEY_set1_RSA
EVP_PKEY_size
EVP_aes_128_cbc
EVP_aes_128_ctr
EVP_aes_128_gcm
EVP_aes_192_cbc
EVP_aes_192_ctr
EVP_aes_256_cbc
EVP_aes_256_ctr
EVP_aes_256_gcm
EVP_des_ede3_cbc
EVP_md5
EVP_sha1
EVP_sha256
EVP_sha384
EVP_sha512
FIPS_mode
OpenSSL_version
OpenSSL_version_num
PEM_read_bio_PrivateKey
PEM_write_bio_PrivateKey
RAND_bytes
RSA_free
RSA_generate_key_ex
RSA_get0_crt_params
RSA_get0_factors
RSA_get0_key
RSA_new
RSA_set0_crt_params
RSA_set0_factors
RSA_set0_key
RSA_size
d2i_DSA_SIG
d2i_ECDSA_SIG
i2d_DSA_SIG
i2d_ECDSA_SIG

So yeah, tons of stuff we can disable in the openssl build.

@enkore enkore self-assigned this Jul 23, 2023
@enkore enkore linked a pull request Jul 23, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant