forked from pool/nemo-extensions
Accepting request 554660 from X11:Cinnamon:Factory
OBS-URL: https://build.opensuse.org/request/show/554660 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/nemo-extensions?expand=0&rev=9
This commit is contained in:
commit
7df977664f
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Dec 5 10:45:09 UTC 2017 - cfarrell@suse.com
|
||||
|
||||
- Add nemo-gtkhash_openssl-1.1.patch: Add basic OpenSSL 1.1+
|
||||
compatibility in Nemo-GtkHash.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sat Oct 28 19:57:36 UTC 2017 - sor.alexei@meowr.ru
|
||||
|
||||
|
@ -34,6 +34,8 @@ Patch0: nemo-seahorse_no-nautilus-conflicts.patch
|
||||
Patch1: nemo-dropbox_no-dropbox-bin.patch
|
||||
# PATCH-FIX-OPENSUSE nemo-seahorse_gpg-2.2.patch sor.alexei@meowr.ru -- Add GPG 2.2 to accepted versions in nemo-seahorse.
|
||||
Patch2: nemo-seahorse_gpg-2.2.patch
|
||||
# PATCH-FIX-OPENSUSE nemo-gtkhash_openssl-1.1.patch sor.alexei@meowr.ru -- Add basic OpenSSL 1.1+ compatibility in nemo-gtkhash.
|
||||
Patch3: nemo-gtkhash_openssl-1.1.patch
|
||||
BuildRequires: gettext-runtime
|
||||
BuildRequires: gnome-common
|
||||
BuildRequires: intltool
|
||||
@ -341,6 +343,7 @@ directory in Nemo.
|
||||
%patch0
|
||||
%patch1
|
||||
%patch2
|
||||
%patch3
|
||||
# Remove spurious executable permission.
|
||||
chmod a-x nemo-audio-tab/COPYING.GPL3 nemo-emblems/COPYING.GPL3
|
||||
|
||||
@ -369,7 +372,7 @@ pushd nemo-gtkhash
|
||||
--disable-gcrypt \
|
||||
%endif
|
||||
%if 0%{?suse_version} > 1320 || (0%{?sle_version} >= 120100 && 0%{?is_opensuse})
|
||||
--enable-polarssl \
|
||||
--enable-mbedtls \
|
||||
%endif
|
||||
--enable-nettle \
|
||||
--enable-nss \
|
||||
|
92
nemo-gtkhash_openssl-1.1.patch
Normal file
92
nemo-gtkhash_openssl-1.1.patch
Normal file
@ -0,0 +1,92 @@
|
||||
--- nemo-gtkhash.orig/src/hash/hash-lib-crypto.c
|
||||
+++ nemo-gtkhash/src/hash/hash-lib-crypto.c
|
||||
@@ -34,7 +34,7 @@
|
||||
#define LIB_DATA ((struct hash_lib_crypto_s *)func->lib_data)
|
||||
|
||||
struct hash_lib_crypto_s {
|
||||
- EVP_MD_CTX ctx;
|
||||
+ EVP_MD_CTX *ctx;
|
||||
};
|
||||
|
||||
static const EVP_MD *gtkhash_hash_lib_crypto_get_md(const enum hash_func_e id)
|
||||
@@ -44,8 +44,10 @@ static const EVP_MD *gtkhash_hash_lib_cr
|
||||
return EVP_md4();
|
||||
case HASH_FUNC_MD5:
|
||||
return EVP_md5();
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
case HASH_FUNC_SHA0:
|
||||
return EVP_sha();
|
||||
+#endif
|
||||
case HASH_FUNC_SHA1:
|
||||
return EVP_sha1();
|
||||
case HASH_FUNC_RIPEMD160:
|
||||
@@ -69,9 +71,13 @@ bool gtkhash_hash_lib_crypto_is_supporte
|
||||
if (!(md = gtkhash_hash_lib_crypto_get_md(id)))
|
||||
return false;
|
||||
|
||||
- EVP_MD_CTX_init(&data.ctx);
|
||||
- bool ret = (EVP_DigestInit_ex(&data.ctx, md, NULL) == 1);
|
||||
- EVP_MD_CTX_cleanup(&data.ctx);
|
||||
+ data.ctx = EVP_MD_CTX_create();
|
||||
+ bool ret = (EVP_DigestInit_ex(data.ctx, md, NULL) == 1);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+ EVP_MD_CTX_destroy(data.ctx);
|
||||
+#else
|
||||
+ EVP_MD_CTX_cleanup(data.ctx);
|
||||
+#endif
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -84,37 +90,45 @@ void gtkhash_hash_lib_crypto_start(struc
|
||||
if (!(md = gtkhash_hash_lib_crypto_get_md(func->id)))
|
||||
g_assert_not_reached();
|
||||
|
||||
- EVP_MD_CTX_init(&LIB_DATA->ctx);
|
||||
+ LIB_DATA->ctx = EVP_MD_CTX_create();
|
||||
|
||||
- if (EVP_DigestInit_ex(&LIB_DATA->ctx, md, NULL) != 1)
|
||||
+ if (EVP_DigestInit_ex(LIB_DATA->ctx, md, NULL) != 1)
|
||||
g_assert_not_reached();
|
||||
}
|
||||
|
||||
void gtkhash_hash_lib_crypto_update(struct hash_func_s *func,
|
||||
const uint8_t *buffer, const size_t size)
|
||||
{
|
||||
- EVP_DigestUpdate(&LIB_DATA->ctx, buffer, size);
|
||||
+ EVP_DigestUpdate(LIB_DATA->ctx, buffer, size);
|
||||
}
|
||||
|
||||
void gtkhash_hash_lib_crypto_stop(struct hash_func_s *func)
|
||||
{
|
||||
- EVP_MD_CTX_cleanup(&LIB_DATA->ctx);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+ EVP_MD_CTX_destroy(LIB_DATA->ctx);
|
||||
+#else
|
||||
+ EVP_MD_CTX_cleanup(LIB_DATA->ctx);
|
||||
+#endif
|
||||
g_free(LIB_DATA);
|
||||
}
|
||||
|
||||
uint8_t *gtkhash_hash_lib_crypto_finish(struct hash_func_s *func, size_t *size)
|
||||
{
|
||||
- *size = EVP_MD_CTX_size(&LIB_DATA->ctx);
|
||||
+ *size = EVP_MD_CTX_size(LIB_DATA->ctx);
|
||||
g_assert(*size > 0);
|
||||
|
||||
uint8_t *digest = g_malloc0(*size);
|
||||
|
||||
unsigned int len;
|
||||
- if (EVP_DigestFinal_ex(&LIB_DATA->ctx, digest, &len) != 1)
|
||||
+ if (EVP_DigestFinal_ex(LIB_DATA->ctx, digest, &len) != 1)
|
||||
g_assert_not_reached();
|
||||
g_assert(*size == len);
|
||||
|
||||
- EVP_MD_CTX_cleanup(&LIB_DATA->ctx);
|
||||
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||
+ EVP_MD_CTX_destroy(LIB_DATA->ctx);
|
||||
+#else
|
||||
+ EVP_MD_CTX_cleanup(LIB_DATA->ctx);
|
||||
+#endif
|
||||
g_free(LIB_DATA);
|
||||
|
||||
return digest;
|
Loading…
Reference in New Issue
Block a user