<pre style='margin:0'>
ci42 pushed a commit to branch master
in repository macports-ports.
</pre>
<p><a href="https://github.com/macports/macports-ports/commit/c8d3dc68147fe4c0ec3bb45cc1338594debd9278">https://github.com/macports/macports-ports/commit/c8d3dc68147fe4c0ec3bb45cc1338594debd9278</a></p>
<pre style="white-space: pre; background: #F8F8F8">The following commit(s) were added to refs/heads/master by this push:
<span style='display:block; white-space:pre;color:#404040;'> new c8d3dc6 erlang: fix build issues with libressl version > 2.6.0
</span>c8d3dc6 is described below
<span style='display:block; white-space:pre;color:#808000;'>commit c8d3dc68147fe4c0ec3bb45cc1338594debd9278
</span>Author: ci42 <ciserlohn@macports.org>
AuthorDate: Thu Jan 18 21:59:43 2018 +0100
<span style='display:block; white-space:pre;color:#404040;'> erlang: fix build issues with libressl version > 2.6.0
</span><span style='display:block; white-space:pre;color:#404040;'>
</span><span style='display:block; white-space:pre;color:#404040;'> Closes: #55570
</span>---
lang/erlang/Portfile | 3 +-
.../files/patch-lib_crypto_c_src_crypto.c.diff | 96 ++++++++++++++++++++++
2 files changed, 98 insertions(+), 1 deletion(-)
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/erlang/Portfile b/lang/erlang/Portfile
</span><span style='display:block; white-space:pre;color:#808080;'>index bae1d75..bc2fc32 100644
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>--- a/lang/erlang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/erlang/Portfile
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -55,7 +55,8 @@ pre-patch { file rename ${workpath}/otp_src_${version} ${workpath}/${n
</span>
# http://www.erlang.org/pipermail/erlang-bugs/2009-January/001171.html
patchfiles patch-erts_emulator_Makefile.in.diff \
<span style='display:block; white-space:pre;background:#ffe0e0;'>- patch-erts_configure.diff
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-erts_configure.diff \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ patch-lib_crypto_c_src_crypto.c.diff
</span>
configure.args --prefix=${prefix} \
--enable-kernel-poll \
<span style='display:block; white-space:pre;color:#808080;'>diff --git a/lang/erlang/files/patch-lib_crypto_c_src_crypto.c.diff b/lang/erlang/files/patch-lib_crypto_c_src_crypto.c.diff
</span>new file mode 100644
<span style='display:block; white-space:pre;color:#808080;'>index 0000000..a0291d3
</span><span style='display:block; white-space:pre;background:#ffe0e0;'>--- /dev/null
</span><span style='display:block; white-space:pre;background:#e0e0ff;'>+++ b/lang/erlang/files/patch-lib_crypto_c_src_crypto.c.diff
</span><span style='display:block; white-space:pre;background:#e0e0e0;'>@@ -0,0 +1,96 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+--- lib/crypto/c_src/crypto.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++++ lib/crypto/c_src/crypto.c
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -179,6 +179,12 @@
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ # define HAVE_ECB_IVEC_BUG
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#define HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#if defined(HAS_LIBRESSL) \
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ && LIBRESSL_VERSION_NUMBER >= PACKED_OPENSSL_VERSION_PLAIN(2,6,1)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++# undef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #if defined(HAVE_CMAC)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #include <openssl/cmac.h>
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -659,7 +665,9 @@ static ERL_NIF_TERM atom_rsa_oaep_md;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_pad; /* backwards compatibility */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_padding;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_pkcs1_pss_padding;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_sslv23_padding;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_x931_padding;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_rsa_pss_saltlen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ static ERL_NIF_TERM atom_sha224;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -1064,7 +1072,9 @@ static int initialize(ErlNifEnv* env, ERL_NIF_TERM load_info)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_pad = enif_make_atom(env,"rsa_pad"); /* backwards compatibility */
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_padding = enif_make_atom(env,"rsa_padding");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_pkcs1_pss_padding = enif_make_atom(env,"rsa_pkcs1_pss_padding");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_sslv23_padding = enif_make_atom(env,"rsa_sslv23_padding");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_x931_padding = enif_make_atom(env,"rsa_x931_padding");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_rsa_pss_saltlen = enif_make_atom(env,"rsa_pss_saltlen");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ atom_sha224 = enif_make_atom(env,"sha224");
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4449,8 +4459,10 @@ static int get_pkey_crypt_options(ErlNifEnv *env, ERL_NIF_TERM algorithm, ERL_NI
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ opt->rsa_padding = RSA_PKCS1_PADDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (tpl_terms[1] == atom_rsa_pkcs1_oaep_padding) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ opt->rsa_padding = RSA_PKCS1_OAEP_PADDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (tpl_terms[1] == atom_rsa_sslv23_padding) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ opt->rsa_padding = RSA_SSLV23_PADDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (tpl_terms[1] == atom_rsa_x931_padding) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ opt->rsa_padding = RSA_X931_PADDING;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ } else if (tpl_terms[1] == atom_rsa_no_padding) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4516,7 +4528,10 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ PKeyCryptOptions crypt_opt;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ ErlNifBinary in_bin, out_bin, tmp_bin;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- size_t outlen, tmplen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t outlen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ size_t tmplen;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int is_private = (argv[4] == atom_true),
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ is_encrypt = (argv[5] == atom_true);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ int algo_init = 0;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4596,6 +4611,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (crypt_opt.signature_md != NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ && EVP_PKEY_CTX_set_signature_md(ctx, crypt_opt.signature_md) <= 0)
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ goto badarg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (is_encrypt) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RSA *rsa = EVP_PKEY_get1_RSA(pkey);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4607,9 +4623,11 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ in_bin = tmp_bin;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, RSA_NO_PADDING) <= 0) goto badarg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- } else {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ } else
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (EVP_PKEY_CTX_set_rsa_padding(ctx, crypt_opt.rsa_padding) <= 0) goto badarg;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+- }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #ifdef HAVE_RSA_OAEP_MD
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (crypt_opt.rsa_padding == RSA_PKCS1_OAEP_PADDING) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (crypt_opt.rsa_oaep_md != NULL
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4728,6 +4746,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ #endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if ((i > 0) && argv[0] == atom_rsa && !is_encrypt) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#ifdef HAVE_RSA_SSLV23_PADDING
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (crypt_opt.rsa_padding == RSA_SSLV23_PADDING) {
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ RSA *rsa = EVP_PKEY_get1_RSA(pkey);
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ unsigned char *p;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+@@ -4745,6 +4764,7 @@ static ERL_NIF_TERM pkey_crypt_nif(ErlNifEnv *env, int argc, const ERL_NIF_TERM
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ i = 1;
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>++#endif
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ }
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+
</span><span style='display:block; white-space:pre;background:#e0ffe0;'>+ if (tmp_bin.data != NULL) {
</span></pre><pre style='margin:0'>
</pre>