Skip to content

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

Closed

Description

@enkore

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).

Activity

  1. enkore commented on Jul 22, 2023

    @enkore
    ContributorAuthor

    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.

  2. self-assigned this
    on Jul 23, 2023
  3. pkittenis commented on Jan 13, 2025

    @pkittenis
    Member

    Don't have control over the OpenSSL windows build, they come pre-packaged. It gets what it gets. No, do not want to also build OpenSSL from source on Windows.

  4. locked as resolved and limited conversation to collaborators on Oct 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions