Hello community, here is the log from the commit of package qt-creator.1282 for openSUSE:12.3:Update checked in at 2013-01-31 16:07:53 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:12.3:Update/qt-creator.1282 (Old) and /work/SRC/openSUSE:12.3:Update/.qt-creator.1282.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt-creator.1282", Maintainer is "" Changes: -------- New Changes file: --- /dev/null 2013-01-09 19:40:42.352580873 +0100 +++ /work/SRC/openSUSE:12.3:Update/.qt-creator.1282.new/qt-creator.changes 2013-01-31 16:07:57.000000000 +0100 @@ -0,0 +1,1035 @@ +------------------------------------------------------------------- +Thu Dec 20 15:55:38 UTC 2012 - [email protected] + +- Update to 2.6.1 bugfix release + See http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.6/dist/changes-2.6.1 + for the complete changelog + +------------------------------------------------------------------- +Thu Nov 8 16:20:23 UTC 2012 - [email protected] + +- Update to 2.6.0 (final) + * Added experimental support for Android (enable the plugin in Help > About Plugins) + * Introduced "Kits" that supersede the previous "Targets". They bundle + the settings for the target device, compiler, debugger, Qt version and + more into a user definable, reusable setting. + * Added highlighting of missing files in the resource editor + * Fixed that several settings where saved every few seconds even without changes + * Worked around a problem in the KDE file dialog that prevented selecting qmake + See http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.6/dist/changes-2.6.0 + for the complete changelog + +------------------------------------------------------------------- +Sun Nov 4 11:11:38 UTC 2012 - [email protected] + +- Update to 2.6.0-rc + See http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.6/dist/changes-2.6.0 + for the complete changelog +- Add revert-6f7ce3f4.diff This upstream commit fixes a macos misbehaviour + but breaks the build when building qt-creator with a system botan +- License update: SUSE-LGPL-2.1-with-digia-exception-1.1 + +------------------------------------------------------------------- +Tue Sep 25 08:02:00 UTC 2012 - [email protected] + +- license update: SUSE-LGPL-2.1-with-nokia-exception-1.1 + Choose the LGPL-2.1 variant of the dual license choice (the other option + is a commercial license) + +------------------------------------------------------------------- +Fri Sep 21 13:08:55 UTC 2012 - [email protected] + +- Update to 2.6.0-beta + See http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.6/dist/changes-2.6.0 + for the complete changelog +- a botan copy is now in KDE:Qt, use system-botan-lib.diff unconditionally + +------------------------------------------------------------------- +Mon Sep 17 19:04:35 UTC 2012 - [email protected] + +- rpm has no %elseif + +------------------------------------------------------------------- +Wed Jul 25 13:13:31 UTC 2012 - [email protected] + +- Update to 2.5.1 + See https://qt.gitorious.org/qt-creator/qt-creator/blobs/v2.5.1/dist/changes-2.5.1 + for the complete changelog + +------------------------------------------------------------------- +Sun May 13 17:12:11 UTC 2012 - [email protected] + +- Update to 2.5.0 + See http://qt.gitorious.org/qt-creator/qt-creator/blobs/2.5/dist/changes-2.5.0 + for the complete changelog + +- Spec cleanup + +------------------------------------------------------------------- +Sat Mar 24 18:02:35 UTC 2012 - [email protected] + +- Add qt-creator-gcc47.patch: Fix build with gcc 4.7. + +------------------------------------------------------------------- +Wed Feb 1 12:51:42 UTC 2012 - [email protected] + +- Update to 2.4.1 + + Managing Projects + * Fix a crash on closing a project while a parse is in progress (QTCREATORBUG-6677) + + QML/JS Support + * Search qmlplugindump (4.8) in right location (QTCREATORBUG-6698) + + Help + * Fix loading of files from documentation (QTSDK-1129) + +- Install the licenses files. + + ------------------------------------------------------------------- +Tue Dec 13 15:42:43 UTC 2011 - [email protected] + +- Update to 2.4.0 + +General + * Improve the error message that appears when plugin errors occur + * Decrease the minimum size of the Options dialog + +Editing + * Advanced search: Show more information about the search parameters + * Advanced search: Move the previously modal dialog into the search results pane + * Advanced search: Keep a history of the most recent searches and their results + * Implement code style schemas for reuse in different projects + +Managing Projects + * Support the sharing of project settings + * Add new project wizards for non-Qt C and C++ applications + +Debugging + * Add initial Qt 5 support in dumpers + * Make vtables visible + * Improve remote debugging + * Improve register handling (partial updates, input in hex, ARM Neon support) + * Remove inferior calls in QDate, QTime, QDateTime dumpers + * Fix QTextCodec dumpers + * Globally enable pretty printing for references + * Improve handling of unprintable data in Locals and Expressions + * Add 'Local8Bit' as a display option for char arrays and pointers + +Debugging QML/JS + * Add the option to attach to a running application + * Lots of bug fixes especially for debugging in combination with C++ + * Add initial support for debugging JS in Qt 5 (v8 engine) + +Analyzing Code + * Retrieve and store QML tracing data by using the standalone qmlprofiler + command line tool + * Store and load traces in a file + * Add the option to attach to a running application + +C++ Support + * Add the refactoring action to synchronize function declarations and definitions + * Make 'insert definition from declaration' use minimally qualified names + and find a good insertion location next to surrounding declarations + * Fix completion for typedefs for templates in namespaces + * Use minimally qualified names in function signature completion + * Use minimally qualified names in 'insert local declaration' refactoring action + * Prefer files in the same directory when switching between the header and source + * Fix the problem with encoding and quick fixes (QTCREATORBUG-6140) + * Fix the preservation of indentation level in comments with tabs (QTCREATORBUG-6151) + * Improve performance for files with a huge number of literals + +QML/JS Support + * Add 'Rename usages' functionality (QTCREATORBUG-3669) + * Add collection of static analysis messages with Ctrl-Shift-C + * Add semantic highlighting + * Significantly improve scanning of C++ documents for qmlRegisterType and + setContextProperty calls (QTCREATORBUG-3199) + * Add a warning about inappropriate use of constructor functions + * Add a warning about unreachable code + * Add support for .import directive in js files + * Add completion for XMLHttpRequest, DB API and JSON. + * Add the 'length' property to functions + * Use mime types to distinguish qml and js files + * Show the function argument hint for signals + * When completing enums, add qualified names instead of strings + * Honor typeinfo lines in qmldir files + * Make string literals that contain file names into links (QTCREATORBUG-5701) + * Add a warning about invalid types in 'property' declarations (QTCREATORBUG-3666) + * Fix the highlighting of property types (QTCREATORBUG-6127) + * Fix the 'follow symbol' functionality for local variables (QTCREATORBUG-6094) + * Fix function argument hints on variables (QTCREATORBUG-5752) + * Fix the completion for enums in a different scope + * Fix typing a slash (/) triggering a global completion + * Fix handling of meta object revision in C++ QML plugins + * Fix indentation of block property initializers + * Fix indentation of labelled statements + * Fix scope for completion in code bindings + * Allow for different builtin type information per Qt version + * Update builtin type information and parser for Qt 5 + * Use qmlscene for previewing files in Qt 5 + +Qt Quick Designer + * Add breadcrumb navigation for components + * Add layout functionality to context menu + +Remote Linux Support + * Move Maemo and MeeGo support into its own plugin + * Assume less about the target systems, for example, in respect to the + presence of POSIX-conforming tools. + +FakeVim + * Add basic command editing in Ex mode + * Mention 'comma escape' in the documentation + * Fix foreground color for search hits in the Dark scheme + * Fix toggling visual mode with 'v' + +Version control plugins + * SVN: Support for SVN version 1.7 + * Git: Add an option to toggle decoration settings for log and show commands + + +------------------------------------------------------------------- +Sun Nov 20 10:37:12 UTC 2011 - [email protected] + +- update to 2.4.0 RC + +General ++++ 838 more lines (skipped) ++++ between /dev/null ++++ and /work/SRC/openSUSE:12.3:Update/.qt-creator.1282.new/qt-creator.changes New: ---- hardcoded-runpath.diff qt-creator-2.6.1-src.tar.gz qt-creator.changes qt-creator.spec qtcreator.desktop revert-6f7ce3f4.diff system-botan-lib.diff ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt-creator.spec ++++++ # # spec file for package qt-creator # # Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed # upon. The license for this file, and modifications and additions to the # file, is the same license as for the pristine package itself (unless the # license for the pristine package is not an Open Source License, in which # case the license is the MIT License). An "Open Source License" is a # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. # Please submit bugfixes or comments via http://bugs.opensuse.org/ # Name: qt-creator Version: 2.6.1 Release: 0 Summary: Lightweight IDE License: SUSE-LGPL-2.1-with-digia-exception-1.1 Group: Development/Tools/IDE Url: http://www.qtsoftware.com/developer/qt-creator/ %define rversion 2.6.1 Source: http://releases.qt-project.org/qtcreator/%{rversion}/%{name}-%{rversion}-src.tar.gz Source1: qtcreator.desktop Patch1: system-botan-lib.diff Patch2: hardcoded-runpath.diff Patch3: revert-6f7ce3f4.diff BuildRoot: %{_tmppath}/%{name}-%{version}-build # depends on private headers and therefore needs the exact Qt version %requires_eq libqt4-x11 ######################################################################################### # SuSE, openSUSE ######################################################################################### %if 0%{?suse_version} BuildRequires: fdupes BuildRequires: libQtWebKit-devel BuildRequires: libbotan-devel >= 1.10.2 BuildRequires: libqt4-devel >= 4.7.4 BuildRequires: libqt4-private-headers-devel BuildRequires: update-desktop-files Recommends: libQtWebKit-devel Recommends: libqt4-debuginfo Recommends: libqt4-devel-doc %endif ######################################################################################### # Fedora, RHEL or CentOS ######################################################################################### %if 0%{?fedora_version} || 0%{?rhel_version} || 0%{?centos_version} BuildRequires: desktop-file-utils BuildRequires: qt4-devel >= 4.7.4 %endif Provides: %{name}-devel = %{version} %description Qt Creator is a new, lightweight, cross-platform integrated development environment (IDE) designed to make development with the Qt application framework even faster and easier. %prep %setup -q -n %{name}-%rversion-src %if 0%{?suse_version} %patch1 -p1 %endif %patch2 %patch3 -p1 -R %build %if "%{_lib}"=="lib64" qmake IDE_LIBRARY_BASENAME=lib64 %else qmake %endif make %{?_smp_mflags} make %{?_smp_mflags} docs %if 0 cd share/qtcreator/gdbmacros qmake make %endif %install export QTDIR=/usr/share/qt4 # its qmake. of course it is broken make INSTALL_ROOT=%{buildroot}/%{_prefix} install install -m 755 bin/qtcreator %{buildroot}%{_bindir} install -m 755 bin/qmlpuppet %{buildroot}%{_bindir} # copy doc to its (correct) destination: install -d -m 755 %{buildroot}%{_docdir}/libqt4/qch/ cp share/doc/qtcreator/qtcreator.qch %{buildroot}%{_docdir}/libqt4/qch/ rm -rfv %{buildroot}%{_datadir}/doc/qtcreator %if 0%{?suse_version} %suse_update_desktop_file -i qtcreator Development Qt IDE %else %if 0%{?fedora_version} desktop-file-install --dir=%{buildroot}%{_datadir}/applications/ --add-category Development --add-category Qt --add-category IDE qtcreator.desktop %endif %endif %fdupes %{buildroot} %if 0 cd share/qtcreator/gdbmacros make INSTALL_ROOT=%{buildroot}/%{_prefix} install %endif %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files %defattr(-,root,root) %doc LICENSE.LGPL LGPL_EXCEPTION.TXT README %dir %{_datadir}/icons/hicolor %dir %{_datadir}/icons/hicolor/* %dir %{_datadir}/icons/hicolor/*/apps %dir %{_docdir}/libqt4/qch %doc %{_docdir}/libqt4/qch/qtcreator.qch %{_bindir}/qmlpuppet %{_bindir}/qtcreator %{_bindir}/qtcreator_process_stub %{_bindir}/qtpromaker %{_bindir}/sdktool %{_datadir}/applications/qtcreator.desktop %{_datadir}/icons/hicolor/*/apps/QtProject-qtcreator.png %{_datadir}/qtcreator/ %{_libdir}/qtcreator/ %changelog ++++++ hardcoded-runpath.diff ++++++ --- src/qtcreatorplugin.pri.old 2012-10-23 12:37:09.532924177 +0200 +++ src/qtcreatorplugin.pri 2012-10-23 12:37:19.843798022 +0200 @@ -91,13 +91,7 @@ QMAKE_LFLAGS += -Wl,-rpath,@loader_path/../../,-rpath,@executable_path/../ } } else:linux-* { - #do the rpath by hand since it's not possible to use ORIGIN in QMAKE_RPATHDIR - QMAKE_RPATHDIR += \$\$ORIGIN - QMAKE_RPATHDIR += \$\$ORIGIN/.. - QMAKE_RPATHDIR += \$\$ORIGIN/../.. - IDE_PLUGIN_RPATH = $$join(QMAKE_RPATHDIR, ":") - QMAKE_LFLAGS += -Wl,-z,origin \'-Wl,-rpath,$${IDE_PLUGIN_RPATH}\' - QMAKE_RPATHDIR = + QMAKE_RPATHDIR += /usr/$$IDE_LIBRARY_BASENAME/qtcreator } # put .pro file directory in INCLUDEPATH ++++++ qtcreator.desktop ++++++ [Desktop Entry] Type=Application Exec=qtcreator %F Name=Qt Creator GenericName=C++ IDE for developing Qt applications X-KDE-StartupNotify=true Icon=QtProject-qtcreator Terminal=false Categories=Qt;Development;IDE; MimeType=text/x-c++src;text/x-c++hdr;text/x-xsrc;application/x-designer;application/vnd.nokia.qt.qmakeprofile;application/vnd.nokia.xml.qt.resource; InitialPreference=9 ++++++ revert-6f7ce3f4.diff ++++++ commit 6f7ce3f48e2ac4ebe5e04492b11d3a70bed37fb2 Author: Christian Kandeler <[email protected]> Date: Fri Sep 28 15:54:10 2012 +0200 SSH: Work around issue with dynamic_cast. It has been observed that on MacOs, a dynamic_cast from Botan::Public_Key to Botan::RSA_PublicKey reproducibly fails even though it should definitely succeed. This happens with both gcc and clang on different Macs, but on no other platform. The problem could not be reproduced with an example project. The workaround is to move the allocation of the respective object from the client side to the Botan library itself. In addition, the following actions were taken to guard against similar problems in the future: - Also move to Botan the allocations of all other objects that are potentially dynamically cast. - Use shared pointers for these objects, so the deallocation also happens inside Botan. Change-Id: Ie595a56a239a41e2629b6ff631de59910b8244dd Reviewed-by: Eike Ziller <[email protected]> diff --git a/src/libs/3rdparty/botan/botan.cpp b/src/libs/3rdparty/botan/botan.cpp index 000c3ea..4431ce1 100644 --- a/src/libs/3rdparty/botan/botan.cpp +++ b/src/libs/3rdparty/botan/botan.cpp @@ -47182,3 +47182,44 @@ u32bit version_minor() { return BOTAN_VERSION_MINOR; } u32bit version_patch() { return BOTAN_VERSION_PATCH; } } + +namespace Botan { +PublicKeyPtr createRsaPublicKey(const BigInt &e, const BigInt &n) +{ + return PublicKeyPtr(new RSA_PublicKey(e, n)); +} + +PublicKeyPtr createDsaPublicKey(const DL_Group &group, const BigInt &y) +{ + return PublicKeyPtr(new DSA_PublicKey(group, y)); +} + +PrivateKeyPtr createRsaPrivateKey(RandomNumberGenerator &rng, const BigInt &p, const BigInt &q, + const BigInt &e, const BigInt &d, const BigInt &n) +{ + return PrivateKeyPtr(new RSA_PrivateKey(rng, p, q, e, d, n)); +} + +PrivateKeyPtr createRsaPrivateKey(RandomNumberGenerator &rng, size_t bits, size_t exp) +{ + return PrivateKeyPtr(new RSA_PrivateKey(rng, bits, exp)); +} + +PrivateKeyPtr createDsaPrivateKey(RandomNumberGenerator &rng, const DL_Group &group, + const BigInt &private_key) +{ + return PrivateKeyPtr(new DSA_PrivateKey(rng, group, private_key)); +} + +PrivateKeyPtr loadPkcs8PrivateKey(DataSource& source, RandomNumberGenerator& rng, + const User_Interface& ui) +{ + return PrivateKeyPtr(PKCS8::load_key(source, rng, ui)); +} + +DhPrivateKeyPtr createDhPrivateKey(RandomNumberGenerator &rng, const DL_Group &grp, const BigInt &x) +{ + return DhPrivateKeyPtr(new DH_PrivateKey(rng, grp, x)); +} + +} diff --git a/src/libs/3rdparty/botan/botan.h b/src/libs/3rdparty/botan/botan.h index a073890..13ec9fd 100644 --- a/src/libs/3rdparty/botan/botan.h +++ b/src/libs/3rdparty/botan/botan.h @@ -9,6 +9,7 @@ #define BOTAN_AMALGAMATION_H__ #include <QtGlobal> +#include <QSharedPointer> #include <iosfwd> #include <map> @@ -16181,7 +16182,26 @@ class BOTAN_DLL ANSI_X919_MAC : public MessageAuthenticationCode SecureVector<byte> state; size_t position; }; +} + +namespace Botan { +typedef QSharedPointer<Public_Key> PublicKeyPtr; +BOTAN_DLL PublicKeyPtr createRsaPublicKey(const BigInt &e, const BigInt &n); +BOTAN_DLL PublicKeyPtr createDsaPublicKey(const DL_Group& group, const BigInt& y); + +typedef QSharedPointer<Private_Key> PrivateKeyPtr; +BOTAN_DLL PrivateKeyPtr createRsaPrivateKey(RandomNumberGenerator& rng, const BigInt& p, + const BigInt& q, const BigInt& e, const BigInt& d = 0, const BigInt& n = 0); +BOTAN_DLL PrivateKeyPtr createRsaPrivateKey(RandomNumberGenerator& rng, size_t bits, + size_t exp = 65537); +BOTAN_DLL PrivateKeyPtr createDsaPrivateKey(RandomNumberGenerator& rng, const DL_Group& group, + const BigInt& private_key = 0); +BOTAN_DLL PrivateKeyPtr loadPkcs8PrivateKey(DataSource& source, RandomNumberGenerator& rng, + const User_Interface& ui); +typedef QSharedPointer<DH_PrivateKey> DhPrivateKeyPtr; +BOTAN_DLL DhPrivateKeyPtr createDhPrivateKey(RandomNumberGenerator& rng, const DL_Group& grp, + const BigInt& x = 0); } diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp index 3e1b697..868a64b 100644 --- a/src/libs/ssh/sshcryptofacility.cpp +++ b/src/libs/ssh/sshcryptofacility.cpp @@ -218,16 +218,14 @@ bool SshEncryptionFacility::createAuthenticationKeyFromPKCS8(const QByteArray &p try { Pipe pipe; pipe.process_msg(convertByteArray(privKeyFileContents), privKeyFileContents.size()); - Private_Key * const key = PKCS8::load_key(pipe, m_rng, SshKeyPasswordRetriever()); - if (DSA_PrivateKey * const dsaKey = dynamic_cast<DSA_PrivateKey *>(key)) { + const PrivateKeyPtr authKey = loadPkcs8PrivateKey(pipe, m_rng, SshKeyPasswordRetriever()); + if (DSA_PrivateKey * const dsaKey = dynamic_cast<DSA_PrivateKey *>(authKey.data())) { m_authKeyAlgoName = SshCapabilities::PubKeyDss; - m_authKey.reset(dsaKey); pubKeyParams << dsaKey->group_p() << dsaKey->group_q() << dsaKey->group_g() << dsaKey->get_y(); allKeyParams << pubKeyParams << dsaKey->get_x(); - } else if (RSA_PrivateKey * const rsaKey = dynamic_cast<RSA_PrivateKey *>(key)) { + } else if (RSA_PrivateKey * const rsaKey = dynamic_cast<RSA_PrivateKey *>(authKey.data())) { m_authKeyAlgoName = SshCapabilities::PubKeyRsa; - m_authKey.reset(rsaKey); pubKeyParams << rsaKey->get_e() << rsaKey->get_n(); allKeyParams << pubKeyParams << rsaKey->get_p() << rsaKey->get_q() << rsaKey->get_d(); @@ -235,6 +233,7 @@ bool SshEncryptionFacility::createAuthenticationKeyFromPKCS8(const QByteArray &p qWarning("%s: Unexpected code flow, expected success or exception.", Q_FUNC_INFO); return false; } + m_authKey = authKey; } catch (const Botan::Exception &ex) { error = QLatin1String(ex.what()); return false; @@ -291,15 +290,13 @@ bool SshEncryptionFacility::createAuthenticationKeyFromOpenSSL(const QByteArray if (m_authKeyAlgoName == SshCapabilities::PubKeyDss) { BigInt p, q, g, y, x; sequence.decode (p).decode (q).decode (g).decode (y).decode (x); - DSA_PrivateKey * const dsaKey = new DSA_PrivateKey(m_rng, DL_Group(p, q, g), x); - m_authKey.reset(dsaKey); + m_authKey = createDsaPrivateKey(m_rng, DL_Group(p, q, g), x); pubKeyParams << p << q << g << y; allKeyParams << pubKeyParams << x; } else { BigInt p, q, e, d, n; sequence.decode(n).decode(e).decode(d).decode(p).decode(q); - RSA_PrivateKey * const rsaKey = new RSA_PrivateKey(m_rng, p, q, e, d, n); - m_authKey.reset(rsaKey); + m_authKey = createRsaPrivateKey(m_rng, p, q, e, d, n); pubKeyParams << e << n; allKeyParams << pubKeyParams << p << q << d; } diff --git a/src/libs/ssh/sshcryptofacility_p.h b/src/libs/ssh/sshcryptofacility_p.h index 5b22429..afd85fb 100644 --- a/src/libs/ssh/sshcryptofacility_p.h +++ b/src/libs/ssh/sshcryptofacility_p.h @@ -117,7 +117,7 @@ private: QByteArray m_authKeyAlgoName; QByteArray m_authPubKeyBlob; QByteArray m_cachedPrivKeyContents; - QScopedPointer<Botan::Private_Key> m_authKey; + QSharedPointer<Botan::Private_Key> m_authKey; mutable Botan::AutoSeeded_RNG m_rng; }; diff --git a/src/libs/ssh/sshkeyexchange.cpp b/src/libs/ssh/sshkeyexchange.cpp index c11201c..0c0fea6 100644 --- a/src/libs/ssh/sshkeyexchange.cpp +++ b/src/libs/ssh/sshkeyexchange.cpp @@ -136,8 +136,7 @@ bool SshKeyExchange::sendDhInitPacket(const SshIncomingPacket &serverKexInit) kexInitParams.compressionAlgorithmsServerToClient.names); AutoSeeded_RNG rng; - m_dhKey.reset(new DH_PrivateKey(rng, - DL_Group(botanKeyExchangeAlgoName(keyAlgo)))); + m_dhKey = createDhPrivateKey(rng, DL_Group(botanKeyExchangeAlgoName(keyAlgo))); m_serverKexInitPayload = serverKexInit.payLoad(); m_sendFacility.sendKeyDhInitPacket(m_dhKey->get_y()); @@ -184,28 +183,24 @@ void SshKeyExchange::sendNewKeysPacket(const SshIncomingPacket &dhReply, printData("H", m_h); #endif // CREATOR_SSH_DEBUG - QScopedPointer<Public_Key> sigKey; - QScopedPointer<PK_Verifier> verifier; + QSharedPointer<Public_Key> publicKey; + QByteArray algorithm; if (m_serverHostKeyAlgo == SshCapabilities::PubKeyDss) { const DL_Group group(reply.parameters.at(0), reply.parameters.at(1), reply.parameters.at(2)); - DSA_PublicKey * const dsaKey - = new DSA_PublicKey(group, reply.parameters.at(3)); - sigKey.reset(dsaKey); - verifier.reset(new PK_Verifier(*dsaKey, botanEmsaAlgoName(SshCapabilities::PubKeyDss))); + publicKey = createDsaPublicKey(group, reply.parameters.at(3)); + algorithm = SshCapabilities::PubKeyDss; } else if (m_serverHostKeyAlgo == SshCapabilities::PubKeyRsa) { - RSA_PublicKey * const rsaKey - = new RSA_PublicKey(reply.parameters.at(1), reply.parameters.at(0)); - sigKey.reset(rsaKey); - verifier.reset(new PK_Verifier(*rsaKey, botanEmsaAlgoName(SshCapabilities::PubKeyRsa))); + publicKey = createRsaPublicKey(reply.parameters.at(1), reply.parameters.at(0)); + algorithm = SshCapabilities::PubKeyRsa; } else { Q_ASSERT(!"Impossible: Neither DSS nor RSA!"); } const byte * const botanH = convertByteArray(m_h); const Botan::byte * const botanSig = convertByteArray(reply.signatureBlob); - if (!verifier->verify_message(botanH, m_h.size(), botanSig, - reply.signatureBlob.size())) { + if (!PK_Verifier(*publicKey, botanEmsaAlgoName(algorithm)).verify_message(botanH, m_h.size(), + botanSig, reply.signatureBlob.size())) { throw SSH_SERVER_EXCEPTION(SSH_DISCONNECT_KEY_EXCHANGE_FAILED, "Invalid signature in SSH_MSG_KEXDH_REPLY packet."); } diff --git a/src/libs/ssh/sshkeyexchange_p.h b/src/libs/ssh/sshkeyexchange_p.h index ea3e599..e8d27b6 100644 --- a/src/libs/ssh/sshkeyexchange_p.h +++ b/src/libs/ssh/sshkeyexchange_p.h @@ -33,6 +33,7 @@ #include <QByteArray> #include <QScopedPointer> +#include <QSharedPointer> namespace Botan { class DH_PrivateKey; @@ -71,7 +72,7 @@ private: QByteArray m_serverId; QByteArray m_clientKexInitPayload; QByteArray m_serverKexInitPayload; - QScopedPointer<Botan::DH_PrivateKey> m_dhKey; + QSharedPointer<Botan::DH_PrivateKey> m_dhKey; QByteArray m_k; QByteArray m_h; QByteArray m_serverHostKeyAlgo; diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index ef28c05..5aefdd9 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -60,9 +60,9 @@ bool SshKeyGenerator::generateKeys(KeyType type, PrivateKeyFormat format, int ke AutoSeeded_RNG rng; KeyPtr key; if (m_type == Rsa) - key = KeyPtr(new RSA_PrivateKey(rng, keySize)); + key = createRsaPrivateKey(rng, keySize); else - key = KeyPtr(new DSA_PrivateKey(rng, DL_Group(rng, DL_Group::DSA_Kosherizer, keySize))); + key = createDsaPrivateKey(rng, DL_Group(rng, DL_Group::DSA_Kosherizer, keySize)); switch (format) { case Pkcs8: generatePkcs8KeyStrings(key, rng); ++++++ system-botan-lib.diff ++++++ diff --git a/src/libs/3rdparty/botan/botan.pri b/src/libs/3rdparty/botan/botan.pri index 1088c99..4b715c0 100644 --- a/src/libs/3rdparty/botan/botan.pri +++ b/src/libs/3rdparty/botan/botan.pri @@ -1,46 +1,2 @@ -INCLUDEPATH *= $$PWD/.. -HEADERS += $$PWD/botan.h -SOURCES += $$PWD/botan.cpp - -CONFIG += exceptions - -DEPENDPATH += . - -DEFINES += BOTAN_DLL= -unix:DEFINES += BOTAN_TARGET_OS_HAS_GETTIMEOFDAY BOTAN_HAS_ALLOC_MMAP \ - BOTAN_HAS_ENTROPY_SRC_DEV_RANDOM BOTAN_HAS_ENTROPY_SRC_EGD BOTAN_HAS_ENTROPY_SRC_FTW \ - BOTAN_HAS_ENTROPY_SRC_UNIX BOTAN_HAS_MUTEX_PTHREAD BOTAN_HAS_PIPE_UNIXFD_IO -*linux*:DEFINES += BOTAN_TARGET_OS_IS_LINUX BOTAN_TARGET_OS_HAS_CLOCK_GETTIME \ - BOTAN_TARGET_OS_HAS_DLOPEN BOTAN_TARGET_OS_HAS_GMTIME_R BOTAN_TARGET_OS_HAS_POSIX_MLOCK \ - BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE BOTAN_HAS_DYNAMIC_LOADER -macx:DEFINES += BOTAN_TARGET_OS_IS_DARWIN -*g++*:DEFINES += BOTAN_BUILD_COMPILER_IS_GCC -*clang*:DEFINES += BOTAN_BUILD_COMPILER_IS_CLANG -*icc*:DEFINES += BOTAN_BUILD_COMPILER_IS_INTEL - -win32 { - DEFINES += BOTAN_TARGET_OS_IS_WINDOWS \ - BOTAN_TARGET_OS_HAS_LOADLIBRARY BOTAN_TARGET_OS_HAS_WIN32_GET_SYSTEMTIME \ - BOTAN_TARGET_OS_HAS_WIN32_VIRTUAL_LOCK BOTAN_HAS_DYNAMICALLY_LOADED_ENGINE \ - BOTAN_HAS_DYNAMIC_LOADER BOTAN_HAS_ENTROPY_SRC_CAPI BOTAN_HAS_ENTROPY_SRC_WIN32 \ - BOTAN_HAS_MUTEX_WIN32 - - win32-msvc* { - QMAKE_CXXFLAGS += -wd4251 -wd4290 -wd4250 - DEFINES += BOTAN_BUILD_COMPILER_IS_MSVC BOTAN_TARGET_OS_HAS_GMTIME_S - } else { - QMAKE_CFLAGS += -fpermissive -finline-functions -Wno-long-long - QMAKE_CXXFLAGS += -fpermissive -finline-functions -Wno-long-long - } - LIBS += -ladvapi32 -luser32 -} - -unix:*-g++* { - QMAKE_CFLAGS += -fPIC -ansi -fpermissive -finline-functions -Wno-long-long - QMAKE_CXXFLAGS += -fPIC -ansi -fpermissive -finline-functions -Wno-long-long - QMAKE_CXXFLAGS_HIDESYMS -= -fvisibility-inlines-hidden # for ubuntu 7.04 -} - -linux*|freebsd* { - LIBS += -lrt -} +INCLUDEPATH *= /usr/include/botan-1.10 +LIBS *= -lbotan-1.10 diff --git a/src/libs/ssh/sshcryptofacility.cpp b/src/libs/ssh/sshcryptofacility.cpp index 1d6913e..323e7d9 100644 --- a/src/libs/ssh/sshcryptofacility.cpp +++ b/src/libs/ssh/sshcryptofacility.cpp @@ -37,6 +37,11 @@ #include "sshpacket_p.h" #include <botan/botan.h> +#include <botan/cbc.h> +#include <botan/dsa.h> +#include <botan/pkcs8.h> +#include <botan/pubkey.h> +#include <botan/rsa.h> #include <QDebug> #include <QList> diff --git a/src/libs/ssh/sshcryptofacility_p.h b/src/libs/ssh/sshcryptofacility_p.h index 5995294..a8963ea 100644 --- a/src/libs/ssh/sshcryptofacility_p.h +++ b/src/libs/ssh/sshcryptofacility_p.h @@ -31,9 +31,11 @@ #define SSHABSTRACTCRYPTOFACILITY_P_H #include <botan/botan.h> +#include <botan/hmac.h> #include <QByteArray> #include <QScopedPointer> +#include <QSharedPointer> namespace QSsh { namespace Internal { diff --git a/src/libs/ssh/sshkeyexchange.cpp b/src/libs/ssh/sshkeyexchange.cpp index 6627ff9..a44c79c 100644 --- a/src/libs/ssh/sshkeyexchange.cpp +++ b/src/libs/ssh/sshkeyexchange.cpp @@ -36,6 +36,12 @@ #include "sshincomingpacket_p.h" #include <botan/botan.h> +#include <botan/dh.h> +#include <botan/dl_group.h> +#include <botan/dsa.h> +#include <botan/pem.h> +#include <botan/pubkey.h> +#include <botan/rsa.h> #ifdef CREATOR_SSH_DEBUG #include <iostream> diff --git a/src/libs/ssh/sshkeygenerator.cpp b/src/libs/ssh/sshkeygenerator.cpp index e6aa967..598a9b7 100644 --- a/src/libs/ssh/sshkeygenerator.cpp +++ b/src/libs/ssh/sshkeygenerator.cpp @@ -34,6 +34,11 @@ #include "sshpacket_p.h" #include <botan/botan.h> +#include <botan/der_enc.h> +#include <botan/dsa.h> +#include <botan/pem.h> +#include <botan/pkcs8.h> +#include <botan/rsa.h> #include <QDateTime> #include <QInputDialog> diff --git a/src/libs/ssh/sshkeypasswordretriever_p.h b/src/libs/ssh/sshkeypasswordretriever_p.h index cfb86e1..3971c4e 100644 --- a/src/libs/ssh/sshkeypasswordretriever_p.h +++ b/src/libs/ssh/sshkeypasswordretriever_p.h @@ -30,6 +30,7 @@ #define KEYPASSWORDRETRIEVER_H #include <botan/botan.h> +#include <botan/ui.h> #include <string> -- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
