Skip site navigation (1) Skip section navigation (2)

pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX

From: Andres Freund <andres(at)anarazel(dot)de>
To: pgsql-hackers(at)postgresql(dot)org
Subject: pgcrypto compilation error due to stack-allocated EVP_CIPHER_CTX
Date: 2016-12-01 01:48:26
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers

It appears openssl has removed the public definition of EVP_CIPHER_CTX
leading to pgcrypto failing with:

/home/andres/src/postgresql/contrib/pgcrypto/openssl.c:253:17: error: field ‘evp_ctx’ has incomplete type
  EVP_CIPHER_CTX evp_ctx;
/home/andres/src/postgresql/contrib/pgcrypto/openssl.c: In function ‘bf_check_supported_key_len’:
/home/andres/src/postgresql/contrib/pgcrypto/openssl.c:373:17: error: storage size of ‘evp_ctx’ isn’t known
  EVP_CIPHER_CTX evp_ctx;
/home/andres/src/postgresql/contrib/pgcrypto/openssl.c:373:17: warning: unused variable ‘evp_ctx’ [-Wunused-variable]
make[3]: *** [openssl.o] Error 1

seems we need to allocate using EVP_CIPHER_CTX_new() instead.

Am I the only one seing this?

It looks like EVP_CIPHER_CTX_new() has been available for a long time:
commit b40228a61d2f9b40fa6a834c9beaa8ee9dc490c1
Author: Dr. Stephen Henson <steve(at)openssl(dot)org>
Date:   2005-12-02 13:46:39 +0000

    New functions to support opaque EVP_CIPHER_CTX handling.


Andres Freund


pgsql-hackers by date

Next:From: Andres FreundDate: 2016-12-01 01:50:38
Subject: Re: Improve hash-agg performance
Previous:From: Amit LangoteDate: 2016-12-01 01:47:35
Subject: Re: Minor correction in alter_table.sgml

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group