0

At the moment I have something resembling this:

#include <openssl/ssl.h>

class Connectivity
{
    Connectivity()
    {
        // Connect etc
        ssl_connection = SSL_new(_ssl_context);
    }

    SSL_CTX* _ssl_context;
    SSL* _ssl;
};

However, I'd like to change _ssl and _ssl_context from pointers, to objects. However, I get this compiler error:

error: field ‘_ssl’ has incomplete type ‘SSL’ {aka ‘ssl_st’}

Is it possible to declare them as objects?

intrigued_66
  • 16,082
  • 51
  • 118
  • 189

1 Answers1

1

No, they are defined as opaque types. So, they can update library implementation (fix vulnerabilities) without requiring to re-compile applications.

dewaffled
  • 2,850
  • 2
  • 17
  • 30