error: storage size of 'ctx' isn't known EVP_CIPHER_CTX ctx;

I am getting this error with openssl -1.1.1. Compared openssl-1.0.* and openssl-1.1.1 and this EVP_CIPHER_CTX struture has not been made opaque in openssl-1.1.1.

So why I am getting this error ?

  • What are you doing to generate the error? What were the steps leading up to this point? – Jeff Schaller Oct 24 '18 at 11:19
  • I think you mean has been made opaque, see 1.1.0 CHANGES. – mr.spuratic Oct 24 '18 at 11:43

From OpenSSL 1.1.0 Changes:

“All structures in libssl public header files have been removed so that they are "opaque" to library users. You should use the provided accessor functions instead.”

This (its underlying structure evp_cipher_ctx_st) and others are hidden from 1.1.0, they now must be accessed (create, modify, destroy) via API. To refer to such objects you now must only use a pointer to them rather than create your own instances. The advantages include encapsulation of these data types, and improved binary API compatibility.

See EVP_CIPHER_meth_new(3).

The fine people at Cossack Labs have a useful blog entry discussing the changes they needed to make for OpenSSL 1.1 migration.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy