Commit dfeb049e authored by Ragnar Thomsen's avatar Ragnar Thomsen
Browse files

clizip: Detect correct encryption method for AES-encrypted zips

Compression method is always set to 099 for AES-encrypted zip archives
(WinZip style). Clizip outputs this as u099. Hence we should emit
encryptionMethodFound when finding this compression method. In this case
we set the compression method to unknown.

Differential Revision: D3351
parent 61d9f872
......@@ -26,6 +26,7 @@
#include "kerfuffle/cliinterface.h"
#include "kerfuffle/kerfuffle_export.h"
#include <KLocalizedString>
#include <KPluginFactory>
#include <QDateTime>
......@@ -292,6 +293,9 @@ QString CliPlugin::convertCompressionMethod(const QString &method)
return QStringLiteral("Deflate");
} else if (method == QLatin1String("bzp2")) {
return QStringLiteral("BZip2");
} else if (method == QLatin1String("u099")) {
emit encryptionMethodFound(QStringLiteral("AES"));
return i18nc("referred to compression method", "unknown");
}
return method;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment