summaryrefslogtreecommitdiff
path: root/messages.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'messages.cpp')
-rw-r--r--messages.cpp11
1 files changed, 11 insertions, 0 deletions
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);
}