Skip to content

Commit 4b05f92

Browse files
metsmamrts
authored andcommitted
Show selected reader and connection protocol
Signed-off-by: Raul Metsma <[email protected]>
1 parent 834ed7f commit 4b05f92

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

tests/integration/test-authenticate.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ TEST(electronic_id_test, authenticate)
3636

3737
EXPECT_TRUE(cardInfo);
3838

39-
std::cout << "Selected card: " << cardInfo->name() << '\n';
39+
std::cout << "Selected card: " << cardInfo->name() << '\n'
40+
<< "Card reader: " << cardInfo->smartcard().readerName() << '\n'
41+
<< "Protocol: " << int(cardInfo->smartcard().protocol()) << '\n';
4042

4143
byte_vector cert = cardInfo->getCertificate(CertificateType::AUTHENTICATION);
4244

tests/integration/test-get-certificate.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ TEST(electronic_id_test, getCertificate)
3636

3737
EXPECT_TRUE(cardInfo);
3838

39-
std::cout << "Selected card: " << cardInfo->name() << '\n';
39+
std::cout << "Selected card: " << cardInfo->name() << '\n'
40+
<< "Card reader: " << cardInfo->smartcard().readerName() << '\n'
41+
<< "Protocol: " << int(cardInfo->smartcard().protocol()) << '\n';
4042

4143
auto certificate = cardInfo->getCertificate(CertificateType::AUTHENTICATION);
4244

tests/integration/test-signing.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,9 @@ static void signing(HashAlgorithm hashAlgo)
3737

3838
EXPECT_TRUE(cardInfo);
3939

40-
std::cout << "Selected card: " << cardInfo->name() << '\n';
40+
std::cout << "Selected card: " << cardInfo->name() << '\n'
41+
<< "Card reader: " << cardInfo->smartcard().readerName() << '\n'
42+
<< "Protocol: " << int(cardInfo->smartcard().protocol()) << '\n';
4143

4244
if (!cardInfo->isSupportedSigningHashAlgorithm(hashAlgo)) {
4345
std::string skip = "Card does not support hashing algorithm: " + std::string(hashAlgo);

0 commit comments

Comments
 (0)