View | Details | Raw Unified | Return to bug 230033
Collapse All | Expand All

(-)megatools/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1478256777
1
TIMESTAMP = 1532507562
2
SHA256 (megatools-1.9.98.tar.gz) = 9b0521a4d27dbc417fc8e12610ac1e1da729bf6d6eb5bef927ef3670b372a16f
2
SHA256 (megatools-1.10.0.tar.gz) = 788a51d0977db95c371c97917aee3d39e145044b6bb70d671bc76c2ea6c4171b
3
SIZE (megatools-1.9.98.tar.gz) = 285805
3
SIZE (megatools-1.10.0.tar.gz) = 297369
(-)megatools/files/patch-lib_mega.c (-33 / +46 lines)
Lines 1-33 Link Here
1
Fix build for FreeBSD 9.x base OpenSSL and LibreSSL.  Fix for LibreSSL is
1
--- lib/mega.c.orig	2018-07-22 23:41:55.000000000 +0200
2
already in upstream repository, so this file can be removed once FreeBSD 9.x
2
+++ lib/mega.c	2018-07-25 10:45:41.692456000 +0200
3
support is dropped AND the next version of megatools is released.
3
@@ -3172,6 +3172,7 @@
4
--- lib/mega.c.orig	2016-11-03 13:45:42 UTC
4
 	GError *local_err = NULL;
5
+++ lib/mega.c
5
 	gc_free gchar *url = NULL;
6
@@ -29,7 +29,9 @@
6
 	gc_string_free GString *response = NULL;
7
 #include <string.h>
7
+	gc_free gchar* chksum = NULL;
8
 #include <time.h>
8
 
9
 #include <openssl/aes.h>
9
 	tman_debug("W[%d]: started for chunk %d\n", worker->index, c->index);
10
+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
10
 
11
 #include <openssl/modes.h>
11
@@ -3217,7 +3218,7 @@
12
+#endif
12
 	}
13
 #include <openssl/bn.h>
13
 
14
 #include <openssl/rsa.h>
14
 	// prepare URL including chunk offset
15
 #include <openssl/rand.h>
15
-	gc_free gchar* chksum = upload_checksum(buf, c->size);
16
@@ -803,7 +805,7 @@ static gboolean rsa_key_gen(rsa_key* k)
16
+	chksum = upload_checksum(buf, c->size);
17
     return FALSE;
17
 	url = g_strdup_printf("%s/%" G_GOFFSET_FORMAT "?c=%s", t->upload_url, c->offset, chksum);
18
   }
18
 
19
 
19
 	// perform upload POST
20
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
20
@@ -4639,6 +4640,26 @@
21
+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
21
 }
22
   RSA_get0_key(key, &k->m, &k->e, &k->d);
22
 
23
   RSA_get0_factors(key, &k->q, &k->p);
23
 // }}}
24
   RSA_get0_crt_params(key, NULL, NULL, &k->u);
24
+// {{{ mega_node_has_ancestor
25
@@ -2988,7 +2990,7 @@ struct _put_data
25
+
26
   GByteArray* buffer;
26
+gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor)
27
 };
27
+{
28
 
28
+	g_return_val_if_fail(n != NULL, FALSE);
29
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
29
+	g_return_val_if_fail(ancestor != NULL, FALSE);
30
+#if OPENSSL_VERSION_NUMBER >= 0x101000000L && !defined(LIBRESSL_VERSION_NUMBER)
30
+
31
 void AES_ctr128_encrypt(
31
+	struct mega_node* it = n->parent;
32
   const unsigned char *in, 
32
+
33
   unsigned char *out,
33
+	while (it) {
34
+		if (it == ancestor)
35
+			return TRUE;
36
+
37
+		it = it->parent;
38
+	}
39
+
40
+	return FALSE;
41
+}
42
+
43
+// }}}
44
 
45
 // {{{ mega_session_save
46
 
(-)megatools/files/patch-lib_mega.h (+19 lines)
Line 0 Link Here
1
--- lib/mega.h.orig	2018-07-22 23:40:40.000000000 +0200
2
+++ lib/mega.h	2018-07-25 10:45:38.692660000 +0200
3
@@ -118,7 +118,7 @@
4
 
5
 	gchar *node_handle;
6
 	gchar *node_name;
7
-	gsize node_size;
8
+	guint64 node_size;
9
 };
10
 
11
 #define MEGA_DEBUG_API 0x01
12
@@ -181,6 +181,7 @@
13
 gboolean mega_node_is_writable(struct mega_session *s, struct mega_node *n);
14
 
15
 gboolean mega_node_is_container(struct mega_node *n);
16
+gboolean mega_node_has_ancestor(struct mega_node *n, struct mega_node *ancestor);
17
 gchar *mega_node_get_link(struct mega_node *n, gboolean include_key);
18
 gchar *mega_node_get_key(struct mega_node *n);
19
 gboolean mega_node_get_path(struct mega_node *n, gchar *buf, gsize len);
(-)megatools/Makefile (-2 / +1 lines)
Lines 2-9 Link Here
2
# $FreeBSD: head/net/megatools/Makefile 448631 2017-08-23 17:13:21Z amdmi3 $
2
# $FreeBSD: head/net/megatools/Makefile 448631 2017-08-23 17:13:21Z amdmi3 $
3
3
4
PORTNAME=	megatools
4
PORTNAME=	megatools
5
PORTVERSION=	1.9.98
5
PORTVERSION=	1.10.0
6
PORTREVISION=	1
7
CATEGORIES=	net
6
CATEGORIES=	net
8
MASTER_SITES=	https://megatools.megous.com/builds/
7
MASTER_SITES=	https://megatools.megous.com/builds/
9
8

Return to bug 230033