mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Another attempt to make GCC happy
This commit is contained in:
parent
51d63f0e83
commit
2bfe66e840
@ -80,7 +80,7 @@ QPair<Trust, KeeShareSettings::Certificate> check(QByteArray& data,
|
|||||||
certificate = sign.certificate;
|
certificate = sign.certificate;
|
||||||
auto key = sign.certificate.sshKey();
|
auto key = sign.certificate.sshKey();
|
||||||
key.openKey(QString());
|
key.openKey(QString());
|
||||||
const auto signer = Signature{};
|
const auto signer = Signature();
|
||||||
if (!signer.verify(data, sign.signature, key)) {
|
if (!signer.verify(data, sign.signature, key)) {
|
||||||
qCritical("Invalid signature for sharing container %s.", qPrintable(reference.path));
|
qCritical("Invalid signature for sharing container %s.", qPrintable(reference.path));
|
||||||
return {Invalid, KeeShareSettings::Certificate()};
|
return {Invalid, KeeShareSettings::Certificate()};
|
||||||
@ -429,7 +429,7 @@ ShareObserver::Result ShareObserver::importInsecureContainerInto(const KeeShareS
|
|||||||
|
|
||||||
auto foreign = KeeShare::foreign();
|
auto foreign = KeeShare::foreign();
|
||||||
const auto own = KeeShare::own();
|
const auto own = KeeShare::own();
|
||||||
const auto sign = KeeShareSettings::Sign{}; // invalid sign
|
const auto sign = KeeShareSettings::Sign(); // invalid sign
|
||||||
auto trust = check(payload, reference, own.certificate, foreign.certificates, sign);
|
auto trust = check(payload, reference, own.certificate, foreign.certificates, sign);
|
||||||
switch(trust.first) {
|
switch(trust.first) {
|
||||||
case UntrustedForever:
|
case UntrustedForever:
|
||||||
|
@ -108,32 +108,32 @@ void TestSharing::testNullObjects()
|
|||||||
const QString empty;
|
const QString empty;
|
||||||
QXmlStreamReader reader(empty);
|
QXmlStreamReader reader(empty);
|
||||||
|
|
||||||
const auto nullKey = KeeShareSettings::Key{};
|
const auto nullKey = KeeShareSettings::Key();
|
||||||
QVERIFY(nullKey.isNull());
|
QVERIFY(nullKey.isNull());
|
||||||
const auto xmlKey = KeeShareSettings::Key::deserialize(reader);
|
const auto xmlKey = KeeShareSettings::Key::deserialize(reader);
|
||||||
QVERIFY(xmlKey.isNull());
|
QVERIFY(xmlKey.isNull());
|
||||||
|
|
||||||
const auto certificate = KeeShareSettings::Certificate{};
|
const auto certificate = KeeShareSettings::Certificate();
|
||||||
QVERIFY(certificate.isNull());
|
QVERIFY(certificate.isNull());
|
||||||
const auto xmlCertificate = KeeShareSettings::Certificate::deserialize(reader);
|
const auto xmlCertificate = KeeShareSettings::Certificate::deserialize(reader);
|
||||||
QVERIFY(xmlCertificate.isNull());
|
QVERIFY(xmlCertificate.isNull());
|
||||||
|
|
||||||
const auto own = KeeShareSettings::Own{};
|
const auto own = KeeShareSettings::Own();
|
||||||
QVERIFY(own.isNull());
|
QVERIFY(own.isNull());
|
||||||
const auto xmlOwn = KeeShareSettings::Own::deserialize(empty);
|
const auto xmlOwn = KeeShareSettings::Own::deserialize(empty);
|
||||||
QVERIFY(xmlOwn.isNull());
|
QVERIFY(xmlOwn.isNull());
|
||||||
|
|
||||||
const auto active = KeeShareSettings::Active{};
|
const auto active = KeeShareSettings::Active();
|
||||||
QVERIFY(active.isNull());
|
QVERIFY(active.isNull());
|
||||||
const auto xmlActive = KeeShareSettings::Active::deserialize(empty);
|
const auto xmlActive = KeeShareSettings::Active::deserialize(empty);
|
||||||
QVERIFY(xmlActive.isNull());
|
QVERIFY(xmlActive.isNull());
|
||||||
|
|
||||||
const auto foreign = KeeShareSettings::Foreign{};
|
const auto foreign = KeeShareSettings::Foreign();
|
||||||
QVERIFY(foreign.certificates.isEmpty());
|
QVERIFY(foreign.certificates.isEmpty());
|
||||||
const auto xmlForeign = KeeShareSettings::Foreign::deserialize(empty);
|
const auto xmlForeign = KeeShareSettings::Foreign::deserialize(empty);
|
||||||
QVERIFY(xmlForeign.certificates.isEmpty());
|
QVERIFY(xmlForeign.certificates.isEmpty());
|
||||||
|
|
||||||
const auto reference = KeeShareSettings::Reference{};
|
const auto reference = KeeShareSettings::Reference();
|
||||||
QVERIFY(reference.isNull());
|
QVERIFY(reference.isNull());
|
||||||
const auto xmlReference = KeeShareSettings::Reference::deserialize(empty);
|
const auto xmlReference = KeeShareSettings::Reference::deserialize(empty);
|
||||||
QVERIFY(xmlReference.isNull());
|
QVERIFY(xmlReference.isNull());
|
||||||
|
Loading…
Reference in New Issue
Block a user