aboutsummaryrefslogtreecommitdiffstats
path: root/gpgwin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gpgwin.cpp')
-rw-r--r--gpgwin.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/gpgwin.cpp b/gpgwin.cpp
index 74fdadf..843c61f 100644
--- a/gpgwin.cpp
+++ b/gpgwin.cpp
@@ -708,6 +708,16 @@ void GpgWin::sign()
cursor.endEditBlock();
}
}
+bool GpgWin::isCompletedlySigned(const QByteArray &text) {
+
+ if (text.startsWith("-----BEGIN PGP SIGNED MESSAGE-----") && text.endsWith("-----END PGP SIGNATURE-----")) {
+ qDebug() << "totally signed";
+ return true;
+ } else {
+ qDebug("partially signed");
+ return false;
+ }
+}
void GpgWin::verify()
{
@@ -715,6 +725,8 @@ void GpgWin::verify()
QByteArray text = edit->curTextPage()->toPlainText().toAscii(); // TODO: toUtf8() here?
preventNoDataErr(&text);
+ isCompletedlySigned(text);
+
gpgme_signature_t sign = mCtx->verify(text);
if (sign == NULL) {