From da7c1514649611074e8bfc4ad2c8ab776d22670b Mon Sep 17 00:00:00 2001 From: Justus Ranvier Date: Tue, 4 Jun 2013 15:13:16 -0500 Subject: [PATCH 1/4] Update Makefile to correct sandbox violations when built via Portage (Gentoo) --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 6f415786..6485c2c9 100755 --- a/Makefile +++ b/Makefile @@ -34,7 +34,7 @@ install: install -m 644 src/pyelliptic/*.py $(DEST_APP)/pyelliptic install -m 644 src/socks/*.py $(DEST_APP)/socks install -m 644 src/bitmessageqt/*.py $(DEST_APP)/bitmessageqt - install -m 755 debian/pybm /usr/bin/pybitmessage + install -m 755 debian/pybm $(DESTDIR)/usr/bin/$(APP) install -m 644 desktop/$(APP).desktop $(DEST_SHARE)/applications/$(APP).desktop install -m 644 src/images/can-icon-24px.png $(DEST_SHARE)/icons/hicolor/24x24/apps/$(APP).png -- 2.45.1 From 354c82d85b68ca155a5ae83b3f04b602e77505a4 Mon Sep 17 00:00:00 2001 From: Justus Ranvier Date: Tue, 4 Jun 2013 15:21:53 -0500 Subject: [PATCH 2/4] Ensure $(DESTDIR)/usr/bin exists --- Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/Makefile b/Makefile index 6485c2c9..d49f63fc 100755 --- a/Makefile +++ b/Makefile @@ -11,6 +11,7 @@ source: tar -cvzf ../$(APP)_$(VERSION).orig.tar.gz ../$(APP)-$(VERSION) --exclude-vcs install: + mkdir -m 755 -p $(DESTDIR)/usr/bin mkdir -m 755 -p $(DEST_APP) mkdir -m 755 -p $(DEST_SHARE)/applications mkdir -m 755 -p $(DEST_APP)/images -- 2.45.1 From 41792697b63dfd1de242ac04d691e1ea01708b12 Mon Sep 17 00:00:00 2001 From: Justus Ranvier Date: Tue, 4 Jun 2013 15:32:14 -0500 Subject: [PATCH 3/4] Add missing trailing semicolons to pybitmessage.desktop --- desktop/pybitmessage.desktop | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/desktop/pybitmessage.desktop b/desktop/pybitmessage.desktop index 363908dd..2b1b6902 100644 --- a/desktop/pybitmessage.desktop +++ b/desktop/pybitmessage.desktop @@ -7,12 +7,12 @@ Comment=Send encrypted messages to another person or to many subscribers Exec=pybitmessage %U Icon=pybitmessage Terminal=false -Categories=Network;Email;Application -Keywords=Email;E-mail;Newsgroup;Messaging +Categories=Network;Email;Application; +Keywords=Email;E-mail;Newsgroup;Messaging; X-MessagingMenu-UsesChatSection=true X-Ubuntu-Gettext-Domain=pybitmessage -Actions=Send;Subscribe;AddressBook +Actions=Send;Subscribe;AddressBook; [Desktop Action Send] Name=Send @@ -27,4 +27,4 @@ OnlyShowIn=Unity; [Desktop Action AddressBook] Name=Address Book Exec=pybitmessage -a -OnlyShowIn=Unity; \ No newline at end of file +OnlyShowIn=Unity; -- 2.45.1 From e25f08b9edb2e2b116e06eb564f9fa4da185014b Mon Sep 17 00:00:00 2001 From: Jonathan Warren Date: Fri, 7 Jun 2013 18:58:28 -0400 Subject: [PATCH 4/4] Correct ECDSA verify --- Makefile | 2 +- debian.sh | 2 +- src/bitmessagemain.py | 9 +++++---- src/shared.py | 2 +- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index e84d1bc4..5a8acd18 100755 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ APP=pybitmessage -VERSION=0.3.3 +VERSION=0.3.3-2 DEST_SHARE=$(DESTDIR)/usr/share DEST_APP=$(DEST_SHARE)/$(APP) diff --git a/debian.sh b/debian.sh index a26398e3..42817522 100755 --- a/debian.sh +++ b/debian.sh @@ -8,7 +8,7 @@ APP=pybitmessage PREV_VERSION=0.3.2 -VERSION=0.3.3 +VERSION=0.3.3-2 ARCH_TYPE=all #update version numbers automatically - so you don't have to diff --git a/src/bitmessagemain.py b/src/bitmessagemain.py index 4f612904..e618b4bd 100755 --- a/src/bitmessagemain.py +++ b/src/bitmessagemain.py @@ -1343,10 +1343,12 @@ class receiveDataThread(threading.Thread): readPosition += specifiedNonceTrialsPerByteLength specifiedPayloadLengthExtraBytes, specifiedPayloadLengthExtraBytesLength = decodeVarint(data[readPosition:readPosition+10]) readPosition += specifiedPayloadLengthExtraBytesLength + endOfSignedDataPosition = readPosition signatureLength, signatureLengthLength = decodeVarint(data[readPosition:readPosition+10]) - signature = data[readPosition:readPosition+signatureLengthLength] + readPosition += signatureLengthLength + signature = data[readPosition:readPosition+signatureLength] try: - if not highlevelcrypto.verify(data[8:readPosition],signature,publicSigningKey.encode('hex')): + if not highlevelcrypto.verify(data[8:endOfSignedDataPosition],signature,publicSigningKey.encode('hex')): print 'ECDSA verify failed (within processpubkey)' return print 'ECDSA verify passed (within processpubkey)' @@ -2918,8 +2920,7 @@ class singleWorker(threading.Thread): dataToEncrypt += '\x02' #message encoding type dataToEncrypt += encodeVarint(len('Subject:' + subject + '\n' + 'Body:' + body)) #Type 2 is simple UTF-8 message encoding. dataToEncrypt += 'Subject:' + subject + '\n' + 'Body:' + body - - signature = highlevelcrypto.sign(payload,privSigningKeyHex) + signature = highlevelcrypto.sign(dataToEncrypt,privSigningKeyHex) dataToEncrypt += encodeVarint(len(signature)) dataToEncrypt += signature privEncryptionKey = hashlib.sha512(encodeVarint(addressVersionNumber)+encodeVarint(streamNumber)+ripe).digest()[:32] diff --git a/src/shared.py b/src/shared.py index acc8b3a2..fbf48b01 100644 --- a/src/shared.py +++ b/src/shared.py @@ -1,4 +1,4 @@ -softwareVersion = '0.3.3' +softwareVersion = '0.3.3-2' import threading import sys -- 2.45.1