Skip to content

Commit

Permalink
Skip a few Passkeys tests with Botan <= 2.14 (#10360)
Browse files Browse the repository at this point in the history
Botan version less than 2.14.0 miscalculates ECDSA signatures. 

---------

Co-authored-by: Jonathan White <[email protected]>
  • Loading branch information
Sami Vänttinen and droidmonkey committed Mar 9, 2024
1 parent 267b33e commit 3c67600
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
6 changes: 6 additions & 0 deletions tests/TestPasskeys.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ void TestPasskeys::testDecodeResponseData()

void TestPasskeys::testLoadingECPrivateKeyFromPem()
{
#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(2, 14, 0)
QSKIP("ECDSA Signature is broken on Botan < 2.14.0");
#endif
const auto publicKeyCredentialRequestOptions =
browserMessageBuilder()->getJsonObject(PublicKeyCredentialRequestOptions.toUtf8());
const auto privateKeyPem = QString("-----BEGIN PRIVATE KEY-----"
Expand Down Expand Up @@ -412,6 +415,9 @@ void TestPasskeys::testRegister()

void TestPasskeys::testGet()
{
#if BOTAN_VERSION_CODE < BOTAN_VERSION_CODE_FOR(2, 14, 0)
QSKIP("ECDSA Signature is broken on Botan < 2.14.0");
#endif
const auto privateKeyPem = QString("-----BEGIN PRIVATE KEY-----"
"MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQg5DX2R6I37nMSZqCp"
"XfHlE3UeitkGGE03FqGsdfxIBoOhRANCAAQG7K80W2KRYW0ZWQOmUCrKMcSVqGnl"
Expand Down
4 changes: 2 additions & 2 deletions tests/TestPasskeys.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@
#ifndef KEEPASSXC_TESTPASSKEYS_H
#define KEEPASSXC_TESTPASSKEYS_H

#include <QObject>

#include "browser/BrowserPasskeys.h"
#include <QObject>
#include <botan/version.h>

class TestPasskeys : public QObject
{
Expand Down

0 comments on commit 3c67600

Please sign in to comment.