diff options
author | Rafael Roquetto <rafael.roquetto@kdab.com> | 2013-02-18 19:22:21 -0300 |
---|---|---|
committer | hjk <hjk121@nokiamail.com> | 2013-02-21 18:09:56 +0100 |
commit | 0a0debe3875589f734a089ab43894e73057d36fc (patch) | |
tree | ebf23f5f39cb69cb24e89b562fe3ff37c425210a /src/plugins/qnx/blackberrydebugtokenrequester.cpp | |
parent | 2be16feb5cd1b3455891ec20b76d19c3da098b1e (diff) | |
download | qt-creator-0a0debe3875589f734a089ab43894e73057d36fc.tar.gz |
Qnx: Simple BlackBerry debug token management.
This patch enables debug token creation and installation.
Change-Id: I85cbb8ddc413228662cd7967e1805196212a430c
Reviewed-by: Tobias Nätterlund <tobias.naetterlund@kdab.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qnx/blackberrydebugtokenrequester.cpp')
-rw-r--r-- | src/plugins/qnx/blackberrydebugtokenrequester.cpp | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/src/plugins/qnx/blackberrydebugtokenrequester.cpp b/src/plugins/qnx/blackberrydebugtokenrequester.cpp new file mode 100644 index 0000000000..b83cb37138 --- /dev/null +++ b/src/plugins/qnx/blackberrydebugtokenrequester.cpp @@ -0,0 +1,75 @@ +/************************************************************************** +** +** Copyright (C) 2011 - 2013 Research In Motion +** +** Contact: Research In Motion (blackberry-qt@qnx.com) +** Contact: KDAB (info@kdab.com) +** +** This file is part of Qt Creator. +** +** Commercial License Usage +** Licensees holding valid commercial Qt licenses may use this file in +** accordance with the commercial license agreement provided with the +** Software or, alternatively, in accordance with the terms contained in +** a written agreement between you and Digia. For licensing terms and +** conditions see http://qt.digia.com/licensing. For further information +** use the contact form at http://qt.digia.com/contact-us. +** +** GNU Lesser General Public License Usage +** Alternatively, this file may be used under the terms of the GNU Lesser +** General Public License version 2.1 as published by the Free Software +** Foundation and appearing in the file LICENSE.LGPL included in the +** packaging of this file. Please review the following information to +** ensure the GNU Lesser General Public License version 2.1 requirements +** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html. +** +** In addition, as a special exception, Digia gives you certain additional +** rights. These rights are described in the Digia Qt LGPL Exception +** version 1.1, included in the file LGPL_EXCEPTION.txt in this package. +** +****************************************************************************/ + +#include "blackberrydebugtokenrequester.h" + +namespace { +static const char PROCESS_NAME[] = "blackberry-debugtokenrequest"; +static const char ERR_WRONG_CSK_PASS[] = "The signature on the code signing request didn't verify."; +static const char ERR_WRONG_KEYSTORE_PASS[] = "Failed to decrypt keystore, invalid password"; +static const char ERR_ILLEGAL_DEVICE_PIN[] = "Illegal device PIN"; +static const char ERR_NETWORK_UNREACHABLE[] = "Network is unreachable"; +} + +namespace Qnx { +namespace Internal { + +BlackBerryDebugTokenRequester::BlackBerryDebugTokenRequester(QObject *parent) : + BlackBerryNdkProcess(QLatin1String(PROCESS_NAME), parent) +{ + addErrorStringMapping(QLatin1String(ERR_WRONG_CSK_PASS), WrongCskPassword); + addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS), WrongKeystorePassword); + addErrorStringMapping(QLatin1String(ERR_WRONG_KEYSTORE_PASS), WrongKeystorePassword); + addErrorStringMapping(QLatin1String(ERR_NETWORK_UNREACHABLE), NetworkUnreachable); +} + +void BlackBerryDebugTokenRequester::requestDebugToken(const QString &path, + const QString &cskPassword, const QString &keyStore, + const QString &keyStorePassword, const QString &devicePin) +{ + QStringList arguments; + + arguments << QLatin1String("-keystore") + << keyStore + << QLatin1String("-storepass") + << keyStorePassword + << QLatin1String("-cskpass") + << cskPassword + << QLatin1String("-devicepin") + << devicePin + << path; + + start(arguments); + +} + +} // namespace Internal +} // namespace Qnx |