]> git.donarmstrong.com Git - roundcube.git/commitdiff
Use mcrypt instead of des.inc whose license is non-free
authorVincent Bernat <bernat@luffy.cx>
Sun, 18 Mar 2007 09:37:14 +0000 (09:37 +0000)
committerVincent Bernat <bernat@luffy.cx>
Sun, 18 Mar 2007 09:37:14 +0000 (09:37 +0000)
debian/control
debian/copyright
debian/patches/series
debian/patches/use_mcrypt.patch [new file with mode: 0644]
debian/rules

index 4fb546dbf5a699a506d7f6ae004201d78deb89b2..1611b69921fb6824c7f003e5c4a78a71b9eb248a 100644 (file)
@@ -9,7 +9,7 @@ Standards-Version: 3.7.2
 
 Package: roundcube
 Architecture: all
-Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends}
+Depends: dbconfig-common, debconf | debconf-2.0, apache2 | httpd, php5 | php4, php5-mysql | php4-mysql | php5-pgsql | php4-pgsql | php5-sqlite | php4-sqlite, php5-mcrypt | php4-mcrypt, php-db, php-auth, php-net-smtp, php-net-socket, php-mail-mime, ucf, mysql-client | virtual-mysql-client | postgresql-client-8.1 | postgresql-client | sqlite, ${misc:Depends}
 Suggests: mysql-server | posgresql-server
 Description: modern, skinnable, AJAX based webmail solution for IMAP servers
  RoundCube Webmail is a browser-based multilingual IMAP client with an
index b9801fd7c600d800ab367ce5f42bf1f1e76cc10b..440d03a084d9b75db19e13fe1347c593e31d6e7f 100644 (file)
@@ -14,7 +14,6 @@ Version 2 or later, found on Debian systems in the file
 Some files are taken from other projects :
  - googiespell from amix@amix.dk, MIT license
  - lib/html2text.inc from jon@chuggnutt.com, GPL license
- - lib/des.inc from Paul Tero, unknown license
  - lib/utf8.class.php from Alexander Minkovsky, public domain
  - lib/{enriched,icl_commons,imap,mime,utf7}.inc from IlohaMail project, GPL license
  - lib/encoding/*.map from Unicode, Inc., with "BSD-lite" license
index 70787a45ab02e52e5aa2845a7e992919f24d1e50..d9c2b5e56c3fba7d3deddf888f0649d7c59210c2 100644 (file)
@@ -1,2 +1,3 @@
 dbconfig-common_support.patch
 correct_install_path.patch
+use_mcrypt.patch
diff --git a/debian/patches/use_mcrypt.patch b/debian/patches/use_mcrypt.patch
new file mode 100644 (file)
index 0000000..51edad1
--- /dev/null
@@ -0,0 +1,34 @@
+--- roundcube_0.1~beta2.2/program/include/main.inc     2006-12-22 23:26:24.000000000 +0100
++++ roundcube_0.1~beta2.2/program/include/main.inc     2007-03-18 10:24:11.000000000 +0100
+@@ -758,7 +758,13 @@
+ // encrypt IMAP password using DES encryption
+ function encrypt_passwd($pass)
+   {
+-  $cypher = des(get_des_key(), $pass, 1, 0, NULL);
++  $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
++  $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
++  mcrypt_generic_init($td, get_des_key(), $iv);
++  $cypher = mcrypt_generic($td, $pass);
++  mcrypt_generic_end($td);
++  mcrypt_module_close($td);
++  
+   return base64_encode($cypher);
+   }
+@@ -766,8 +772,14 @@
+ // decrypt IMAP password using DES encryption
+ function decrypt_passwd($cypher)
+   {
+-  $pass = des(get_des_key(), base64_decode($cypher), 0, 0, NULL);
+-  return preg_replace('/\x00/', '', $pass);
++  $td = mcrypt_module_open(MCRYPT_TripleDES, "", MCRYPT_MODE_ECB, "");
++  $iv = mcrypt_create_iv(mcrypt_enc_get_iv_size($td), MCRYPT_RAND);
++  mcrypt_generic_init($td, get_des_key(), $iv);
++  $pass = mdecrypt_generic($td, base64_decode($cypher));
++  mcrypt_generic_end($td);
++  mcrypt_module_close($td);
++
++  return $pass;
+   }
index 196ff0072357992f534a1fd6ae7c6799d838692f..fb0745784990f0c0aa1224c3e170486584a9c01f 100755 (executable)
@@ -15,6 +15,8 @@ binary-install/roundcube::
        rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Mail
        rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/Net
        rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/PEAR.php
+       # Removing non-licensed des.inc
+       rm -rf $(CURDIR)/debian/roundcube/usr/share/roundcube/program/lib/des.inc
        # Symlink all that is in /usr/share/roundcube to /var/lib/roundcube
        find debian/roundcube/usr/share/roundcube -maxdepth 1 -mindepth 1 | \
        while read i; do \