From 7be9708123e21df89e36e16a521e506c37393f6c Mon Sep 17 00:00:00 2001 From: Raul Metsma Date: Wed, 6 Nov 2024 11:12:13 +0200 Subject: [PATCH] Set User-Agent for signing IB-8023 Signed-off-by: Raul Metsma --- client/DigiDoc.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/client/DigiDoc.cpp b/client/DigiDoc.cpp index bf5f00fb7..bbc67717a 100644 --- a/client/DigiDoc.cpp +++ b/client/DigiDoc.cpp @@ -21,6 +21,7 @@ #include "Application.h" #include "CheckConnection.h" +#include "QPCSC.h" #include "QSigner.h" #include "SslCertificate.h" #include "TokenData.h" @@ -367,7 +368,7 @@ bool SDocumentModel::removeRow(int row) try { - doc->b->removeDataFile(row); + doc->b->removeDataFile(unsigned(row)); doc->modified = true; emit removed(row); return true; @@ -688,6 +689,11 @@ bool DigiDoc::sign(const QString &city, const QString &state, const QString &zip roles.push_back(to(role)); signer->setSignerRoles(roles); signer->setProfile("time-stamp"); + signer->setUserAgent(QStringLiteral("%1/%2 (%3) Devices: %4").arg( + QCoreApplication::applicationName(), + QCoreApplication::applicationVersion(), + Common::applicationOs(), + QPCSC::instance().drivers().join(',')).toUtf8().constData()); qApp->waitForTSL( fileName() ); digidoc::Signature *s = b->sign(signer); return modified = waitFor([&] {