Skip to content

Commit

Permalink
Set User-Agent for signing
Browse files Browse the repository at this point in the history
IB-8023

Signed-off-by: Raul Metsma <raul@metsma.ee>
  • Loading branch information
metsma committed Nov 18, 2024
1 parent 3c55a63 commit 7be9708
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion client/DigiDoc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

#include "Application.h"
#include "CheckConnection.h"
#include "QPCSC.h"
#include "QSigner.h"
#include "SslCertificate.h"
#include "TokenData.h"
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -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([&] {
Expand Down

0 comments on commit 7be9708

Please sign in to comment.