diff options
| author | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-08-30 13:34:02 +0000 |
|---|---|---|
| committer | me_desk <me_desk@fb96df88-216d-11de-830c-f3023f12d8ac> | 2013-08-30 13:34:02 +0000 |
| commit | 0ef7c1d7471ce20fe54729c27858db864aedee91 (patch) | |
| tree | 3a71b713febdbea19fc7358af68d9f6cfa3c3158 /pica-client/askpassword.cpp | |
| parent | bfd5528f28264772a245dc29f41d4bb5d29fb1eb (diff) | |
| download | pica-pica-0ef7c1d7471ce20fe54729c27858db864aedee91.tar.gz pica-pica-0ef7c1d7471ce20fe54729c27858db864aedee91.zip | |
updated pica-client to make it handle new id format. quint32 type for id is replaced with QByteArray in most places. Implemented verification callbacks in client and node that allow self-signed certificates
git-svn-id: svn://localhost/project_picapica/trunk@266 fb96df88-216d-11de-830c-f3023f12d8ac
Diffstat (limited to 'pica-client/askpassword.cpp')
| -rw-r--r-- | pica-client/askpassword.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pica-client/askpassword.cpp b/pica-client/askpassword.cpp index 0629502..05c0c83 100644 --- a/pica-client/askpassword.cpp +++ b/pica-client/askpassword.cpp @@ -4,7 +4,7 @@ #include <QInputDialog> QMutex AskPassword::passwd_mutex; -QMap<quint32,QString> AskPassword::idpasswd; +QMap<QByteArray,QString> AskPassword::idpasswd; AskPassword::AskPassword(QObject *parent) : QObject(parent) @@ -15,7 +15,7 @@ AskPassword::AskPassword(QObject *parent) : int AskPassword::ask_password_cb(char *buf, int size, int rwflag, void *userdata) { QString pswd; - quint32 id = *((quint32*)userdata); + QByteArray id = QByteArray((const char*) userdata, PICA_ID_SIZE); passwd_mutex.lock(); @@ -44,9 +44,9 @@ void AskPassword::password_dialog() { bool ok; QString title = QObject::tr("Enter private key passphrase"); - QString text = QObject::tr(QString("Passphrase for (%1)").arg(account_id).toUtf8().constData()); + QString text = QObject::tr(QString("Passphrase for (%1)").arg(QByteArray((const char*)account_id, PICA_ID_SIZE).toBase64().constData()).toUtf8().constData()); QString psw = QInputDialog::getText((QWidget*)mainwindow,title,text,QLineEdit::Password,QString(),&ok); if (ok) - idpasswd[account_id] = psw; + idpasswd[QByteArray((const char*)account_id, PICA_ID_SIZE)] = psw; } |
