OpenSSL on a striping machine

I am taking my first steps in the OpenSSL library and feel a little lost. My machine is multithreaded (Xeon series, can share more if someone needs information) with Linux.

The application build is an SSL proxy, so I need to process several TCP streams as quickly as possible, that is, I want to run lib as blockable as possible.

Having looked a bit inside crypto/crypto.hmainly in this section:

# ifndef OPENSSL_NO_LOCKING
#  ifndef CRYPTO_w_lock
#   define CRYPTO_w_lock(type)     \
        CRYPTO_lock(CRYPTO_LOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
#   define CRYPTO_w_unlock(type)   \
        CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_WRITE,type,__FILE__,__LINE__)
#   define CRYPTO_r_lock(type)     \
        CRYPTO_lock(CRYPTO_LOCK|CRYPTO_READ,type,__FILE__,__LINE__)
#   define CRYPTO_r_unlock(type)   \
        CRYPTO_lock(CRYPTO_UNLOCK|CRYPTO_READ,type,__FILE__,__LINE__)
#   define CRYPTO_add(addr,amount,type)    \
        CRYPTO_add_lock(addr,amount,type,__FILE__,__LINE__)
#  endif

I tried digging in code / API and got a little lost. My questions:

  • What is OpenSSL lib support for multi-core / streaming applications?
  • What parts of lib can have only one instance (singleton)?
+4
source share
1 answer

OpenSSL lib / ?

, , " " - , , OpenSSL /, . ( / OpenSSL, , .. , , OpenSSL )

lib (singleton)?

, ( ) , .

, SSL (SSL_load_error_strings(), SSL_library_init() ..) (.. , - ) SSL ( ) , () 'd ; , , OpenSSL, .

lib .

, , , - OpenSSL ; , , . , OpenSSL , . , , , SSL , , .

+4

Source: https://habr.com/ru/post/1665264/


All Articles