License: Apache-2.0 and BSD-3-Clause and MPL-1.1
Source0: %name-%version.tar.gz
Source1: %name.manifest
-Requires(post): /sbin/ldconfig
-Requires(post): /usr/bin/systemctl
-Requires(postun): /sbin/ldconfig
-Requires(postun): /usr/bin/systemctl
-Requires(preun): /usr/bin/systemctl
BuildRequires: cmake
-BuildRequires: gettext-tools
-BuildRequires: pkgconfig(glib-2.0)
BuildRequires: pkgconfig(dlog)
-BuildRequires: pkgconfig(libxml-2.0)
-BuildRequires: pkgconfig(libiri)
BuildRequires: pkgconfig(libcurl)
BuildRequires: pkgconfig(gnutls)
BuildRequires: pkgconfig(openssl)
-BuildRequires: pkgconfig(elementary)
-BuildRequires: pkgconfig(libsystemd-daemon)
-BuildRequires: pkgconfig(vconf)
-%{?systemd_requires}
+Requires: /sbin/ldconfig
%description
Https Public Key Pinning for Tizen platform system framework.
Tizen HPKP library development files including headers and
pkgconfig.
+%package ui
+Summary: Tizen HPKP ui daemon
+Group: Development/Libraries
+BuildRequires: pkgconfig(elementary)
+BuildRequires: pkgconfig(libsystemd-daemon)
+BuildRequires: pkgconfig(vconf)
+BuildRequires: pkgconfig(dlog)
+BuildRequires: gettext-tools
+Requires: /usr/bin/systemctl
+Requires: %name = %version-%release
+%{?systemd_requires}
+
+%description ui
+Tizen HPKP ui daemon package.
+
%if 0%{?pubkey_pinning_test_build}
%package test
Summary: Tizen HPKP library internal test
%post
/sbin/ldconfig
+
+%post ui
+/sbin/ldconfig
systemctl daemon-reload
if [ $1 == 1 ]; then
systemctl start %name-popup.socket
systemctl restart %name-popup.socket
fi
-%preun
+%preun ui
if [ $1 == 0 ]; then
systemctl stop %name-popup.service
systemctl stop %name-popup.socket
%postun
/sbin/ldconfig
+
+%postun ui
+/sbin/ldconfig
systemctl daemon-reload
-%files -f %{name}.lang
+%files
%manifest %name.manifest
%license LICENSE
%license LICENSE.BSD-3-Clause
%_libdir/libtpkp-common.so.*
%_libdir/libtpkp-curl.so.*
%_libdir/libtpkp-gnutls.so.*
+
+%files ui -f %name.lang
+%manifest %name.manifest
+%license LICENSE
%_unitdir_user/%name-popup.service
%_unitdir_user/%name-popup.socket
%_unitdir_user/sockets.target.wants/%name-popup.socket
// have some(1 second) spare to give change to popup service to timed out.
ServiceConnection connection(SOCK_PATH,
(timeout > 0) ? (timeout + 1000) : timeout);
- BinaryStream outStream = connection.processRequest(inStream);
+ BinaryStream outStream;
+ try {
+ outStream = connection.processRequest(inStream);
+ } catch (const TPKP::Exception &e) {
+ if (e.code() != TPKP_E_IO)
+ throw;
+
+ SLOGI("popup ui process request io error(%s). Popup service may not exist.", e.what());
+ return Response::ALLOW;
+ }
deserialize(pdp, outStream);
return pdp->response;
-
} catch (const TPKP::Exception &e) {
SLOGE("Exception[%d]: %s", e.code(), e.what());
return Response::ERROR;