Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long-term crypto support #1264

Open
wants to merge 24 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
272 changes: 160 additions & 112 deletions client/CDoc1.cpp

Large diffs are not rendered by default.

12 changes: 9 additions & 3 deletions client/CDoc1.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,20 @@ class CDoc1 final: public CDoc, private QFile
{
public:
CDoc1() = default;
CDoc1(const QString &path);
CKey canDecrypt(const QSslCertificate &cert) const final;

static bool isCDoc1File(const QString& path);

CKey::DecryptionStatus canDecrypt(const QSslCertificate &cert) const final;
std::shared_ptr<CKey> getDecryptionKey(const QSslCertificate &cert) const final;
bool decryptPayload(const QByteArray &key) final;
bool save(const QString &path) final;
QByteArray transportKey(const CKey &key) final;
QByteArray getFMK(const CKey &key, const QByteArray& secret) final;
int version() final;

static std::unique_ptr<CDoc1> load(const QString& path);
private:
CDoc1(const QString &path);

void writeDDoc(QIODevice *ddoc);

static QByteArray fromBase64(QStringView data);
Expand Down
Loading
Loading