changeset 1303:78637257f547

Merged.
author Emanuel Schuetze <emanuel@intevation.de>
date Mon, 29 Sep 2014 16:38:09 +0200
parents 7b6a1d0b87c3 (current diff) 320ee276f5ff (diff)
children 82fab0c689bf
files
diffstat 4 files changed, 331 insertions(+), 28 deletions(-) [+]
line wrap: on
line diff
--- a/CMakeLists.txt	Mon Sep 29 16:37:49 2014 +0200
+++ b/CMakeLists.txt	Mon Sep 29 16:38:09 2014 +0200
@@ -98,6 +98,8 @@
    set(HARDENING_FLAGS " ${HARDENING_FLAGS} -Wstack-protector")
    set(HARDENING_FLAGS " ${HARDENING_FLAGS} --param ssp-buffer-size=4")
    set(HARDENING_FLAGS " ${HARDENING_FLAGS} -D_FORTIFY_SOURCE=2 -O0")
+else()
+   set(HARDENING_FLAGS " -Weverything")
 endif()
 
 if(ENABLE_PROFILING)
--- a/licenses/README.txt	Mon Sep 29 16:37:49 2014 +0200
+++ b/licenses/README.txt	Mon Sep 29 16:38:09 2014 +0200
@@ -54,36 +54,100 @@
 
     - Oxygen-Icons
       URL: http://www.oxygen-icons.org
-      Lizenz: GNU LGPL v>=3
-
-    - OpenSSL-based signcode utility
-      URL: http://osslsigncode.sourceforge.net
-      License: GPL v==3
-
-    - OpenSSL
-      URL: https://www.openssl.org
-      License: OpenSSL License
+      License: GNU LGPL v>=3
 
     - NSIS
       URL: http://nsis.sourceforge.net
       License: zlib/libpng license and Common Public License version 1.0
       (only LZMA compression module)
-  
 
+TrustBridge Administrator can utilse a code signing tool, thus it comes
+bundled with osslsigncode, which itself depends on OpenSSL:
+
+    - OpenSSL-based signcode utility
+      URL: http://osslsigncode.sourceforge.net
+      License: GNU GPL v==3 + OpenSSL exception.
+
+    - OpenSSL
+      URL: https://www.openssl.org
+      License: OpenSSL License
+
+
+Scripts and tools for building and testing the TrustBridge binaries 
+are Free Software as well. Most can be downloaded in binary and source 
+from Ubuntu or Debian, see the details in INSTALL, except:j
+
+    - Hiawatha
+      URL: https://www.hiawatha-webserver.org
+      License: GNU GPL v==2
 --------------------------------------------------------------
-License texts of all used components in detail:
+
+Licenses in detail:
+===================
 
 
 Qt
 ==
-    License: GNU LGPL v==2 or GNU GPL v==3
-    (see LGPLv2.txt or GPLv3.txt)
+ Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
+ Contact: http://www.qt-project.org/legal
+
+ $QT_BEGIN_LICENSE:LGPL$
+ 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.
+
+ GNU General Public License Usage
+ Alternatively, this file may be used under the terms of the GNU
+ General Public License version 3.0 as published by the Free Software
+ Foundation and appearing in the file LICENSE.GPL included in the
+ packaging of this file.  Please review the following information to
+ ensure the GNU General Public License version 3.0 requirements will be
+ met: http://www.gnu.org/copyleft/gpl.html.
+ $QT_END_LICENSE$
+
+(see LGPLv2.txt or GPLv3.txt)
 
 
 PolarSSL
 ========
