From 41539458d2d114cb714b72315c482e33340a9ee3 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Wed, 11 Aug 2010 05:22:07 +0300 Subject: modified: init.cpp modified: main.cpp modified: messages.cpp modified: new_gpg.rc modified: options.cpp modified: resource.h modified: utilities.cpp --- messages.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'messages.cpp') diff --git a/messages.cpp b/messages.cpp index ab492d1..38205cb 100644 --- a/messages.cpp +++ b/messages.cpp @@ -29,6 +29,17 @@ int RecvMsgSvc(WPARAM w, LPARAM l) return CallService(MS_PROTO_CHAINRECV, w, l); bool unicode = (bool)(pre->flags&PREF_UNICODE); + { //check for public key + string str = msg; + string::size_type s1, s2; + if(((s2 = str.find("-----END PGP PUBLIC KEY BLOCK-----")) != string::npos) && ((s1 = str.find("-----BEGIN PGP PUBLIC KEY BLOCK-----")) != string::npos)) + { //this is public key + } + else if(((s2 = str.find("-/ENCRYPTED-")) != string::npos) && ((s1 = str.find("-ENCRYPTED-")) != string::npos)) + { //this is encrypted data block + } + } + return CallService(MS_PROTO_CHAINRECV, w, l); } -- cgit v1.2.3