ecryptfs-utils: rebuild against OpenSSL
This commit is contained in:
parent
c7ff65c405
commit
d1c8642e2d
3 changed files with 79 additions and 3 deletions
|
@ -1116,7 +1116,7 @@ libvdemgmt.so.0 libvde2-2.3.2_1
|
|||
libvdehist.so.0 libvde2-2.3.2_1
|
||||
libvdesnmp.so.0 libvde2-2.3.2_1
|
||||
libsbc.so.1 sbc-1.0_1
|
||||
libecryptfs.so.1 libecryptfs-104_1
|
||||
libecryptfs.so.1 libecryptfs-111_9
|
||||
libnuma.so.1 libnuma-2.0.7_1
|
||||
libxar.so.1 xar-1.5.2_1
|
||||
libmikmod.so.3 libmikmod-3.1.12_1
|
||||
|
|
76
srcpkgs/ecryptfs-utils/patches/openssl-1.1.x.patch
Normal file
76
srcpkgs/ecryptfs-utils/patches/openssl-1.1.x.patch
Normal file
|
@ -0,0 +1,76 @@
|
|||
=== modified file 'src/key_mod/ecryptfs_key_mod_openssl.c'
|
||||
--- src/key_mod/ecryptfs_key_mod_openssl.c 2013-10-25 19:45:09 +0000
|
||||
+++ src/key_mod/ecryptfs_key_mod_openssl.c 2017-03-13 20:34:27 +0000
|
||||
@@ -50,6 +50,20 @@
|
||||
#include "../include/ecryptfs.h"
|
||||
#include "../include/decision_graph.h"
|
||||
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+void RSA_get0_key(const RSA *r,
|
||||
+ const BIGNUM **n, const BIGNUM **e, const BIGNUM **d)
|
||||
+{
|
||||
+ if (n != NULL)
|
||||
+ *n = r->n;
|
||||
+ if (e != NULL)
|
||||
+ *e = r->e;
|
||||
+ if (d != NULL)
|
||||
+ *d = r->d;
|
||||
+}
|
||||
+#endif
|
||||
+
|
||||
+
|
||||
struct openssl_data {
|
||||
char *path;
|
||||
char *passphrase;
|
||||
@@ -142,6 +156,7 @@
|
||||
{
|
||||
int len, nbits, ebits, i;
|
||||
int nbytes, ebytes;
|
||||
+ const BIGNUM *key_n, *key_e;
|
||||
unsigned char *hash;
|
||||
unsigned char *data = NULL;
|
||||
int rc = 0;
|
||||
@@ -152,11 +167,13 @@
|
||||
rc = -ENOMEM;
|
||||
goto out;
|
||||
}
|
||||
- nbits = BN_num_bits(key->n);
|
||||
+ RSA_get0_key(key, &key_n, NULL, NULL);
|
||||
+ nbits = BN_num_bits(key_n);
|
||||
nbytes = nbits / 8;
|
||||
if (nbits % 8)
|
||||
nbytes++;
|
||||
- ebits = BN_num_bits(key->e);
|
||||
+ RSA_get0_key(key, NULL, &key_e, NULL);
|
||||
+ ebits = BN_num_bits(key_e);
|
||||
ebytes = ebits / 8;
|
||||
if (ebits % 8)
|
||||
ebytes++;
|
||||
@@ -179,11 +196,13 @@
|
||||
data[i++] = '\02';
|
||||
data[i++] = (nbits >> 8);
|
||||
data[i++] = nbits;
|
||||
- BN_bn2bin(key->n, &(data[i]));
|
||||
+ RSA_get0_key(key, &key_n, NULL, NULL);
|
||||
+ BN_bn2bin(key_n, &(data[i]));
|
||||
i += nbytes;
|
||||
data[i++] = (ebits >> 8);
|
||||
data[i++] = ebits;
|
||||
- BN_bn2bin(key->e, &(data[i]));
|
||||
+ RSA_get0_key(key, NULL, &key_e, NULL);
|
||||
+ BN_bn2bin(key_e, &(data[i]));
|
||||
i += ebytes;
|
||||
SHA1(data, len + 3, hash);
|
||||
to_hex(sig, (char *)hash, ECRYPTFS_SIG_SIZE);
|
||||
@@ -278,7 +297,9 @@
|
||||
BIO *in = NULL;
|
||||
int rc;
|
||||
|
||||
+ #if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
CRYPTO_malloc_init();
|
||||
+ #endif
|
||||
ERR_load_crypto_strings();
|
||||
OpenSSL_add_all_algorithms();
|
||||
ENGINE_load_builtin_engines();
|
||||
|
||||
|
|
@ -1,14 +1,14 @@
|
|||
# Template file for 'ecryptfs-utils'
|
||||
pkgname=ecryptfs-utils
|
||||
version=111
|
||||
revision=8
|
||||
revision=9
|
||||
lib32disabled=yes
|
||||
build_style=gnu-configure
|
||||
configure_args="--sbindir=/usr/bin
|
||||
--with-pamdir=/usr/lib/security --enable-gpg --enable-gui
|
||||
--with-gpgme-prefix=${XBPS_CROSS_BASE}/usr"
|
||||
hostmakedepends="automake gettext-devel glib-devel libtool pkg-config intltool swig python"
|
||||
makedepends="python-devel pam-devel nss-devel libressl-devel keyutils-devel gpgme-devel gtk+-devel"
|
||||
makedepends="python-devel pam-devel nss-devel openssl-devel keyutils-devel gpgme-devel gtk+-devel"
|
||||
depends="gettext"
|
||||
_desc="Ecryptfs cryptographic filesystem"
|
||||
short_desc="${_desc} - utilities"
|
||||
|
|
Loading…
Reference in a new issue