-    License: GPL v>=2
-    (see GPLv2.txt)
+  Copyright (C) 2006-2014, Brainspark B.V.
+
+  This file is part of PolarSSL (http://www.polarssl.org)
+  Lead Maintainer: Paul Bakker <polarssl_maintainer at polarssl.org>
+
+  All rights reserved.
+
+  This program is free software; you can redistribute it and/or modify
+  it under the terms of the GNU General Public License as published by
+  the Free Software Foundation; either version 2 of the License, or
+  (at your option) any later version.
+
+  This program is distributed in the hope that it will be useful,
+  but WITHOUT ANY WARRANTY; without even the implied warranty of
+  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+  GNU General Public License for more details.
+
+  You should have received a copy of the GNU General Public License along
+  with this program; if not, write to the Free Software Foundation, Inc.,
+  51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+(see GPLv2.txt)
 
 
 Oxygen-Icons
@@ -139,13 +203,185 @@
   kde-artists [at] kde.org
 
 -----
-(jsee LGPLv3.txt)
+(see LGPLv3.txt)
 
 
 Mozilla NSS
 ===========
-    Lizenz: Mozilla Public License v2
-    (see MPLv2.txt)
+The Mozilla Project.
+
+The NSS library is licensed under the terms of the Mozilla Public License
+version 2.0, which terms can be found further below.
+
+The original code is copyright (c) 1994-2000 Netscape Communications
+Corporation.
+
+(see MPLv2.txt)
+
+Some external libraries are also provided in the source tree with the
+following licensing terms:
+
+zlib
+----
+
+The  nss/lib/zlib directory is licensed under the following
+terms:
+
+ (C) 1995-2004 Jean-loup Gailly and Mark Adler
+
+  This software is provided 'as-is', without any express or implied
+  warranty.  In no event will the authors be held liable for any damages
+  arising from the use of this software.
+
+  Permission is granted to anyone to use this software for any purpose,
+  including commercial applications, and to alter it and redistribute it
+  freely, subject to the following restrictions:
+
+  1. The origin of this software must not be misrepresented; you must not
+     claim that you wrote the original software. If you use this software
+     in a product, an acknowledgment in the product documentation would be
+     appreciated but is not required.
+  2. Altered source versions must be plainly marked as such, and must not be
+     misrepresented as being the original software.
+  3. This notice may not be removed or altered from any source distribution.
+
+  Jean-loup Gailly        Mark Adler
+  jloup@gzip.org          madler@alumni.caltech.edu
+
+  If you use the zlib library in a product, we would appreciate *not*
+  receiving lengthy legal documents to sign. The sources are provided
+  for free but without warranty of any kind.  The library has been
+  entirely written by Jean-loup Gailly and Mark Adler; it does not
+  include third-party code.
+
+  If you redistribute modified sources, we would appreciate that you include
+  in the file ChangeLog history information documenting your changes. Please
+  read the FAQ for more information on the distribution of modified source
+  versions.
+
+dbm
+---
+
+The nss/lib/dbm directory, with few exceptions, is licensed under the
+following terms:
+
+  Copyright (c) 1991, 1993, 1994
+  The Regents of the University of California.  All rights reserved.
+
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+  3. ***REMOVED*** - see
+     ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change"
+  4. Neither the name of the University nor the names of its contributors
+     may be used to endorse or promote products derived from this software
+     without specific prior written permission.
+
+  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  SUCH DAMAGE.
+
+sqlite
+------
+
+The nss/lib/sqlite/sqlite3.[ch] files contain a copy of sqlite with the
+following licensing terms:
+
+  The author disclaims copyright to this source code.  In place of
+  a legal notice, here is a blessing:
+
+     May you do good and not evil.
+     May you find forgiveness for yourself and forgive others.
+     May you share freely, never taking more than you give.
+
+mkdepend
+--------
+
+The nss/coreconf/mkdepend directory contains a copy of mkdepend with the
+following licensing terms:
+
+cppsetup.c, def.h, include.c, main.c, mkdepend.man, parse.c, pr.c:
+Copyright (c) 1993, 1994, 1998  The Open Group
+
+Permission to use, copy, modify, distribute, and sell this software and its
+documentation for any purpose is hereby granted without fee, provided that
+the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation.
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of The Open Group shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from The Open Group.
+
+ifparser.[ch]:
+
+Copyright 1992 Network Computing Devices, Inc.
+
+Permission to use, copy, modify, and distribute this software and its
+documentation for any purpose and without fee is hereby granted, provided
+that the above copyright notice appear in all copies and that both that
+copyright notice and this permission notice appear in supporting
+documentation, and that the name of Network Computing Devices may not be
+used in advertising or publicity pertaining to distribution of the software
+without specific, written prior permission.  Network Computing Devices makes
+no representations about the suitability of this software for any purpose.
+It is provided ``as is'' without express or implied warranty.
+
+NETWORK COMPUTING DEVICES DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
+SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
+IN NO EVENT SHALL NETWORK COMPUTING DEVICES BE LIABLE FOR ANY SPECIAL,
+INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
+LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
+OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
+PERFORMANCE OF THIS SOFTWARE.
+
+imakemdep.h:
+
+Copyright (c) 1993, 1994  X Consortium
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
+X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
+AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+Except as contained in this notice, the name of the X Consortium shall not be
+used in advertising or otherwise to promote the sale, use or other dealings
+in this Software without prior written authorization from the X Consortium.
 
 
 libcurl
@@ -180,8 +416,37 @@
 
 OpenSSL-based signcode utility
 ==============================
-    License: GPL v==3
-    (see GPLv3.txt)
+   OpenSSL based Authenticode signing for PE/MSI/Java CAB files.
+
+	 Copyright (C) 2005-2014 Per Allansson <pallansson@gmail.com>
+
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+   In addition, as a special exception, the copyright holders give
+   permission to link the code of portions of this program with the
+   OpenSSL library under certain conditions as described in each
+   individual source file, and distribute linked combinations
+   including the two.
+   You must obey the GNU General Public License in all respects
+   for all of the code used other than OpenSSL.  If you modify
+   file(s) with this exception, you may extend this exception to your
+   version of the file(s), but you are not obligated to do so.  If you
+   do not wish to do so, delete this exception statement from your
+   version.  If you delete this exception statement from all source
+   files in the program, then also delete it here.
+(see GPLv3.txt)
 
 
 OpenSSL
@@ -490,3 +755,17 @@
     additions to files from the LZMA compression module for NSIS, however,
     are subject to the terms of the Common Public License version 1.0.
 
+Hiawatha
+========
+Copyright © by Hugo Leisink.
+
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; version 2 of the License. For a copy,
+ see http://www.gnu.org/licenses/gpl-2.0.html.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+(see GPLv2.txt)
--- a/ui/certificate.cpp	Mon Sep 29 16:37:49 2014 +0200
+++ b/ui/certificate.cpp	Mon Sep 29 16:38:09 2014 +0200
@@ -10,6 +10,8 @@
 #include <QFile>
 #include <QStringList>
 #include <QObject>
+#include <QProcess>
+#include <QTemporaryFile>
 
 #include <polarssl/sha1.h>
 
@@ -257,7 +259,21 @@
 #else
 bool Certificate::showNativeUI(void *parent)
 {
-    qDebug() << "Not implemented.";
-    return false;
+    QTemporaryFile *tmpCert = new QTemporaryFile;
+    tmpCert->open();
+    tmpCert->write("-----BEGIN CERTIFICATE-----\n");
+    tmpCert->write(mBaseLine.right(mBaseLine.size() - 2).toLatin1());
+    tmpCert->write("-----END CERTIFICATE-----\n");
+    tmpCert->close();
+    QStringList args;
+    args << tmpCert->fileName();
+    QProcess *viewer = new QProcess();
+    viewer->setProgram("gcr-viewer");
+    viewer->setArguments(args);
+
+    QObject::connect (viewer, SIGNAL(finished(int, QProcess::ExitStatus)), tmpCert, SLOT(deleteLater()));
+    QObject::connect (viewer, SIGNAL(finished(int, QProcess::ExitStatus)), viewer, SLOT(deleteLater()));
+    viewer->start();
+    return !(!viewer->waitForStarted() || viewer->state() == QProcess::NotRunning);
 }
 #endif
--- a/ui/certificateitemwidget.cpp	Mon Sep 29 16:37:49 2014 +0200
+++ b/ui/certificateitemwidget.cpp	Mon Sep 29 16:38:09 2014 +0200
@@ -13,6 +13,7 @@
 #include <QToolButton>
 #include <QSignalBlocker>
 #include <QPushButton>
+#include <QMessageBox>
 
 void CheckLessToolBtn::paintEvent(QPaintEvent * pe) {
 
@@ -67,20 +68,16 @@
     QLabel *firstLabel = new QLabel(QString::fromLatin1("<big><b>%1</b></big> ").arg
         (mCertificate.subjectCN()));
 
-#ifdef Q_OS_WIN
     QHBoxLayout *firstLabelButtonLayout = new QHBoxLayout;
     firstLabelButtonLayout->addWidget(firstLabel);
     QPushButton *detailsBtn = new QPushButton;
-    detailsBtn->setIcon(QIcon(":/img/preferences-network_16.png")); // TODO
+    detailsBtn->setIcon(QIcon(":/img/document-preview.png"));
     detailsBtn->setToolTip(tr("Open the Windows certificate information dialog."));
 
     firstLabelButtonLayout->addWidget(detailsBtn);
     firstLabelButtonLayout->addStretch(-1);
     connect(detailsBtn, SIGNAL(clicked()), this, SLOT(showCertDlg()));
     labelLayout->addLayout(firstLabelButtonLayout);
-#else
-    labelLayout->addWidget(firstLabel);
-#endif
     QLabel *secondLabel = new QLabel(QString::fromLatin1("%2<br/>%3<br/>%4").arg
         (mCertificate.subjectO()).arg(validity).arg
         (fpstring));
@@ -114,7 +111,16 @@
 {
     /* This is a totally evil cast but legitimate on Windows
      * HANDLES are only 32 bit even on Windows 64 bit */
-    qDebug() << "Showing native ui: " <<  mCertificate.showNativeUI((void*)effectiveWinId());
+    if (!mCertificate.showNativeUI((void*)effectiveWinId())) {
+        qDebug() << "Failed to show native dialog";
+#ifdef WIN32
+        // maybe old windows version
+        QMessageBox::warning(this, tr("TrustBridge error"), tr("Failed to open native viewer."));
+#else
+        QMessageBox::warning(this, tr("TrustBridge error"), tr("Failed to open 'gcr-viewer'.") + "\n" +
+                tr("TrustBridge uses 'gcr-viewer' to show certificate details. Please ensure that 'gcr-viewer' is installed."));
+#endif
+    }
     return;
 }
 

http://wald.intevation.org/projects/trustbridge/