1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50
|
/*
SPDX-FileCopyrightText: 2009 Klaralvdalens Datakonsult AB, a KDAB Group company, info@kdab.net
SPDX-FileCopyrightText: 2009 Leo Franchi <lfranchi@kde.org>
SPDX-License-Identifier: LGPL-2.0-or-later
*/
#pragma once
#include <KMime/Headers>
#include <Libkleo/Enum>
#include <QByteArray>
namespace KMime
{
class Content;
}
namespace ComposerTestUtil
{
/**
* gate function to run verifySignature, verifyEncryption or verifySignatureAndEncryption.
*/
void verify(bool sign,
bool encrypt,
KMime::Content *content,
const QByteArray &origContent,
Kleo::CryptoMessageFormat f,
KMime::Headers::contentEncoding encoding);
/**
* Verifies that the given MIME content is signed and that the text is equal
*/
void verifySignature(KMime::Content *content, const QByteArray &signedContent, Kleo::CryptoMessageFormat f, KMime::Headers::contentEncoding encoding);
/**
* Verifies that the given MIME content is encrypted, and that the text is equal
*/
void verifyEncryption(KMime::Content *content, const QByteArray &encrContent, Kleo::CryptoMessageFormat f, bool withAttachment = false);
/**
* Verifies that the given MIME content is signed and then encrypted, and the original text is as specified
*/
void verifySignatureAndEncryption(KMime::Content *content,
const QByteArray &origContent,
Kleo::CryptoMessageFormat f,
bool withAttachment = false,
bool combined = false);
}
|