mirror of
https://github.com/QuasarApp/qca.git
synced 2025-05-11 18:29:33 +00:00
update prompting behavior as per discussion
svn path=/trunk/kdesupport/qca/; revision=650970
This commit is contained in:
parent
43d37443e7
commit
5769c10ef2
@ -154,6 +154,9 @@ private slots:
|
||||
}
|
||||
};
|
||||
|
||||
// TODO: support auto-discovering token during token request event
|
||||
// TODO: add a special watching mode to qcatool to monitor keystore activity?
|
||||
|
||||
class PassphrasePrompt : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
@ -221,7 +224,7 @@ private slots:
|
||||
QString str;
|
||||
if(e.source() == QCA::Event::KeyStore)
|
||||
{
|
||||
QString name = "keystore";
|
||||
QString name;
|
||||
QCA::KeyStoreEntry entry(e.keyStoreEntryId());
|
||||
if(!entry.isNull())
|
||||
{
|
||||
@ -231,8 +234,13 @@ private slots:
|
||||
{
|
||||
QCA::KeyStoreManager ksm;
|
||||
QCA::KeyStore store(e.keyStoreId(), &ksm);
|
||||
if(store.isValid())
|
||||
name = store.name();
|
||||
if(!store.isValid())
|
||||
{
|
||||
fprintf(stderr, "Error: received password request from unknown keystore.\n");
|
||||
handler.reject(id);
|
||||
return;
|
||||
}
|
||||
name = store.name();
|
||||
}
|
||||
str = QString("Enter %1 for %2").arg(type).arg(name);
|
||||
}
|
||||
@ -254,8 +262,13 @@ private slots:
|
||||
{
|
||||
QCA::KeyStoreManager ksm;
|
||||
QCA::KeyStore store(e.keyStoreId(), &ksm);
|
||||
if(store.isValid())
|
||||
name = store.name();
|
||||
if(!store.isValid())
|
||||
{
|
||||
fprintf(stderr, "Error: received token request from unknown keystore.\n");
|
||||
handler.reject(id);
|
||||
return;
|
||||
}
|
||||
name = store.name();
|
||||
}
|
||||
printf("Please insert %s and press Enter ...\n", qPrintable(name));
|
||||
QCA::ConsolePrompt::waitForEnter();
|
||||
|
Loading…
x
Reference in New Issue
Block a user