From 6ad47156581553201a1871d96fb0c1d2df9420489a884cea15d9c8e75a0276ad Mon Sep 17 00:00:00 2001 From: Alexei Sorokin Date: Wed, 5 Oct 2016 20:59:36 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/X11:Cinnamon:Factory/nemo-extensions?expand=0&rev=28 --- nemo-gtkhash_mbedtls-2.x.patch | 38 +++++++++++++++++----------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/nemo-gtkhash_mbedtls-2.x.patch b/nemo-gtkhash_mbedtls-2.x.patch index 20a584d..a8de119 100644 --- a/nemo-gtkhash_mbedtls-2.x.patch +++ b/nemo-gtkhash_mbedtls-2.x.patch @@ -44,7 +44,7 @@ #include #include #include -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 +#include +#else #include @@ -56,7 +56,7 @@ #define LIB_DATA ((struct hash_lib_polarssl_s *)func->lib_data) struct hash_lib_polarssl_s { -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_context_t ctx; +#else md_context_t ctx; @@ -65,7 +65,7 @@ -static bool gtkhash_hash_lib_polarssl_set_type(const enum hash_func_e id, md_type_t *type) +static bool gtkhash_hash_lib_polarssl_set_type(const enum hash_func_e id, -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_type_t *type) +#else + md_type_t *type) @@ -73,63 +73,63 @@ { switch (id) { case HASH_FUNC_MD2: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_MD2; +#else *type = POLARSSL_MD_MD2; +#endif break; case HASH_FUNC_MD4: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_MD4; +#else *type = POLARSSL_MD_MD4; +#endif break; case HASH_FUNC_MD5: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_MD5; +#else *type = POLARSSL_MD_MD5; +#endif + break; + case HASH_FUNC_RIPEMD160: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_RIPEMD160; +#else + *type = POLARSSL_MD_RIPEMD160; +#endif break; case HASH_FUNC_SHA1: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_SHA1; +#else *type = POLARSSL_MD_SHA1; +#endif break; case HASH_FUNC_SHA224: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_SHA224; +#else *type = POLARSSL_MD_SHA224; +#endif break; case HASH_FUNC_SHA256: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_SHA256; +#else *type = POLARSSL_MD_SHA256; +#endif break; case HASH_FUNC_SHA384: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_SHA384; +#else *type = POLARSSL_MD_SHA384; +#endif break; case HASH_FUNC_SHA512: -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *type = MBEDTLS_MD_SHA512; +#else *type = POLARSSL_MD_SHA512; @@ -145,7 +145,7 @@ bool gtkhash_hash_lib_polarssl_is_supported(const enum hash_func_e id) { - struct hash_lib_polarssl_s data; -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_type_t type; +#else md_type_t type; @@ -155,7 +155,7 @@ return false; + struct hash_lib_polarssl_s data; -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_init(&data.ctx); + + const mbedtls_md_info_t *info = mbedtls_md_info_from_type(type); @@ -181,7 +181,7 @@ void gtkhash_hash_lib_polarssl_start(struct hash_func_s *func) { func->lib_data = g_new(struct hash_lib_polarssl_s, 1); -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_type_t type; +#else md_type_t type; @@ -190,7 +190,7 @@ if (!gtkhash_hash_lib_polarssl_set_type(func->id, &type)) g_assert_not_reached(); -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_init(&LIB_DATA->ctx); + + const mbedtls_md_info_t *info = mbedtls_md_info_from_type(type); @@ -212,7 +212,7 @@ void gtkhash_hash_lib_polarssl_update(struct hash_func_s *func, const uint8_t *buffer, const size_t size) { -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_update(&LIB_DATA->ctx, buffer, size); +#else md_update(&LIB_DATA->ctx, buffer, size); @@ -221,7 +221,7 @@ void gtkhash_hash_lib_polarssl_stop(struct hash_func_s *func) { -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + mbedtls_md_free(&LIB_DATA->ctx); +#else if (md_free_ctx(&LIB_DATA->ctx) != 0) @@ -233,7 +233,7 @@ uint8_t *gtkhash_hash_lib_polarssl_finish(struct hash_func_s *func, size_t *size) { -+#ifdef HAVE_MBEDTLS_2_0_0 ++#if HAVE_MBEDTLS_2_0_0 + *size = mbedtls_md_get_size(LIB_DATA->ctx.md_info); + uint8_t *digest = g_malloc(*size); +