encryption - libevent:为什么它依赖于 openssl?

标签 encryption openssl dependencies libevent

即将从源代码编译 libevent,我刚刚注意到它似乎依赖于 OpenSSL 加密 o_o。

这听起来像膨胀。

  • 提供独立于操作系统的异步 IO 抽象的库需要加密什么?
  • 它如何证明对 OpenSSL 的依赖也是巨大而复杂的?


  • libevent-2.0.21-stable/README
    38 The configure script also supports the following flags:
    39 
    40    --enable-gcc-warnings     Enable extra compiler checking with GCC.
    41    --disable-malloc-replacement
    42                              Don't let applications replace our memory
    43                              management functions
    44    --disable-openssl         Disable support for OpenSSL encryption.
    45    --disable-thread-support  Don't support multithreaded environments.
    

    最佳答案

    来自 whatsnew-2.0.txt :

    5.4. SSL support for bufferevents with OpenSSL
    
       There is now a bufferevent type that supports SSL/TLS using the
       OpenSSL library.  The code for this is build in a separate
       library, libevent_openssl, so that your programs don't need to
       link against OpenSSL unless they actually want SSL support.
    
       There are two ways to construct one of these bufferevents, both
       declared in <event2/bufferevent_ssl.h>.  If you want to wrap an
       SSL layer around an existing bufferevent, you would call the
       bufferevent_openssl_filter_new() function.  If you want to do SSL
       on a socket directly, call bufferevent_openssl_socket_new().
    

    如果您需要 SSL 套接字,这是为了您的方便。如果您不需要它,为什么不使用问题中 README 片段中的选项简单地禁用它?

    关于encryption - libevent:为什么它依赖于 openssl?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14624900/

    相关文章:

    php - 我应该在哈希后加密我的密码吗?如果是这样如何正确地做到这一点?

    haskell - 使用类型类在 Haskell 应用程序中实现依赖倒置?

    php - Zend 查找所有相关行

    java - 为什么在完成组装任务之前不能复制依赖项?

    java - Jenkins 的密码加密

    node.js - 使用 vb.net AES/CBC 加密字符串并需要使用 JavaScript CryptoJS 解密

    azure - 哪些类型的存储帐户服务可以与 Azure 中的客户管理 key 一起使用?

    c - 使用特定的 OpenSSL 版本构建 OpenVPN

    python - libeay32.dll 的包装器 : how to import macro?

    aes - 我需要多个 EVP_CIPHER_CTX 结构吗?