Skip to content
Open
Show file tree
Hide file tree
Changes from 16 commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
9680baa
Changed CKey handle to shared pointer
Apr 9, 2024
21b7968
Implemented password-based decryption flow
May 9, 2024
8d127f1
Quick'n'dirty first version that actually encrypts and decrypts with …
May 13, 2024
907bf68
Fixes and cleanups for LT crypto
May 14, 2024
de64734
Cleanups
May 14, 2024
0ef8c50
Merge branch 'cdoc2' of github.com:lauris71/DigiDoc4-Client into cdoc2
May 16, 2024
c4f866d
removed encryptLT
May 16, 2024
3137c43
Merge commit 'ccb29a5f93c22ca36b06dea98e2ae2128bc7f445' into cdoc2
May 16, 2024
059a62d
Fixed include filename capitalization
May 16, 2024
f77decc
Fixed CKey struct/class confusion and made PasswordDialog Qt5 compatible
May 16, 2024
e747ed5
Some more fixes for ubuntu20
May 16, 2024
f3379d4
Fixed ambiguous overload
May 16, 2024
49c0fed
Use PBKDF from openssl instead of Qt
May 16, 2024
dde8a82
Removed EVP_KDF_HKDF_MODE_EXTRACT_AND_EXPAND, replaced with 2-step ex…
May 16, 2024
cda361d
Fixed indentation and CodeQL warnings
May 17, 2024
1347dfb
Reverted some indentation changes for clarity
May 17, 2024
c9ed433
Apply suggestions from code review
lauris71 Jun 3, 2024
5a0d798
Reverted more cdoc1/cdoc2 whitespace
Jun 7, 2024
cc1203e
More whitespace reverts
Jun 7, 2024
d79dc50
Apply suggestions from code review
lauris71 Jul 14, 2024
b1230a0
Update client/CDoc1.cpp
lauris71 Jul 14, 2024
f9c585a
Update client/Crypto.cpp
lauris71 Jul 15, 2024
3e9db88
Fixed some typos in review ;)
Jul 15, 2024
f7e918d
Merge branch 'master' into cdoc2
lauris71 Aug 10, 2024
deef68f
Merge branch 'master' into cdoc2
metsma Nov 11, 2024
f0e9c77
Fix whitespace issues and apply static code formating changes
metsma Nov 11, 2024
0840e09
Merge pull request #1 from metsma/cdoc2
lauris71 Nov 11, 2024
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