changeset 1868b2a79c4d in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=1868b2a79c4d
description: [Darlan] Updated hebrew translation
diffstat:
po/he.po | 25 ++++++++++++-------------
1 files changed, 12 insertions(+), 13 deletions(-)
diffs (105 lines):
diff -r c42abe306bc5 -r 1868b2a79c4d po/he.po
--- a/po/he.po Sun Nov 10 08:39:50 2013 +0100
+++ b/po/he.po Sun Nov 10 13:28:10 2013 +0100
@@ -9,7 +9,7 @@
"Project-Id-Version: gajim 0.15\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2013-10-22 13:06+0200\n"
-"PO-Revision-Date: 2013-11-07 22:24+0200\n"
+"PO-Revision-Date: 2013-11-10 09:39+0200\n"
"Last-Translator: Isratine Citizen <genghiskhan(a)gmx.ca>\n"
"Language-Team: Rahut\n"
"Language: he\n"
@@ -3179,8 +3179,7 @@
#: ../src/chat_control.py:1789
msgid "You need to know the real JID of the contact to send him or her a file."
-msgstr ""
-"יש צורך לדעת את הכתובת המממשת (JID) של איש הקשר כדי לשלוח אליו או אליה קובץ."
+msgstr "עליך לדעת את הכתובת (JID) של איש הקשר כדי לשלוח אליו או אליה קובץ."
#: ../src/chat_control.py:1907
#, python-format
@@ -3238,7 +3237,7 @@
#. About encrypted chat session
#: ../src/chat_control.py:2291
msgid "and authenticated"
-msgstr "והינה מאומת"
+msgstr "והינה מאומתת"
#. About encrypted chat session
#: ../src/chat_control.py:2295
@@ -3740,7 +3739,7 @@
#: ../src/common/commands.py:212
msgid "Choose the groupchats you want to leave"
-msgstr "בחירת שיחות קבוצה אשר ברצונך לעזוב"
+msgstr "בחר שיחות קבוצה אשר ברצונך לעזוב"
#. Make special context menu if group is Groupchats
#: ../src/common/commands.py:216 ../src/common/contacts.py:131
@@ -3768,7 +3767,7 @@
#: ../src/common/config.py:76
msgid "Play sound when user is busy"
-msgstr "נגן צלילים כאשר המשתמש עסוק"
+msgstr "נגן צלילים כאשר משתמש עסוק"
#: ../src/common/config.py:77
msgid "Use D-Bus and Notification-Daemon to show notifications"
@@ -3886,7 +3885,7 @@
#. thistle2
#: ../src/common/config.py:110
msgid "Other dialogs color."
-msgstr "צבע של תיבות דו שיח אחרות."
+msgstr "צבע תיבות דו שיח אחרות."
#. white
#: ../src/common/config.py:111
@@ -3923,7 +3922,7 @@
#: ../src/common/config.py:123
msgid "Language used by speller"
-msgstr "השפה אשר בשימוש על ידי מאיית"
+msgstr "שפה אשר מצויה בשימוש על ידי מאיית"
#: ../src/common/config.py:124
msgid ""
@@ -4051,8 +4050,8 @@
"How many seconds to wait before trying to autorejoin to a conference you are "
"being disconnected from. Set to 0 to disable autorejoining."
msgstr ""
-"כמה שניות להמתין טרם ניסיון להצטרף אוטומטית אל שיחת ועידה אשר ממנה הינך "
-"מתנתק. הגדר אל 0 כדי לנטרל הצטרפות אוטומטית."
+"כמה שניות להמתין טרם ניסיון הצטרפות חוזרת אוטומטית אל שיחת ועידה אשר ממנה "
+"אנחנו מתנתקים. הגדר אל 0 כדי לנטרל הצטרפות חוזרת אוטומטית."
#: ../src/common/config.py:185
msgid ""
@@ -4066,7 +4065,7 @@
"Client default behaviour)."
msgstr ""
"שליחת הודעה בלחיצה על Ctrl+Enter ויצירת שורה חדשה באמצעות המקש Enter "
-"(התנהגות משתמטת של Mirabilis לקוח ICQ)."
+"(התנהגות שגרתית של Mirabilis לקוח ICQ)."
# Ctrl+מעלה
#: ../src/common/config.py:188
@@ -4105,7 +4104,7 @@
msgid ""
"Sent chat state notifications. Can be one of all, composing_only, disabled."
msgstr ""
-"שלח התראות מצב שיחה בחלון שיחה. יכול להיות אחד מאלו all, composing_only, "
+"שליחת התראות מצב שיחה בחלון שיחה. יכול להיות אחד מאלו all, composing_only, "
"disabled."
#: ../src/common/config.py:197
@@ -7497,7 +7496,7 @@
"SHA1 fingerprint of the certificate:\n"
"%s"
msgstr ""
-"הוספת תעודה זו אל רשימת התעודות המהימנות.\n"
+"הוסף את תעודה זו אל רשימת התעודות המהימנות.\n"
"טביעת אצבע SHA1 של התעודה:\n"
"%s"
changeset c42abe306bc5 in /home/hg/repos/gajim
author: Yann Leboulanger <asterix(a)lagaule.org>
branches: gajim_0.16
details:http://hg.gajim.org/gajim?cmd=changeset;node=c42abe306bc5
description: [fedor] use openssl random number generator if available, and improve entropy. Fixes #7550
diffstat:
src/common/configpaths.py | 3 +-
src/common/crypto.py | 48 ++++++++++++++++++++++++++++++++++++++++++++++-
src/gajim.py | 16 +++++++++++++++
3 files changed, 65 insertions(+), 2 deletions(-)
diffs (112 lines):
diff -r 687e80243968 -r c42abe306bc5 src/common/configpaths.py
--- a/src/common/configpaths.py Fri Nov 08 14:06:22 2013 +0400
+++ b/src/common/configpaths.py Sun Nov 10 08:39:50 2013 +0100
@@ -141,7 +141,8 @@
d = {'MY_DATA': '', 'LOG_DB': u'logs.db', 'MY_CACERTS': u'cacerts.pem',
'MY_EMOTS': u'emoticons', 'MY_ICONSETS': u'iconsets',
'MY_MOOD_ICONSETS': u'moods', 'MY_ACTIVITY_ICONSETS': u'activities',
- 'PLUGINS_USER': u'plugins', 'MY_PEER_CERTS': u'certs'}
+ 'PLUGINS_USER': u'plugins', 'MY_PEER_CERTS': u'certs',
+ 'RNG_SEED': u'rng_seed'}
for name in d:
self.add(name, TYPE_DATA, windowsify(d[name]))
diff -r 687e80243968 -r c42abe306bc5 src/common/crypto.py
--- a/src/common/crypto.py Fri Nov 08 14:06:22 2013 +0400
+++ b/src/common/crypto.py Sun Nov 10 08:39:50 2013 +0100
@@ -19,6 +19,7 @@
## along with Gajim. If not, see <http://www.gnu.org/licenses/>.
##
+import sys
import os
import math
@@ -75,8 +76,53 @@
else:
return base28_chr[n]
+def add_entropy_sources_OpenSSL():
+ # Other possibly variable data. This are very low quality sources of
+ # entropy, but some of them are installation dependent and can be hard
+ # to guess for the attacker.
+ # Data available on all platforms Unix, Windows
+ sources = [sys.argv, sys.builtin_module_names,
+ sys.copyright, sys.getfilesystemencoding(), sys.hexversion,
+ sys.modules, sys.path, sys.version, sys.api_version,
+ os.environ, os.getcwd(), os.getpid()]
+
+ for s in sources:
+ OpenSSL.rand.add(str(s), 0.01)
+
+ # On Windows add the current contents of the screen to the PRNG state.
+ if os.name == 'nt':
+ OpenSSL.rand.screen()
+ # The /proc filesystem on POSIX systems contains many random variables:
+ # memory statistics, interrupt counts, network packet counts
+ if os.name == 'posix':
+ dirs = ['/proc', '/proc/net', '/proc/self']
+ for d in dirs:
+ if os.access(d, os.R_OK):
+ for filename in os.listdir(d):
+ OpenSSL.rand.add(filename, 0)
+ try:
+ with open(d + os.sep + filename, "r") as fp:
+ # Limit the ammount of read bytes, in case a memory
+ # file was opened
+ OpenSSL.rand.add(str(fp.read(5000)), 0.01)
+ except:
+ # Ignore all read and access errors
+ pass
+
+PYOPENSSL_PRNG_PRESENT = False
+try:
+ import OpenSSL.rand
+ PYOPENSSL_PRNG_PRESENT = True
+except ImportError:
+ # PyOpenSSL PRNG not available
+ pass
+
def random_bytes(bytes_):
- return os.urandom(bytes_)
+ if PYOPENSSL_PRNG_PRESENT:
+ OpenSSL.rand.add(os.urandom(bytes_), bytes_)
+ return OpenSSL.rand.bytes(bytes_)
+ else:
+ return os.urandom(bytes_)
def generate_nonce():
return random_bytes(8)
diff -r 687e80243968 -r c42abe306bc5 src/gajim.py
--- a/src/gajim.py Fri Nov 08 14:06:22 2013 +0400
+++ b/src/gajim.py Sun Nov 10 08:39:50 2013 +0100
@@ -293,6 +293,19 @@
pid_filename = gajimpaths['PID_FILE']
config_filename = gajimpaths['CONFIG_FILE']
+# Seed the OpenSSL pseudo random number generator from file and initialize
+RNG_SEED = gajimpaths['RNG_SEED']
+PYOPENSSL_PRNG_PRESENT = False
+try:
+ import OpenSSL.rand
+ from common import crypto
+ PYOPENSSL_PRNG_PRESENT = True
+ # Seed from file
+ OpenSSL.rand.load_file(RNG_SEED)
+ crypto.add_entropy_sources_OpenSSL()
+except ImportError:
+ log.info("PyOpenSSL PRNG not available")
+
import traceback
import errno
import dialogs
@@ -439,6 +452,9 @@
del pid_dir
def on_exit():
+ # Save the entropy from OpenSSL PRNG
+ if PYOPENSSL_PRNG_PRESENT:
+ OpenSSL.rand.write_file(RNG_SEED)
# delete pid file on normal exit
if os.path.exists(pid_filename):
os.remove(pid_filename)