pax_global_header00006660000000000000000000000064113742325520014516gustar00rootroot0000000000000052 comment=228b99d9c30cd57c951153d18672710ba70fb30d nuapplet-2.3.0/000077500000000000000000000000001137423255200133505ustar00rootroot00000000000000nuapplet-2.3.0/CMakeLists.txt000066400000000000000000000065301137423255200161140ustar00rootroot00000000000000PROJECT(nuapplet2) SET(PROJECT_VERSION_MAJOR "2") SET(PROJECT_VERSION_MINOR "3") SET(PROJECT_VERSION_PATCH "0") SET(PROJECT_VERSION_STR "${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}.${PROJECT_VERSION_PATCH}") cmake_minimum_required(VERSION 2.6) # apt-get install libqt4-dev INCLUDE (CheckIncludeFile) INCLUDE (CheckIncludeFiles) INCLUDE (CheckLibraryExists) INCLUDE (CheckSymbolExists) INCLUDE (FindPkgConfig) INCLUDE(FindQt4) INCLUDE(FindNuclient.cmake) IF (NOT QT4_FOUND) MESSAGE(FATAL_ERROR "Qt4 development files not found. Please install libqt4-dev") ENDIF (NOT QT4_FOUND) IF (NOT LIBNUCLIENT_FOUND) MESSAGE(FATAL_ERROR "Libnuclient development files not found. Please install libnuclient-dev") ENDIF (NOT LIBNUCLIENT_FOUND) INCLUDE(${QT_USE_FILE}) ADD_DEFINITIONS(-DPROJECT_VERSION_STR="${PROJECT_VERSION_STR}") ADD_DEFINITIONS(${QT_DEFINITIONS}) ADD_DEFINITIONS(-DTRANSLATION_DIR="${CMAKE_INSTALL_PREFIX}/share/qt4/translations/" -DDATA_DIR="${CMAKE_INSTALL_PREFIX}/share/nuapplet2/" ${LIBNUCLIENT_DEFINITIONS}) INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR} ${QT_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR}) LINK_DIRECTORIES(${QT_LIBRARY_DIR} ${LIBNUSSL_LIBDIR} ${LIBNUCLIENT_LIBDIR}) IF(APPLE) ADD_DEFINITIONS(-DFREEBSD) ENDIF(APPLE) INCLUDE_DIRECTORIES(${LIBNUSSL_INCLUDE_DIRS}) INCLUDE_DIRECTORIES(${LIBNUCLIENT_INCLUDE_DIRS}) SET(GUI_SRCS src/auth_dlg.cpp src/editbox.cpp src/logs.cpp src/preferences.cpp src/systray.cpp src/thread_session.cpp ) SET(GUI_HDRS src/auth_dlg.h src/editbox.h src/logs.h src/preferences.h src/systray.h src/thread_session.h ) SET(GUI_UIS ui/logs.ui ui/prefs.ui ) # there's a typo in cmake documentation: QT4_ADD_RESOURCES (with an S) QT4_ADD_RESOURCES(GUI_SRCS application.qrc) # for this to work, $name.cpp file must include $name.moc QT4_AUTOMOC( ${GUI_SRCS} ) QT4_WRAP_UI(GUI_UIS_H ${GUI_UIS}) ADD_EXECUTABLE(nuapplet2 src/main.cpp ${GUI_SRCS} ${GUI_HDRS} ${GUI_UIS_H} ) #QT4_GENERATE_MOC(${CMAKE_CURRENT_SOURCE_DIR}/mainwindow.h ${CMAKE_CURRENT_BINARY_DIR}/moc_mainwindow.cpp) ##QT4_AUTOMOC(${GUI_HDRS) TARGET_LINK_LIBRARIES(nuapplet2 ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${LIBNUSSL_LDFLAGS} ${LIBNUCLIENT_LDFLAGS}) INSTALL(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/nuapplet2 DESTINATION bin) INSTALL(FILES nuapplet2.desktop DESTINATION share/applications) INSTALL(FILES images/nuapplet2-running.png DESTINATION share/pixmaps) INSTALL(FILES lang/nuapplet2_fr_FR.qm DESTINATION share/qt4/translations) SET(ts_files "lang/nuapplet2_fr_FR.ts") ADD_CUSTOM_TARGET(lupdate COMMAND "lupdate" "src/*.cpp" "src/*.h" "ui/*.ui" -ts "${ts_files}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Runs lupdate command" ) ADD_CUSTOM_TARGET(lrelease COMMAND "lrelease" "${ts_files}" WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} COMMENT "Runs lrelease command" ) ## Packaging infos SET(CPACK_PACKAGE_DESCRIPTION_SUMMARY "NuApplet") SET(CPACK_PACKAGE_VENDOR "EdenWall") #SET(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/ReadMe.txt") #SET(CPACK_RESOURCE_FILE_LICENSE "${CMAKE_CURRENT_SOURCE_DIR}/Copyright.txt") SET(CPACK_PACKAGE_VERSION_MAJOR "$PROJECT_VERSION_MAJOR") SET(CPACK_PACKAGE_VERSION_MINOR "$PROJECT_VERSION_MINOR") SET(CPACK_PACKAGE_VERSION_PATCH "$PROJECT_VERSION_PATCH") SET(CPACK_PACKAGE_INSTALL_DIRECTORY "CMake ${CMake_VERSION_MAJOR}.${CMake_VERSION_MINOR}") INCLUDE(CPack) nuapplet-2.3.0/Changelog000066400000000000000000000003311137423255200151570ustar00rootroot000000000000002.2 - 10/12/07 - MacOs support - Main loop rewrite - Graphism 2.1 - 12/11/07 - Build language file during compilation - Add support for command line arguments - Fix a dependency in the packaging 2.0 Initial release nuapplet-2.3.0/FindGnuTls.cmake000066400000000000000000000010621137423255200163660ustar00rootroot00000000000000## libnetfilter_conntrack INCLUDE(UsePkgConfig) PKGCONFIG("gnutls" GNUTLS_INCLUDE_DIR GNUTLS_LINK_DIR GNUTLS_LINK_FLAGS GNUTLS_CFLAGS) IF(GNUTLS_LINK_FLAGS) MESSAGE(STATUS "gnutls library found") INCLUDE_DIRECTORIES(${GNUTLS_INCLUDE_DIR}) SET(LIBS ${LIBS} ${GNUTLS_LINK_FLAGS}) SET(CFLAGS ${CFLAGS} ${GNUTLS_CFLAGS}) SET(LIBS_DIR ${LIBS_DIR} ${GNUTLS_LINK_DIR}) SET(GNUTLS_FOUND TRUE) ELSE(GNUTLS_LINK_FLAGS) MESSAGE(FATAL_ERROR "Can't find gnutls library developpement files!") ENDIF(GNUTLS_LINK_FLAGS) nuapplet-2.3.0/FindNuclient.cmake000066400000000000000000000054111137423255200167350ustar00rootroot00000000000000# export PKG_CONFIG_PATH to $prefix/lib/pkgconfig if needed pkg_search_module(LIBNUSSL "libnussl") IF (LIBNUSSL_FOUND) MESSAGE (STATUS "Found libnussl ${LIBNUSSL_VERSION}") SET (CMAKE_REQUIRED_INCLUDES "${LIBNUSSL_INCLUDE_DIRS};${CMAKE_REQUIRED_INCLUDES}") CHECK_INCLUDE_FILES("sys/socket.h;nussl.h" HAVE_NUSSL_H) SET (HAVE_NUSSL 1 CACHE INTERNAL "libnussl detected") ELSE (LIBNUSSL_FOUND) MESSAGE(FATAL_ERROR "Could not find libnussl") ENDIF (LIBNUSSL_FOUND) # export PKG_CONFIG_PATH to $prefix/lib/pkgconfig if needed pkg_search_module(LIBNUCLIENT "libnuclient") IF (LIBNUCLIENT_FOUND) MESSAGE (STATUS "Found libnuclient ${LIBNUCLIENT_VERSION}") SET (CMAKE_REQUIRED_INCLUDES "${LIBNUSSL_INCLUDE_DIRS};${CMAKE_REQUIRED_INCLUDES}") CHECK_INCLUDE_FILES("sys/socket.h;nussl.h;nuclient.h" HAVE_NUCLIENT_H) SET (HAVE_NUSSL 1 CACHE INTERNAL "libnussl detected") ELSE (LIBNUCLIENT_FOUND) MESSAGE(FATAL_ERROR "Could not find libnuclient") ENDIF (LIBNUCLIENT_FOUND) # Define nuauth default port SET(LIBNUCLIENT_DEFINITIONS "${LIBNUCLIENT_DEFINITIONS} -DDEFAULT_NUAUTH_PORT=\"4129\"") SET(CMAKE_REQUIRED_LIBRARIES "${CMAKE_REQUIRED_LIBRARIES};${LIBNUSSL_LIBRARIES};${LIBNUCLIENT_LIBRARIES}") # Had some defines depending on libnuclient's version # We cannot use CHECK_SYMBOL_EXISTS here since the symbol is not defined in header # (but is present in lib) CHECK_LIBRARY_EXISTS("nussl" load_sys_config "" HAVE_DEFAULT_NUAUTH_IP) #CHECK_SYMBOL_EXISTS (load_sys_config "sys/socket.h;nussl.h;nuclient.h" HAVE_DEFAULT_NUAUTH_IP) IF(HAVE_DEFAULT_NUAUTH_IP) SET(LIBNUCLIENT_DEFINITIONS "${LIBNUCLIENT_DEFINITIONS} -DHAVE_DEFAULT_NUAUTH_IP") MESSAGE(STATUS "HAVE_DEFAULT_NUAUTH_IP") ENDIF(HAVE_DEFAULT_NUAUTH_IP) #CHECK_LIBRARY_EXISTS(${NUCLIENT_LIBRARY} nu_client_default_hostname "" HAVE_DEFAULT_HOSTNAME_FUNC) CHECK_SYMBOL_EXISTS (nu_client_default_hostname "sys/socket.h;nussl.h;nuclient.h" HAVE_DEFAULT_HOSTNAME_FUNC) IF(HAVE_DEFAULT_HOSTNAME_FUNC) SET(LIBNUCLIENT_DEFINITIONS "${LIBNUCLIENT_DEFINITIONS} -DHAVE_DEFAULT_HOSTNAME_FUNC") MESSAGE(STATUS "HAVE_DEFAULT_HOSTNAME_FUNC") ENDIF(HAVE_DEFAULT_HOSTNAME_FUNC) #CHECK_LIBRARY_EXISTS("nussl" nu_client_default_tls_ca "" HAVE_DEFAULT_TLS_FUNC) CHECK_SYMBOL_EXISTS (nu_client_default_tls_ca "sys/socket.h;nussl.h;nuclient.h" HAVE_DEFAULT_TLS_FUNC) IF(HAVE_DEFAULT_TLS_FUNC) SET(LIBNUCLIENT_DEFINITIONS "${LIBNUCLIENT_DEFINITIONS} -DHAVE_DEFAULT_TLS_FUNC") MESSAGE(STATUS "HAVE_DEFAULT_TLS_FUNC") ENDIF(HAVE_DEFAULT_TLS_FUNC) # Uses libnuclient new API (with NuSSL) #CHECK_LIBRARY_EXISTS("nussl" nu_client_set_pkcs12 "" HAVE_NUFW24) CHECK_SYMBOL_EXISTS (nu_client_set_pkcs12 "sys/socket.h;nussl.h;nuclient.h" HAVE_NUFW24) IF(HAVE_NUFW24) SET(LIBNUCLIENT_DEFINITIONS "${LIBNUCLIENT_DEFINITIONS} -DHAVE_NUFW24") MESSAGE(STATUS "HAVE_NUFW24") ENDIF(HAVE_NUFW24) nuapplet-2.3.0/Makefile000066400000000000000000000011451137423255200150110ustar00rootroot00000000000000CMAKE_OPTIONS = -DCMAKE_BUILD_TYPE=Debug -DCMAKE_VERBOSE_MAKEFILE=0 CMAKE_RELEASE_OPTIONS = -DCMAKE_BUILD_TYPE=Release -DCMAKE_VERBOSE_MAKEFILE=0 -DCMAKE_INSTALL_PREFIX=/usr all: build/Makefile lrelease make -C build all build/Makefile: [ -d build ] || mkdir build; \ cd build && cmake $(CMAKE_OPTIONS) .. release: [ -d release ] || mkdir release; \ cd release && cmake $(CMAKE_RELEASE_OPTIONS) .. && make lrelease && make lupdate: build/Makefile make -C build lupdate lrelease: build/Makefile make -C build lrelease clean: rm -rf build rm -rf release .PHONY: all clean lupdate lrelease release nuapplet-2.3.0/application.qrc000066400000000000000000000005341137423255200163640ustar00rootroot00000000000000 images/nuapplet2-running.png images/nuapplet2-stopped.png images/nuapplet2-trying.png images/bouclier.png images/edenwall.png lang/nuapplet2_fr_FR.qm nuapplet-2.3.0/debian/000077500000000000000000000000001137423255200145725ustar00rootroot00000000000000nuapplet-2.3.0/debian/changelog000066400000000000000000000015711137423255200164500ustar00rootroot00000000000000nuapplet (2.2-3) unstable; urgency=medium * Add pkg-config to build deps (Closes: #477020) * Urgency=medium because of bug severity -- Pierre Chifflier Sun, 27 Apr 2008 17:46:46 +0200 nuapplet (2.2-2) unstable; urgency=low * Fix FTBFS (Closes: #477020) -- Pierre Chifflier Sun, 20 Apr 2008 18:19:18 +0200 nuapplet (2.2-1) unstable; urgency=low * New upstream release * Bump Standards-Version (no changes) * Add Homepage header -- Pierre Chifflier Mon, 10 Dec 2007 11:14:58 +0100 nuapplet (2.0-2) unstable; urgency=low * Add missing build-dep on cmake (Closes: #449197) -- Pierre Chifflier Mon, 05 Nov 2007 15:32:02 +0100 nuapplet (2.0-1) unstable; urgency=low * Initial release (Closes: #448135) -- Pierre Chifflier Fri, 26 Oct 2007 09:45:11 +0200 nuapplet-2.3.0/debian/compat000066400000000000000000000000021137423255200157700ustar00rootroot000000000000005 nuapplet-2.3.0/debian/control000066400000000000000000000011621137423255200161750ustar00rootroot00000000000000Source: nuapplet Section: net Priority: extra Maintainer: Pierre Chifflier Build-Depends: debhelper (>= 5), libnuclient-dev (>= 2.2.0), libqt4-dev (>= 4.2.1), cmake, pkg-config Standards-Version: 3.7.3 Homepage: http://software.inl.fr/trac/trac.cgi/wiki/EdenWall/NuApplet2 Package: nuapplet Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: Graphical client for NuFW NuApplet2 is a systray application for the authenticating firewall NuFW, written in Qt. . It is compliant with FreeDesktop and can be used with several desktop environments. nuapplet-2.3.0/debian/copyright000066400000000000000000000022741137423255200165320ustar00rootroot00000000000000This package was debianized by Pierre Chifflier on Fri, 26 Oct 2007 09:45:11 +0200. It was downloaded from http://software.inl.fr/trac/trac.cgi/wiki/EdenWall/NuApplet2 Upstream Author: Laurent Deffert Copyright (C) 2007 INL License: This package 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 dated June, 1991. This package 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 package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA. On Debian GNU/Linux systems, the complete text of the GNU General Public License can be found in `/usr/share/common-licenses/GPL'. The Debian packaging is (C) 2007, Pierre Chifflier and is licensed under the GPL, see `/usr/share/common-licenses/GPL'. nuapplet-2.3.0/debian/dirs000066400000000000000000000000101137423255200154450ustar00rootroot00000000000000usr/bin nuapplet-2.3.0/debian/docs000066400000000000000000000000171137423255200154430ustar00rootroot00000000000000CMakeLists.txt nuapplet-2.3.0/debian/nuapplet.manpages000066400000000000000000000000231137423255200201320ustar00rootroot00000000000000debian/nuapplet2.1 nuapplet-2.3.0/debian/nuapplet2.1000066400000000000000000000023251137423255200165700ustar00rootroot00000000000000.\" Hey, EMACS: -*- nroff -*- .\" First parameter, NAME, should be all caps .\" Second parameter, SECTION, should be 1-8, maybe w/ subsection .\" other parameters are allowed: see man(7), man(1) .TH NUAPPLET 1 "octobre 26, 2007" .\" Please adjust this date whenever revising the manpage. .\" .\" Some roff macros, for reference: .\" .nh disable hyphenation .\" .hy enable hyphenation .\" .ad l left justify .\" .ad b justify to both left and right margins .\" .nf disable filling .\" .fi enable filling .\" .br insert line break .\" .sp insert n+1 empty lines .\" for manpage-specific macros, see man(7) .SH NAME nuapplet \- Graphical client for NuFW .SH SYNOPSIS .B nuapplet .SH DESCRIPTION .B nuapplet is a systray application for the authenticating firewall NuFW written in Qt. It is compliant with FreeDesktop and can be used with several desktop environments. .PP .SH SEE ALSO .BR nufw (1), .BR nuauth (1), .BR http://software.inl.fr/trac/trac.cgi/wiki/EdenWall/NuApplet2 .br .SH AUTHOR nuapplet was written by INL. .PP This manual page was written by Pierre Chifflier , for the Debian project (but may be used by others). nuapplet-2.3.0/debian/rules000077500000000000000000000032471137423255200156600ustar00rootroot00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 configure: configure-stamp configure-stamp: dh_testdir # Add here commands to configure the package. touch configure-stamp build: build-stamp build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. $(MAKE) release #docbook-to-man debian/nuapplet.sgml > nuapplet.1 touch $@ clean: dh_testdir dh_testroot rm -f build-stamp configure-stamp # Add here commands to clean up after the build process. $(MAKE) clean rm -f lang/nuapplet2_fr_FR.qm dh_clean install: build dh_testdir dh_testroot dh_clean -k dh_installdirs # Add here commands to install the package into debian/nuapplet. cd release && $(MAKE) DESTDIR=$(CURDIR)/debian/nuapplet install # Build architecture-independent files here. binary-indep: build install # We have nothing to do by default. # Build architecture-dependent files here. binary-arch: build install dh_testdir dh_testroot dh_installchangelogs dh_installdocs dh_installexamples # dh_install dh_installmenu # dh_installdebconf dh_installman dh_link dh_strip dh_compress dh_fixperms # dh_makeshlibs dh_installdeb dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb binary: binary-indep binary-arch .PHONY: build clean binary-indep binary-arch binary install configure nuapplet-2.3.0/images/000077500000000000000000000000001137423255200146155ustar00rootroot00000000000000nuapplet-2.3.0/images/bouclier.png000066400000000000000000000352051137423255200171340ustar00rootroot00000000000000PNG  IHDR>abKGD pHYsqq{btIME $0 IDATxw|TUwJ&Lz'R "`W\(.ׂeź}ݵk[W{+"tiJzd=?nɝL2(^7sd|)9ϑ !6I.7II2ǀ@t5g_w8"28jYz'/_ks߁3C>lV ࣱٸq>_{/B4#L-,h>Dnu! ȀO?WplVN@7`70x\ EFVޏkW_,~>^v0Oӵ]2xR7<7QIwp=z*VArH @9*eӦ? -HyysKkV ! /fGglQr0$U2a x/ BxM|w,_`vBг nrSg23S9\rT8cAC ѫTWdi!חv˝B%P >369㌉\}'AG` £UU!᥵_nd|M n|9]#$Ӏ3c^%gҒ;v$]4矃cBfm0Vh6 (i,!s|,֭ R'{8P?;T=YUd1^W^/mmm~ֿ_MEF~*x ƠG4;{ <-m[u_櫓CZmB HKs0bD_{3tH;y Y$*hK A2 lP7.TXZZʫsyoRRRjPG&rss2dYYYȲ̾}رcEEEx<?\xw'+<`pހBp)*A,6`*^.֮meV֭k2 yYucɪ Hf?tܤ}0@kjXx >_|ώgС 2hpeY1=ر{ P'8 .ϔ;+>pU*#tOo[Z%*!DzDmOM?M,b5N-ld'ԃ D%Q*5M~v{شi3˖-+;Qb!;;\G\\.HGp8 2ANii)%%%rhhheU,X Ib&O.` }:4E$$Z8g-)ܥ@N DR Q?CݻzZ֬Ykٰa#nw缋xrrrˣO>DDD I&-`# !0L:_gFvv6}P]]MYY466"˂Uvjnuqe2L1$oτq@|$69btS=@f&HF@J MYk֬g͚u^ڠc6 ''1Lf]lMkC΁̓Jbb" Ae<|v?&MbFJbXbq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ƀ^7|oIM(jzÞ7zd254x7c䧭oyK@ي,3͏uKIu V}%)q;MYX4_L=Y|rA-9Y8uaHNR]-PNwY)h<(5K 0s 5`:*BAr-8lhkdžڨŎ6q#9tYSIsZ706GL^!x< /|>j$νub=^#[J{mrp S3E*"+Ks'F[sxco))QLCc 㥧ƻ,շvorXd\/ OV1AqIENDB`nuapplet-2.3.0/images/nuapplet2-stopped.png000066400000000000000000000016021137423255200207100ustar00rootroot00000000000000PNG  IHDRabKGD pHYsHHFk>"IDAT8uS]hg~{|Mj&]J%ٌsU4Ebf*n+؍7^l!"W1?X4Ɵmc*q6I&_}]su<9C0t?z d7Oi??(L&mmm:=o׸E:Xp-4A&F$&r}:weғ)I_ymWIVHoAtn<c 7Gȑ Đ6_Le9tN(b"HtTUѺ ̈јɧPk| 9]hjFI8s(܈ods V v'@xweDpBu]q!d2TG wA>k 2fgsbk*Rx:+?>,`CfjIpT)W_gp̛_v\{ӈ.|c `߆o2:@H7_ɓy7-y 8~,V-gp(bCf1*O0ppRkW5wUZVŽ3x YtWsBx\?BѶ}&[?W0V,!QHfdO]4l :r^`CϺÿ[E"tV *vp:pO{oSb&ӵ:EM]L-o]OCYCxM+bT+G 7 TwewwqEkS  /o^,ԳxgZ` H dD`4IENDB`nuapplet-2.3.0/images/nuapplet2-trying.png000066400000000000000000000016061137423255200205520ustar00rootroot00000000000000PNG  IHDRabKGD pHYsHHFk>&IDAT8uSmhSg=Mmۏ,mӖFikV[tVKQA1럕`1 EhVŶPDXa,Xٮh&ɽ?Zs vY#n\㓉k7C3P?,8\[Ֆ EErBS`Hc/xE=c az̞Hs@Ի*ScT ?6!BP$VxL}T'%J4FOAfX k1g: 0 󰚗u8bn师w!"*8*mO (:v!pK4+Ys*I8p?FVpsYH($IB2 01NcB\ex%-PÍ0ID(&cP&pry0Ѓg9MEIՔc>wlW-(-~I%`v=#=|7ByCx:PI6²ɌZ\ ,ǁSwH8=5}1mF3s5"P+g,;:=y(-V_9Mˬ_\)%|!oEE4/~^@ߟNf]h &el6nyyy9w3>vw6xP̷#_UB _ UMX[|%'ԛ:un0YkiĕͬN#NhR zqK [oMz{:x^"?HSF.OXIENDB`nuapplet-2.3.0/lang/000077500000000000000000000000001137423255200142715ustar00rootroot00000000000000nuapplet-2.3.0/lang/nuapplet2_fr_FR.ts000066400000000000000000000271641137423255200176430ustar00rootroot00000000000000 AppPreferences NuApplet Preferences Paramêtres de NuApplet Authentication Authentification Authentication Server Serveur d'authentification Hostname Nom d'hôte Port Port Certificates Certificats Certificate Authority Autorité de certification Trusted Certificate Authority Autorité de certification de Confiance Verify remote server certificate Vérifier le certificat du serveur Check remote FQDN Vérifier le nom DNS (FQDN) du serveur ... ... Certificate Revocation List (CRL) Liste de Certificats Révoqués (CRL) Client Certificate Certificat Client Send a client certificate Envoyer un Certificat Client Client Certificate File Fichier du Certificat Client Client Key File Clé du Certificat Client Authenticate using certificate Utiliser un Certificat pour s'authentifier Advanced Avancé Advanced options Options avancées Load plugins Charger les plugins LogsWindow NuApplet logs Logs de NuApplet NuAppAuthDialog Username Nom d'utilisateur Password Mot de passe Authentication Authentification NuAppPreferences Hostname Nom d'hôte Port Port Authentication server Serveur d'authentification Use certificates Utiliser un certificat Current key: Clé actuelle: Select key... Choisir une clé... Current certificate: Certificat actuel: Select certificate... Choisir un certificat... Current CA certificate: Certificat de la CA actuel: Select CA certificate... Choisir le certificat de la CA... Certificate authentication Authentification par certificat Preferences Préférences None Aucun Select key Choisir une clé Key (*.key *.pem);;All Files (*) Clé (*.key *.pem);;Tous les fichiers (*) Select certificate Choisir un certificat Key (*.crt *.pem);;All Files (*) Clé (*.key *.pem);;Tous les fichiers (*) Select CA certificate Choisir un certificat de CA Certficate (*.crt *.pem);;All Files (*) Certificate (*.crt *.pem);;All Files (*) Select CRL CRL (*.crl *.pem);;All Files (*) NuAppSystray &Connect &Connecter Ctrl+C Ctrl+C Connect to the authentication server Se connecter au serveur d'authentification &Disconnect &Déconnecter Ctrl+D Ctrl+D Disconnect from the authentication server Se déconnecter du serveur d'authentification &Preferences &Préférences Preferences Préférences &About &À propos Ctrl+A Ctrl+A About À propos &Quit &Quitter Ctrl+Q Ctrl+Q Quit application Quitter l'application Error Erreur Unable to connect. Error was: Impossible de se connecter. Cause: Connection succeeded La connexion a réussi You are now connected to Vous êtes maintenant connecté à Warning Attention You have been disconnected Reason: Vous avez été déconnecté Cause: NuApplet 2.0 edited by <a href="http://inl.fr/">INL</a> NuApplet 2.0 édité par <a href="http://inl.fr/">INL</a> Unable to connect. Check your username and your password are alright. Error was: Impossible de se connecter. Vérifiez votre nom d'utilisateur et votre mot de passe. L'erreur est: Unable to connect. Check your username and your password are correct. Error is: Impossible de se connecter.Vérifiez votre nom d'utilisateur et votre mot de passe.L'erreur est: NuApplet 2 edited by <a href="http://www.inl.fr/">INL</a>.<br>Distributed under the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a><br> NuApplet 2 édité par <a href="http://inl.fr/">INL</a> &Log messages Fenêtre de &Logs Show log messages Afficher les messages de log Nuapplet isn't totally strict about TLS verifications. Run it from a terminal to see any warning that could happen. NuApplet ne va pas vérifier les certificats TLS de manière stricte. Lancez-le depuis un terminal pour vérifier les erreurs possibles. Unable to connect. Check your username and your password are correct. Impossible de se connecter. Vérifiez que votre nom d'utilisateur et mot de passe sont corrects. NuApplet %1 edited by <a href="http://www.edenwall.com/">EdenWall Technologies</a>.<br>Distributed under the <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a><br> NuApplet %1 édité par <a href="http://www.edenwall.com/">EdenWall Technologies</a>.<br>Distribué sous les termes de la <a href="http://www.gnu.org/copyleft/gpl.html">GPL</a><br> nuapplet-2.3.0/nuapplet2.desktop000066400000000000000000000003351137423255200166560ustar00rootroot00000000000000[Desktop Entry] Version=2.0 Encoding=UTF-8 Type=Application Name=NuApplet GenericName=NuFW Client Comment=QT NuFW Client Icon=nuapplet2-running.png Exec=nuapplet2 Terminal=false StartupNotify=false Categories=Network; nuapplet-2.3.0/osx/000077500000000000000000000000001137423255200141615ustar00rootroot00000000000000nuapplet-2.3.0/osx/NuApplet2.app/000077500000000000000000000000001137423255200165525ustar00rootroot00000000000000nuapplet-2.3.0/osx/NuApplet2.app/Contents/000077500000000000000000000000001137423255200203475ustar00rootroot00000000000000nuapplet-2.3.0/osx/NuApplet2.app/Contents/Info.plist000066400000000000000000000016501137423255200223210ustar00rootroot00000000000000 CFBundleDevelopmentRegion English CFBundleExecutable nuapplet2 CFBundleGetInfoString 2.1 Copyright © 2004-2007 INL. All Rights Reserved. CFBundleIconFile NuApplet2.icns CFBundleName NuApplet2 CFBundlePackageType APPL CFBundleShortVersionString 2.1 LSMinimumSystemVersion 10.4.0 NSHumanReadableCopyright Copyright © 2004-2007 INL. All Rights Reserved. NSMainNibFile MainMenu NSPrincipalClass PVApplication nuapplet-2.3.0/osx/NuApplet2.app/Contents/Resources/000077500000000000000000000000001137423255200223215ustar00rootroot00000000000000nuapplet-2.3.0/osx/NuApplet2.app/Contents/Resources/NuApplet2.icns000066400000000000000000001343061137423255200250200ustar00rootroot00000000000000icnsit32x S<-3Zz*0n"^Հc 9b#W~92{SQm,1uՌЈJ%RڄƍW#D{fj!̗c.;j% p߀Ӣm8 !AgQ %z߄ثwBGm$PmkN(1߈ܶKxI =isrqqoniH"<ߍV!ʀ6)Xuv uttrqpnldA*qߐ__Boyxxwutsqomki]:TߐuȈ=$Fjyz{||}}||{{zxwvtrpnlifd\@"8~ߐۤn7 1Trxy{|}~~~}|zxwuspnlifc`^YD) BFJNRVZ^bfimqux|0~Lcd`\XT0/840,($i mfgr*/37;?CGKOSW[_cgkorvz~gIJMP\ko ?ea]YCt7951-($ "μ  qfh^ +048<@DHLPTX\`dhlptx|I /963. L:Bfb^Z.>:61-)%!xf rsfiJ ,049=AEIMQUY]afimquy} NB BRMc_SJD:62.*&U _v`k=-159=BFJNRVZ^bfkorwz~$4߲I Ztj&!d`4K:73/+"@a Ky`l:-26:>BGKOSW[_cglptx|}Z6v١&,<YQ09<840(0 =|`m9.26;?CGKOTX\`dhlquy}m$Sn:1 " =84-#\  :`o7/37;?DHLPTY]aeimrvz~ ևA@0=9. 7`q6/37<@DHMQUY]afjnrvz+sޭ5cTWW>,-N 4`m5/48<@EIMQUZ^bfkosw{5jv i #&C  %fZ3048BGKOkZd ܅2cw159=BFJIx_1! =qv\|" (a\-49=AEIM0#8P\c_L7  @N{" Ìg=%48<@DHLPTX\`dhlptvR-q; j_37;?CGKOSW[_cgkorvz~b)&[e Ӏ^%26:>BFJNRVZ^bfimqux|i9|y fb^159=AEIMQUY]`dhlosucK/:CЅ7cQ+48<@DHLPTW[_cdL4#'D|7 (c37;?CGJNRVZE%B ^Y*26:=AEIMQC}, rQg048<@DHJ#^e ʅ=KV(37;?BE~3N $ T269=AI!  [Y: 048<,> wtX)369 סaW`juu ЅB$V15$'" :ǒQ  G TM03"(CHLOSVVHS̩X.  `<$25-8@CGJMPTN%B   օ@T037:>AEHKM0j)'$"&,.*'# SZ`+259:730,)%" MQ037:=A< 8-,B?<851.*'$  څ2 ؀TN,158;4E+C@=:630,)%" sX/36+RACA>;841.*'$   Ѕs#PC,1)I EB?<962/,(%" f N. q6B@<:630-*&#  ȅ+߁K8]b-Cݻ C@=:741.+($! Y/߁M" ߥB~ۀ!3>;852/,)&" 5߁UEr;,7:<8SF ic2630-*'$  c>݁߀I+25781ߗdF,DWRC..+($! х>݂H-025߹C('%" M݁F.&-0&}喀pF  4 ׂH߲ *- #5I{n AsDvQ%F qÅC;" +:v6 8ۅEA467 wC7 Ɔq? %/135@/ " ֆ=m *,.02RL637 bFX1"')+-/#&:IQZcksyP310%aj Cچ C&(*,. 1^qm10/-+( 3Ն 1&')+,./.-*&#! "-,*(&%#   %Ά2+ֆ!#&()+,-/00123343) &+*)'%$"  ći]- !%&()*+--./010//.,,+*)'&$#! D$%&')**+,,--.-,++*)('%$#!  4ˇ a"#$%&'())*)(('&%$#!  Pׇ3  !"#$%&&'&&%$$#"! rEɈ  !"##$##"!!  X+ш   !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P  F UL03"(CHLOSVVHS˨W.  `<$25-8@CGJMPTN%A   Յ@]037:>AEHKM0j)'$"&,.*'# RS`+259:730,)%" MQ037:=A< 8-,B?<851.*'$  م2[ N,158;4E+C@=:630,)%" rO/36+R@CA>;841.*'$   υs#PC,1)I߽ EB?<962/,(%" e N. p6B@<:630-*&#  Dž+ށK8]b-Cݻ C@=:741.+($! X/ށM" ߥB~ڀ!3>;852/,)&" 5߁UEr;,7:<8SF hb2630-*'$  c=܁ހI+25781ߗdF,DWRB..+($! Ѕ>܁I-025߹C('%" M܁F.&-0&}喀pF߀  3 ւHޱ *- #5I{n AsDuQ%F q…C;" +:u5 8څEA467 wC6 ņp? %/135@/ " Ն=m *,.02RL637 bFW1"')+-/#&:IQZcksyO310%aj Cن C&(*,. 1^qm10/-+( 2Ԇ 1&')+,./.-*&#! "-,*(&%#   %͆2*Ն!#&()+,-/00123343) &+*)'%$"  Çh\, !%&()*+--./010//.,,+*)'&$#! D$%&')**+,,--.-,++*)('%$#!  3ʇ `"#$%&'())*)(('&%$#!  Pև3  !"#$%&&'&&%$$#"! qDȈ  !"##$##"!!  W*Ј   !  l:ֈ ( (‰EֈR Xщ;҉!   -1Ήo ڊs(Ɋ9  Xˊb ‹   ,SX  ڋ<yb  %ԌKҌtA%Ն" ]N ۍۘWyϏ#2Oi՝| (OɗQ~ 6*Iږ67{&׃a yܧG ^,;( l¿`! FT%zH O¿= /¿t9%LF+n$Q&G){Y/ *i-¿}wrm[5 G1ztohc]WD+7j5ޥY[¿|vqke^YRLE?2! ,Uy!(^~wrlg`ZTNGA:4--+! -Lr K d¿ytnhb\VPHB;5-,# ! +Gjw$PmkN('i{vojd^WQJD=5/-,%"KߚE =isrqqoniH".k|wqke_YRLE?71-'!\}4)Xuv uttrqpnldAP~yrmg`ZTMGA92-m]Boyxxwutsqomki]: 8dytnha\UNHA:4-#ą<$Fjyz{||}}||{{zxwvtrpnlifd\@""Jh~{uohc]VPHB;4-ՠk6 1Trxy{|}~~~}|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Z^bfimqux|i8{upkf`[VQLFA<715:@EJOUZ_djotyêjo #-bF>159=AEIMQUY]`dhlosucK/:t{upkf`[VQLFA<715:@EJOUZ_djoty>*- c$~f+48<@DHLPTW[_cdL4#'Bt{upkf`[VQLFA<715:@EJOUZ_djotyӚ2 -+c z~37;?CGJNRVZE%A¶{upkf`[VQLFA<715:@EJOUZ_djotyͨ -"`cz~26:=AEIMQCzĿ{upkf`[VQLFA<715:@EJOUZ_djoty' -Y=vz~?048<@DHJ#]Ŀ{upkf`[VQLFA<715:@EJOUZ_djotyW )- arvz~b(37;?BE}Ŀ{upkf`[VQLFA<715:@EJOUZ_djoty+B -,[nrvz~269=AĿ{upkf`[VQLFA<715:@EJOUZ_djoty~<  -#^Unrvy|" 048<,>Ŀ{upkf`[VQLFA<715:@EJOUZ_djoty -^.jnquy|P)369 Ԟ_V]fp·{upkf`[VQLFA<715:@EJOUZ_djoty` *- _ ehmqtwz~y15$'" :w{upkf`[VQLFA<715:@EJOUZ_djotyp@  -+\Jehlosvy|)03"(CHLOSVVHO{upkf`[VQLFA<715:@EJOUZ_djotwiknqmZ@# -E"`dgknqtwT$25-8@CGJMPTN%ú{upkf`[VQLFA<715:@EJOUZ_djoy.  +- ]Z_cfjlors 037:>AEHKM0eȿ{upkf`[VQLFA<715:@EJOUZ_djpS)'$"&,.*'# -)Z9Z^aehknq0+259:730,)%" -\VY\`cehk^037:=A< 7Ŀ{upkf`[VQLFA<715:@EJOUZ_dk ,B?<851.*'$  ,- [KTWZ^adgj$,158;4DĿ{upkf`[VQLFA<715:@EJOUZ_g C@=:630,)%" -'X*NQVY\^adT/36+QĿ{upkf`[VQLFA<715:@EJOUZe*CA>;841.*'$  *-Y HLPSVY\^a,1)HĿ{upkf`[VQLFA<715:@EJOUZ] EB?<962/,(%" -,V*GKNQTWY\H. Ŀ{upkf`[VQLFA<715:@EJOU\?6B@<:630-*&#  (-W BEHLNQTVY\`-A{upkf`[VQYXUI715:@EJOUa C@=:741.+($! - T*?BFHLNQSB" ź{upkf`[bZ/D715:@EJOU]D3>;852/,)&" '-! :=ACFHLNPEq;,7:<8PĿ{upkfk`3 8:15:@EJOUZ`c82630-*'$  - R&7;=ABEHJE+25780Ŀ{upkqaG0$DW.>15:@EJOUZ_dlb)..+($! *-$Q 257:=?BDG*-025Ŀ{upkfcb_^VK-G15:@EJOUZ_djovY'%" -O /247:\_djoty} -'+-= *,.02Hysmg`[VQLFA<76!63Iejotya --1')+-/##0:=BGJMOU`b[PHA<::%310%0CUW:  ,-- , &(*,.  4bqT1 tTP w8%JPp7]#:km| s.h.b K<PCb (8*W%g(?w!?j EE n}>_Anuapplet-2.3.0/src/000077500000000000000000000000001137423255200141375ustar00rootroot00000000000000nuapplet-2.3.0/src/auth_dlg.cpp000066400000000000000000000061601137423255200164350ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include "systray.h" #include "auth_dlg.h" #include "auth_dlg.moc" /* * See http://doc.trolltech.com/4.3/mainwindows-application.html */ NuAppAuthDialog::NuAppAuthDialog(QObject* _parent) : QDialog(NULL, Qt::Dialog), parent(_parent) { createDialog(); resize(250, 10); } void NuAppAuthDialog::createDialog() { settings.sync(); // Logo QPixmap logo(":/images/bouclier.png"); QLabel* logo_label = new QLabel(); logo_label->setPixmap(logo); logo_label->setAlignment(Qt::AlignHCenter); // Username QLabel *usernameLabel = new QLabel( tr("Username")); username = new NuEditBox(); username->setFocus(); QObject::connect(username, SIGNAL(returnPressed()), this, SLOT(get_user_infos())); QObject::connect(username, SIGNAL(escapePressed()), this, SLOT(reject())); // Password QLabel *passwordLabel = new QLabel( tr("Password")); password = new NuEditBox(); password->setEchoMode(QLineEdit::Password); QObject::connect(password, SIGNAL(returnPressed()), this, SLOT(get_user_infos())); QObject::connect(password, SIGNAL(escapePressed()), this, SLOT(reject())); QVBoxLayout *v_layout = new QVBoxLayout(); v_layout->addWidget(usernameLabel); v_layout->addWidget(username); v_layout->addWidget(passwordLabel); v_layout->addWidget(password); QDialogButtonBox *buttonBox = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel, Qt::Horizontal); v_layout->addWidget(buttonBox); QHBoxLayout *h_layout = new QHBoxLayout(this); h_layout->addWidget(logo_label); h_layout->addLayout(v_layout); QObject::connect(this, SIGNAL(start_auth(QString, QString)), parent, SLOT(start_auth(QString, QString))); QObject::connect(buttonBox, SIGNAL(accepted()), this, SLOT(get_user_infos())); QObject::connect(buttonBox, SIGNAL(rejected()), this, SLOT(reject())); QIcon icon = QIcon(":/images/nuapplet2-running.png"); setWindowIcon(icon); setWindowTitle(tr("Authentication")); } void NuAppAuthDialog::get_user_infos() { settings.setValue("username", username->text()); settings.sync(); emit start_auth(username->text(), password->text()); password->setText(""); accept(); } void NuAppAuthDialog::show() { if(settings.value("username").toString() != "") password->setFocus(); username->setText(settings.value("username").toString()); QDialog::show(); } nuapplet-2.3.0/src/auth_dlg.h000066400000000000000000000024761137423255200161100ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __AUTH_DLG__ #define __AUTH_DLG__ #include #include #include #include "editbox.h" class NuAppAuthDialog : public QDialog { Q_OBJECT QSettings settings; NuEditBox *username; NuEditBox *password; QObject *parent; public: NuAppAuthDialog (QObject* _parent); public slots: void get_user_infos(); void show(); signals: void start_auth(QString username, QString password); private: void createDialog(); }; #endif /* __AUTH_DLG__ */ nuapplet-2.3.0/src/editbox.cpp000066400000000000000000000020741137423255200163040ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "editbox.h" #include "editbox.moc" void NuEditBox::keyPressEvent(QKeyEvent* key) { if(key->key() == Qt::Key_Escape) { emit escapePressed(); key->accept(); return; } QLineEdit::keyPressEvent(key); } nuapplet-2.3.0/src/editbox.h000066400000000000000000000020521137423255200157450ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __EDITBOX__ #define __EDITBOX__ #include class NuEditBox : public QLineEdit { Q_OBJECT signals: void escapePressed(); protected: void keyPressEvent(QKeyEvent* key); }; #endif /* __EDITBOX__ */ nuapplet-2.3.0/src/logs.cpp000066400000000000000000000027161137423255200156150ustar00rootroot00000000000000/* ** Copyright 2004-2009 - INL ** Written by Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "logs.h" #include "logs.moc" #include extern "C" { extern int debug_level; } NuLogsWindow::NuLogsWindow(QWidget *parent) { ui = new Ui::LogsWindow(); ui->setupUi(this); } void NuLogsWindow::addLine(int area, int level, char *format, va_list args) { QString msg, text; QDateTime date = QDateTime::currentDateTime(); const char *dateformat = "yyyy-MM-dd hh:mm:ss.zzz"; msg.vsprintf(format, args); text = QString("[%1] %2").arg(date.toString(dateformat)).arg(msg); ui->edit->append( text ); ui->edit->textCursor().movePosition(QTextCursor::End); ui->edit->ensureCursorVisible(); } void NuLogsWindow(int level) { debug_level = level; } nuapplet-2.3.0/src/logs.h000066400000000000000000000021651137423255200152600ustar00rootroot00000000000000/* ** Copyright 2004-2009 - INL ** Written by Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __LOGS__ #define __LOGS__ #include namespace Ui { class LogsWindow; }; class NuLogsWindow : public QWidget { Q_OBJECT public: NuLogsWindow(QWidget *parent = NULL); void addLine(int area, int level, char *format, va_list args); void setLogLevel(int level); protected: Ui::LogsWindow *ui; }; #endif /* __LOGS__ */ nuapplet-2.3.0/src/main.cpp000066400000000000000000000055021137423255200155710ustar00rootroot00000000000000/* ** Copyright 2004-2010 - EdenWall Technologies ** Written by Eric Leblond ** Vincent Deffontaines ** Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include /* setrlimit() */ #include #include #include #include #include //#include //#include extern int debug_areas; extern int debug_level; extern int log_engine; #include "systray.h" using std::cout; nuclient_error_t *err = NULL; void init_library() { struct rlimit core_limit; /* Avoid creation of core file which may contains username and password */ if (getrlimit(RLIMIT_CORE, &core_limit) == 0) { core_limit.rlim_cur = 0; setrlimit(RLIMIT_CORE, &core_limit); } /* Prepare error structure */ if (nu_client_error_init(&err) != 0) { fprintf(stderr, "Cannot init error structure!\n"); exit(EXIT_FAILURE); } /* XXX default values: log to stdout, normal level */ log_engine = 1; debug_level = 3; debug_areas = 31; /* global libnuclient init */ if (!nu_client_global_init(err)) { fprintf(stderr, "Unable to initiate nuclient library!\n"); #if (defined(NUCLIENT_VERSION_MAJOR) && NUCLIENT_VERSION_MAJOR>=4) fprintf(stderr, "Problem: %s\n", nu_client_strerror(NULL, err)); #else fprintf(stderr, "Problem: %s\n", nu_client_strerror(err)); #endif exit(EXIT_FAILURE); } #if (defined(NUCLIENT_VERSION_MAJOR) && NUCLIENT_VERSION_MAJOR>=4) nu_client_init_config(); nu_client_init_plugins(); #endif } int main(int argc, char **argv) { init_library(); /* needed by iconv */ setlocale(LC_ALL, ""); QApplication app(argc, argv); app.setOrganizationName("EdenWall"); app.setApplicationName("NuApplet"); app.setQuitOnLastWindowClosed(false); /* load translation */ QString locale = QLocale::system().name(); QTranslator translator; translator.load(QString(":/lang/nuapplet2_") + locale); //printf("Loading translation: nuapplet2_%s.qm\n", locale.toStdString().c_str()); app.installTranslator(&translator); NuAppSystray nuapplet2; return app.exec(); } nuapplet-2.3.0/src/preferences.cpp000066400000000000000000000147321137423255200171530ustar00rootroot00000000000000/* ** Copyright 2004-2009 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include "preferences.h" #include "preferences.moc" #include "editbox.h" #include NuAppPreferences::NuAppPreferences() : QDialog(NULL, Qt::Dialog) { ui = new Ui::AppPreferences(); ui->setupUi(this); load_preferences(); createDialog(); } void NuAppPreferences::createDialog() { // Set initial values *before* connecting slots, or you will go in // an infinite loop setCertificateButtons(); connect(ui->cert_verify_remote, SIGNAL(stateChanged(int)), this, SLOT(switch_verify_remote(int))); connect(ui->cert_use_client_cert, SIGNAL(stateChanged(int)), this, SLOT(switch_use_client_cert(int))); connect(ui->ca_open, SIGNAL(pressed()), this, SLOT(popup_open_ca())); connect(ui->cert_open, SIGNAL(pressed()), this, SLOT(popup_open_cert())); connect(ui->key_open, SIGNAL(pressed()), this, SLOT(popup_open_key())); connect(ui->crl_open, SIGNAL(pressed()), this, SLOT(popup_open_crl())); connect(this, SIGNAL(accepted()), this, SLOT(save_preferences())); QIcon icon = QIcon(":/images/nuapplet2-running.png"); setWindowIcon(icon); } void NuAppPreferences::setCertificateButtons() { bool cert_verify_remote = (ui->cert_verify_remote->checkState() == Qt::Checked); if (cert_verify_remote) { ui->ca_label->setEnabled(true); ui->ca_path->setEnabled(true); ui->ca_open->setEnabled(true); ui->crl_label->setEnabled(true); ui->crl_path->setEnabled(true); ui->crl_open->setEnabled(true); ui->cert_check_fqdn->setEnabled(true); } else { ui->ca_label->setEnabled(false); ui->ca_path->setEnabled(false); ui->ca_open->setEnabled(false); ui->crl_label->setEnabled(false); ui->crl_path->setEnabled(false); ui->crl_open->setEnabled(false); ui->cert_check_fqdn->setEnabled(false); } bool cert_use_client_cert = (ui->cert_use_client_cert->checkState() == Qt::Checked); if (cert_use_client_cert) { ui->cert_label->setEnabled(true); ui->cert_path->setEnabled(true); ui->cert_open->setEnabled(true); ui->key_label->setEnabled(true); ui->key_path->setEnabled(true); ui->key_open->setEnabled(true); ui->cert_auth_by_cert->setEnabled(true); } else { ui->cert_label->setEnabled(false); ui->cert_path->setEnabled(false); ui->cert_open->setEnabled(false); ui->key_label->setEnabled(false); ui->key_path->setEnabled(false); ui->key_open->setEnabled(false); ui->cert_auth_by_cert->setEnabled(false); } } void NuAppPreferences::show() { load_preferences(); setCertificateButtons(); QDialog::show(); } void NuAppPreferences::load_preferences() { QString str; settings.sync(); ui->hostname->setText(settings.value("hostname").toString()); ui->port->setText(settings.value("port").toString()); bool cert_verify_remote = settings.value("cert_verify_remote").toBool(); ui->cert_verify_remote->setCheckState(cert_verify_remote ? Qt::Checked : Qt::Unchecked); bool cert_check_fqdn = settings.value("cert_check_fqdn").toBool(); ui->cert_check_fqdn->setCheckState(cert_check_fqdn ? Qt::Checked : Qt::Unchecked); bool cert_use_client_cert = settings.value("cert_use_client_cert").toBool(); ui->cert_use_client_cert->setCheckState(cert_use_client_cert ? Qt::Checked : Qt::Unchecked); bool cert_auth_by_cert = settings.value("cert_auth_by_cert").toBool(); ui->cert_auth_by_cert->setCheckState(cert_auth_by_cert ? Qt::Checked : Qt::Unchecked); str = settings.value("ca").toString(); ui->ca_path->setText(str); str = settings.value("cert").toString(); ui->cert_path->setText(str); str = settings.value("key").toString(); ui->key_path->setText(str); str = settings.value("crl").toString(); ui->crl_path->setText(str); settings.sync(); } void NuAppPreferences::switch_use_client_cert(int state) { setCertificateButtons(); } void NuAppPreferences::switch_verify_remote(int state) { setCertificateButtons(); } void NuAppPreferences::save_preferences() { settings.setValue("hostname", ui->hostname->text()); settings.setValue("port", ui->port->text()); bool cert_verify_remote = (ui->cert_verify_remote->checkState() == Qt::Checked); settings.setValue("cert_verify_remote", cert_verify_remote); bool cert_check_fqdn = (ui->cert_check_fqdn->checkState() == Qt::Checked); settings.setValue("cert_check_fqdn", cert_check_fqdn); settings.setValue("ca", ui->ca_path->text()); settings.setValue("crl", ui->crl_path->text()); settings.setValue("cert_use_client_cert", ui->cert_use_client_cert->checkState() == Qt::Checked); settings.setValue("key", ui->key_path->text()); settings.setValue("cert", ui->cert_path->text()); settings.setValue("cert_auth_by_cert", ui->cert_auth_by_cert->checkState() == Qt::Checked); settings.sync(); //accept(); } void NuAppPreferences::popup_open_key() { QString fileName = QFileDialog::getOpenFileName(this, tr("Select key"), QDir::homePath(), tr("Key (*.key *.pem);;All Files (*)")); if (fileName.length() > 0) { ui->key_path->setText(fileName); } } void NuAppPreferences::popup_open_cert() { QString fileName = QFileDialog::getOpenFileName(this, tr("Select certificate"), QDir::homePath(), tr("Certficate (*.crt *.pem);;All Files (*)")); if (fileName.length() > 0) { ui->cert_path->setText(fileName); } } void NuAppPreferences::popup_open_ca() { QString fileName = QFileDialog::getOpenFileName(this, tr("Select CA certificate"), QDir::homePath(), tr("Certificate (*.crt *.pem);;All Files (*)")); if (fileName.length() > 0) { ui->ca_path->setText(fileName); } } void NuAppPreferences::popup_open_crl() { QString fileName = QFileDialog::getOpenFileName(this, tr("Select CRL"), QDir::homePath(), tr("CRL (*.crl *.pem);;All Files (*)")); if (fileName.length() > 0) { ui->crl_path->setText(fileName); } } nuapplet-2.3.0/src/preferences.h000066400000000000000000000027701137423255200166170ustar00rootroot00000000000000/* ** Copyright 2004-2009 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __PREFERENCES__ #define __PREFERENCES__ #include #include "editbox.h" namespace Ui { class AppPreferences; }; class NuAppPreferences : public QDialog { Q_OBJECT public: NuAppPreferences (); public slots: void save_preferences(); void show(); void switch_use_client_cert(int state); void switch_verify_remote(int state); void popup_open_key(); void popup_open_cert(); void popup_open_ca(); void popup_open_crl(); protected: Ui::AppPreferences *ui; private: void load_preferences(); void createDialog(); void setCertificateButtons(); QSettings settings; }; #endif /* __PREFERENCES__ */ nuapplet-2.3.0/src/systray.cpp000066400000000000000000000236431137423255200163710ustar00rootroot00000000000000/* ** Copyright 2004-2010 - EdenWall Technologies ** Written by Eric Leblond ** Vincent Deffontaines ** Pierre Chifflier ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include "systray.h" #include "systray.moc" #include "auth_dlg.h" #include "preferences.h" #include "logs.h" extern "C" { typedef void (*log_callback_t)(int area, int priority, char *format, va_list args); extern log_callback_t nubase_log_set_callback(log_callback_t cb); extern int log_engine; extern int debug_level; } static NuLogsWindow *_logs_window = NULL; static void log_callback(int area, int priority, char *format, va_list args) { if (_logs_window != NULL) { _logs_window->addLine(area, priority, format, args); } } /* * See http://doc.trolltech.com/4.3/mainwindows-application.html */ NuAppSystray::NuAppSystray() : timer(this) { QCoreApplication* app = QCoreApplication::instance(); parse_cmdline_options(app->argc(), app->argv()); logs_dlg = new NuLogsWindow(); _logs_window = logs_dlg; pref_dlg = new NuAppPreferences(); auth_dlg = new NuAppAuthDialog(this); QObject::connect(this, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), this, SLOT(onClick(QSystemTrayIcon::ActivationReason))); QObject::connect(this, SIGNAL(showAuthDlg()), auth_dlg, SLOT(show())); // Create actions // connect connectAct = new QAction(tr("&Connect"), this); connectAct->setStatusTip(tr("Connect to the authentication server")); connect(connectAct, SIGNAL(triggered()), auth_dlg, SLOT(show())); // disconnect disconnectAct = new QAction(tr("&Disconnect"), this); disconnectAct->setStatusTip(tr("Disconnect from the authentication server")); connect(disconnectAct, SIGNAL(triggered()), this, SLOT(stop_auth())); // preferences preferencesAct = new QAction(tr("&Preferences"), this); preferencesAct->setStatusTip(tr("Preferences")); connect(preferencesAct, SIGNAL(triggered()), pref_dlg, SLOT(show())); // logs logsAct = new QAction(tr("&Log messages"), this); logsAct->setStatusTip(tr("Show log messages")); connect(logsAct, SIGNAL(triggered()), logs_dlg, SLOT(show())); // about aboutAct = new QAction(tr("&About"), this); aboutAct->setStatusTip(tr("About")); connect(aboutAct, SIGNAL(triggered()), this, SLOT(popup_about())); // exit exitAct = new QAction(tr("&Quit"), this); exitAct->setStatusTip(tr("Quit application")); connect(exitAct, SIGNAL(triggered()), qApp, SLOT(quit())); createTrayIcon(); settings.sync(); // Display the authentication dialog auth_dlg->show(); nubase_log_set_callback(log_callback); log_engine = 3; debug_level = 9; #ifdef HAVE_DEFAULT_TLS_FUNC // Load defaults settings if(strcmp(settings.value("hostname").toString().toStdString().c_str(), "") == 0) { printf("Loading default params\n"); //suppress_fqdn_verif |= nu_client_default_suppress_fqdn_verif(); const char* default_cafile = nu_client_default_tls_ca(); if (default_cafile) settings.setValue("ca", default_cafile); const char* default_cert = nu_client_default_tls_cert(); if (default_cert) settings.setValue("cert", default_cert); const char* default_key = nu_client_default_tls_key(); if (default_key) settings.setValue("key", default_key); const char* default_crl = nu_client_default_tls_crl(); if (default_crl) settings.setValue("crl", default_crl); const int default_suppress_fqdn = nu_client_default_suppress_fqdn_verif(); if (default_suppress_fqdn) settings.setValue("suppress_fqdn", default_suppress_fqdn); if(default_cafile || default_cert || default_key) settings.setValue("use_certificate", true); } #endif #ifdef HAVE_DEFAULT_HOSTNAME_FUNC // Load defaults settings if(strcmp(settings.value("hostname").toString().toStdString().c_str(), "") == 0) { const char* nuauth_ip = nu_client_default_hostname(); if(nuauth_ip != NULL) settings.setValue("hostname", nuauth_ip); const char* nuauth_port = nu_client_default_port(); if(nuauth_port != NULL) settings.setValue("port", nuauth_port); else settings.setValue("port", DEFAULT_NUAUTH_PORT); } #endif #if defined(HAVE_DEFAULT_HOSTNAME_FUNC) || !defined(HAVE_NUAUTH_IP) if(strcmp(settings.value("hostname").toString().toStdString().c_str(), "") == 0) pref_dlg->show(); #endif } NuAppSystray::~NuAppSystray() { stop_auth(); } void NuAppSystray::createTrayIcon() { if ( ! QSystemTrayIcon::isSystemTrayAvailable() ) { fprintf(stderr, "Your environnement doesn't support a system tray icon...\n"); fprintf(stderr, "Exiting ...\n"); exit(EXIT_FAILURE); } trayIconMenu = new QMenu(/*this*/); trayIconMenu->addAction(connectAct); connectAct->setEnabled(true); trayIconMenu->addAction(disconnectAct); disconnectAct->setEnabled(false); trayIconMenu->addAction(logsAct); trayIconMenu->addAction(preferencesAct); trayIconMenu->addSeparator(); trayIconMenu->addAction(aboutAct); trayIconMenu->addSeparator(); trayIconMenu->addAction(exitAct); QIcon icon = QIcon(":/images/nuapplet2-stopped.png"); setIcon(icon); show(); setContextMenu(trayIconMenu); } void NuAppSystray::usage(void) { fprintf(stderr, "usage: nuapplet2 [options...]\n"); fprintf(stderr, "\n"); fprintf(stderr, "Options:\n"); fprintf(stderr, " -H HOSTNAME: nuauth host address\n"); fprintf(stderr, " -p PORT: nuauth port number\n"); fprintf(stderr, " -U USERNAME: set default username\n"); fprintf(stderr, "\n"); fprintf(stderr, "Certificate options:\n"); fprintf(stderr, " -C CERTFILE: certificate filename\n"); fprintf(stderr, " -A AUTHFILE: authority certificate filename\n"); fprintf(stderr, " -K KEYFILE: key filename\n"); fprintf(stderr, " -R CRLFILE: crl filename\n"); fprintf(stderr, " -N: suppress error if server FQDN does not match certificate CN.\n"); fprintf(stderr, "\n"); exit(EXIT_FAILURE); } void NuAppSystray::parse_cmdline_options(int argc, char **argv) { /* Parse all command line arguments */ int ch; int opterr = 0; while ((ch = getopt(argc, argv, "H:p:U:C:K:A:R:N")) != -1) { switch (ch) { case 'H': settings.setValue("hostname", QString(optarg)); break; case 'p': settings.setValue("port", QString(optarg)); break; case 'U': settings.setValue("username", QString(optarg)); break; case 'C': settings.setValue("cert", QString(optarg)); break; case 'K': settings.setValue("key", QString(optarg)); break; case 'A': settings.setValue("ca", QString(optarg)); break; case 'R': settings.setValue("crl", QString(optarg)); break; case 'N': settings.setValue("suppress_fqdn", 1); default: usage(); } } } void NuAppSystray::onClick(QSystemTrayIcon::ActivationReason reason) { if( reason == QSystemTrayIcon::Trigger && !timer.isRunning()) { // Display the authentication dialog emit showAuthDlg(); } } void NuAppSystray::start_auth(QString username, QString password) { if(!timer.isRunning()) { timer.setUserInfos(username, password); timer.start(); showMessage(tr("Warning"), tr("Nuapplet isn't totally strict about TLS verifications.\nRun it from a terminal to see any warning that could happen."), Warning, 5000); } } void NuAppSystray::stop_auth() { // Close Nuauth connection timer.askStop(); timer.wait(ULONG_MAX); } void NuAppSystray::tray_set_connected() { disconnectAct->setEnabled(true); connectAct->setEnabled(false); //printf("Icon running\n"); QIcon icon = QIcon(":/images/nuapplet2-running.png"); setIcon(icon); } void NuAppSystray::tray_set_trying() { QIcon icon = QIcon(":/images/nuapplet2-trying.png"); setIcon(icon); //printf("Icon trying\n"); } void NuAppSystray::tray_set_stopped() { // Enable / disable menu entries disconnectAct->setEnabled(false); connectAct->setEnabled(true); // Change the icon in the systray QIcon icon = QIcon(":/images/nuapplet2-stopped.png"); setIcon(icon); //printf("Icon stopped\n"); } /** * Stupid wrapper */ const char *wrap_error_message(const char *str) { if (strncmp(str,"A TLS packet with unexpected length was received.",49) == 0) { return("Access denied"); } if (strncmp(str,"Success.",9) == 0) { return NULL; } return(str); } void NuAppSystray::tray_report_error() { QString msg = tr("Unable to connect.\nCheck your username and your password are correct."); QString str_err = ""; if(wrap_error_message(timer.GetNuclientError())) { str_err = QString("\nError is: ") + QString(wrap_error_message(timer.GetNuclientError())); } logs_dlg->show(); QMessageBox::critical(NULL, tr("Error"), msg + str_err, QMessageBox::Ok); } void NuAppSystray::tray_report_connected() { showMessage(tr("Connection succeeded"), tr("You are now connected to ") + settings.value("hostname").toString(), Information,3000 ); printf("Connnected\n"); } void NuAppSystray::tray_report_disconnected() { showMessage(tr("Warning"), tr("You have been disconnected\nReason: ") + QString(timer.GetNuclientError()), Warning,5000 ); printf("Disconnected\n"); } void NuAppSystray::popup_about() { QMessageBox msgBox; msgBox.setWindowTitle(tr("About")); msgBox.setIcon(QMessageBox::Information); msgBox.setTextFormat(Qt::RichText); msgBox.setText(tr("NuApplet %1 edited by EdenWall Technologies.
Distributed under the GPL
").arg(PROJECT_VERSION_STR) + ""); msgBox.exec(); } nuapplet-2.3.0/src/systray.h000066400000000000000000000037501137423255200160330ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __SYSTRAY__ #define __SYSTRAY__ #include #include #include #include #include "auth_dlg.h" #include "logs.h" #include "preferences.h" #include "thread_session.h" class NuAppSystray : public QSystemTrayIcon { Q_OBJECT public: NuAppSystray(); ~NuAppSystray(); public slots: void onClick(QSystemTrayIcon::ActivationReason reason); void start_auth(QString _username, QString _password); void stop_auth(); void popup_about(); void tray_set_connected(); void tray_set_stopped(); void tray_set_trying(); void tray_report_error(); void tray_report_connected(); void tray_report_disconnected(); signals: void showAuthDlg(); private: void createActions(); void createTrayIcon(); void parse_cmdline_options(int argc, char **argv); void usage(); // Authentication related QSettings settings; QMenu *trayIconMenu; // GUI related QAction *exitAct; QAction *preferencesAct; QAction *logsAct; QAction *connectAct; QAction *disconnectAct; QAction *aboutAct; ThreadCheckConn timer; NuAppAuthDialog* auth_dlg; NuLogsWindow* logs_dlg; NuAppPreferences* pref_dlg; }; #endif /* __SYSTRAY__ */ nuapplet-2.3.0/src/thread_session.cpp000066400000000000000000000135661137423255200176700ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "thread_session.h" #include "thread_session.moc" #include extern nuclient_error_t *err; /* defined in main.cpp */ ThreadCheckConn::ThreadCheckConn(QObject* _parent) : QThread(_parent) { session = NULL; username = ""; password = ""; connect(this, SIGNAL(tray_set_connected()), parent(), SLOT(tray_set_connected())); connect(this, SIGNAL(tray_set_trying()), parent(), SLOT(tray_set_trying())); connect(this, SIGNAL(tray_set_stopped()), parent(), SLOT(tray_set_stopped())); connect(this, SIGNAL(tray_report_error()), parent(), SLOT(tray_report_error())); connect(this, SIGNAL(tray_report_connected()), parent(), SLOT(tray_report_connected())); connect(this, SIGNAL(tray_report_disconnected()), parent(), SLOT(tray_report_disconnected())); } void ThreadCheckConn::askStop() { loop_mutex.lock(); loop_continue = false; loop_mutex.unlock(); } void ThreadCheckConn::setUserInfos(QString _username, QString _password) { username = _username; password = _password; // We don't know if those username/passwords are valid // so if the authentication fails, there is no need to // trying reauthenticating to Nuauth in a loop loop_continue = false; report_errors = true;; } void ThreadCheckConn::run() { startAuth(); while(1) { loop_mutex.lock(); if(!loop_continue) { loop_mutex.unlock(); break; } loop_mutex.unlock(); if(session) { // A session is opened, so check we are still connected to Nuauth if(nu_client_check(session, err) == -1) { nu_client_delete(session); session = NULL; if(report_errors) { emit tray_set_trying(); emit tray_report_disconnected(); report_errors = false; } } } else { // We have been disconnected // Restart the authentication using the last username and password used startAuth(); } } stopAuth(); } void ThreadCheckConn::startAuth() { // Stop automatic reauthentication after the connection has been lost session = nu_client_new(username.toStdString().c_str(), password.toStdString().c_str(), 1, err); nu_client_set_client_info(session, "nuapplet", "3.0"); QSettings settings; settings.sync(); // Configure certificate related parameters int cert_verify_remote = settings.value("cert_verify_remote").toBool(); int cert_use_client_cert = settings.value("cert_use_client_cert").toBool(); QString str_ca = settings.value("ca").toString(); QString str_key = settings.value("key").toString(); QString str_cert = settings.value("cert").toString(); QString str_crl = settings.value("crl").toString(); int cert_check_fqdn = settings.value("cert_check_fqdn").toBool(); if (cert_verify_remote) { if (!nu_client_set_ca(session, (const char*)str_ca.toAscii(), err)) { goto label_exit_connection; } if (cert_use_client_cert) { if (str_key.length() > 0 && !nu_client_set_key(session, (const char*)str_key.toAscii(), (const char*)str_cert.toAscii(), err)) { goto label_exit_connection; } } if (str_crl.length()>0 && !nu_client_set_crlfile(session, (const char*)str_crl.toAscii(), err)) { goto label_exit_connection; } if (!cert_check_fqdn) nu_client_set_fqdn_suppress_verif(session, 1); } else { // we don't check server certificate nu_client_set_cert_suppress_verif(session, 1); } // Connect to NuAuth char* chr_hostname; char* chr_port; #if defined(HAVE_DEFAULT_NUAUTH_IP) && !defined(HAVE_DEFAULT_HOSTNAME_FUNC) if(strcmp(settings.value("hostname").toString().toStdString().c_str(), "")==0 && session->default_hostname) { printf("setting hostname\n"); settings.setValue("hostname", session->default_hostname); } if(strcmp(settings.value("port").toString().toStdString().c_str(), "")==0 && session->default_port) settings.setValue("port", session->default_port); settings.sync(); #endif // #if defined(HAVE_DEFAULT_NUAUTH_IP) && !defined(HAVE_DEFAULT_HOSTNAME_FUNC) chr_hostname = strdup(settings.value("hostname").toString().toStdString().c_str()); chr_port = strdup(settings.value("port").toString().toStdString().c_str()); if(!nu_client_connect(session, chr_hostname, chr_port, err)) { fprintf(stderr,"%s\n", nu_client_strerror(session, err)); if(report_errors) emit tray_report_error(); free(chr_hostname); free(chr_port); if(session) nu_client_delete(session); session = NULL; return; } free(chr_hostname); free(chr_port); emit tray_set_connected(); emit tray_report_connected(); loop_continue = true; report_errors = true; return; label_exit_connection: printf("Initialization error: %s\n", nu_client_strerror(session, err)); // If the timer is active, this connection is done automatically // so we don't display the error message if(report_errors) emit tray_report_error(); if(session) nu_client_delete(session); session = NULL; return; } void ThreadCheckConn::stopAuth() { if(session) nu_client_delete(session); session = NULL; emit tray_set_stopped(); } const char* ThreadCheckConn::GetNuclientError() { #if (defined(NUCLIENT_VERSION_MAJOR) && NUCLIENT_VERSION_MAJOR>=4) return nu_client_strerror(session, err); #else return nu_client_strerror(err); #endif } nuapplet-2.3.0/src/thread_session.h000066400000000000000000000030061137423255200173210ustar00rootroot00000000000000/* ** Copyright 2004-2007 - INL ** Written by Eric Leblond ** Vincent Deffontaines ** INL http://www.inl.fr/ ** ** 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. ** ** 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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef __THREAD_CHECK__ #define __THREAD_CHECK__ #include #include class ThreadCheckConn : public QThread { Q_OBJECT nuauth_session_t *session; QString username, password; QMutex loop_mutex; bool loop_continue; bool report_errors; signals: void tray_set_connected(); void tray_set_stopped(); void tray_set_trying(); void tray_report_error(); void tray_report_connected(); void tray_report_disconnected(); protected: void run(); void stopAuth(); public: ThreadCheckConn(QObject* _parent); void setUserInfos(QString _username, QString _password); void startAuth(); void askStop(); const char* GetNuclientError(); }; #endif /* __THREAD_CHECK__ */ nuapplet-2.3.0/ui/000077500000000000000000000000001137423255200137655ustar00rootroot00000000000000nuapplet-2.3.0/ui/logs.ui000066400000000000000000000011421137423255200152660ustar00rootroot00000000000000 LogsWindow 0 0 400 300 NuApplet logs true nuapplet-2.3.0/ui/prefs.ui000066400000000000000000000223101137423255200154410ustar00rootroot00000000000000 AppPreferences 0 0 492 403 NuApplet Preferences 1 Authentication Authentication Server Hostname Port Qt::Vertical 20 40 Certificates Certificate Authority Trusted Certificate Authority Verify remote server certificate true Check remote FQDN true 0 0 ... ... Certificate Revocation List (CRL) Client Certificate Send a client certificate Client Certificate File Client Key File Authenticate using certificate 0 0 ... ... Advanced Advanced options Load plugins true Qt::Vertical 20 40 QDialogButtonBox::Cancel|QDialogButtonBox::Ok buttonBox accepted() AppPreferences accept() 384 373 367 -16 buttonBox rejected() AppPreferences reject() 452 376 410 -15