AC_MSG_CHECKING([for Tizen dlog])
if test $enable_tizen_dlog != no;then
- AC_DEFINE(ENABLE_TIZEN_TV_DLOG, 1, [Add new feature, support to add tizen dlog in glib-networking])
+ AC_DEFINE(ENABLE_TIZEN_DLOG, 1, [Add new feature, support to add tizen dlog in glib-networking])
fi
AC_MSG_RESULT($enable_tizen_dlog)
-AM_CONDITIONAL(TIZEN_TV_DLOG, [test $enable_tizen_dlog = yes])
+AM_CONDITIONAL(TIZEN_DLOG, [test $enable_tizen_dlog = yes])
+
+dnl ****************************
+dnl *** GNUTLS debug support ***
+dnl ****************************
+
+AC_ARG_ENABLE(tizen-gnutls-debug,
+ AS_HELP_STRING([--enable-tizen-gnutls-debug], [Enable Tizen GNUTLS debug support ]), ,
+ enable_tizen_gnutls_debug=no)
+
+AC_MSG_CHECKING([for Tizen GNUTLS debug])
+if test $enable_tizen_gnutls_debug != no;then
+ AC_DEFINE(ENABLE_TIZEN_GNUTLS_DEBUG, 1,
+ [Add new feature, support to enable GNUTLS debug function in glib-networking])
+fi
+AC_MSG_RESULT($enable_tizen_gnutls_debug)
+
+AM_CONDITIONAL(TIZEN_GNUTLS_DEBUG, [test $enable_tizen_gnutls_debug = yes])
+
dnl *****************************************************
dnl *** Tizen update gnutls default priority support ***
%if %{with libproxy}
--with-libproxy \
%endif
+ --enable-tizen-dlog \
+%if 0
+ --enable-tizen-gnutls-debug \
+%endif
%if "%{TIZEN_PROFILE_TV}" == "1"
--enable-tizen-multiple-certificate=yes \
--enable-tizen-tv-update-default-priority \
- --enable-tizen-dlog \
--enable-tizen-performance-test-log \
%endif
%if "%{TIZEN_PROFILE_TV}" == "1"
- --with-ca-certificates=%{TZ_SYS_RO_CA_CERTS}
+ --with-ca-certificates=%{TZ_SYS_RO_CA_CERTS} \
%else
- --with-ca-certificates=%{TZ_SYS_RO_CA_BUNDLE}
+ --with-ca-certificates=%{TZ_SYS_RO_CA_BUNDLE} \
%endif
%__make %{?_smp_mflags} V=1
#define ENABLE_TIZEN_NPN 1
#define ENABLE_TIZEN_EXT 1
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_DLOG)
#ifndef LOG_TAG
#define LOG_TAG "glib-networking" /* This LOG_TAG should be defined before including dlog.h. Because dlog.h is using it. */
#endif
+#if ENABLE(TIZEN_GNUTLS_DEBUG)
+#define GTLS_GNUTLS_DEBUG 1
+#endif
+
#endif
#include "gtlsfiledatabase-gnutls.h"
#include "gtlsserverconnection-gnutls.h"
+#include "TIZEN.h"
+
struct _GTlsBackendGnutlsPrivate
{
GMutex mutex;
static void
gtls_log_func (int level, const char *msg)
{
+#if ENABLE(TIZEN_DLOG)
+ TIZEN_LOGI("GTLS: %s", msg);
+#else
g_print ("GTLS: %s", msg);
+#endif
}
#endif
gnutls_x509_crt_t *chain;
GTlsCertificateFlags gtls_flags;
time_t t, now;
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
char timebuf[256];
#endif
{
t = gnutls_x509_crt_get_activation_time (chain[i]);
-#if ENABLE(TIZEN_TV_DLOG)
- ctime_r(&now, timebuf);
- TIZEN_LOGI("[Certificate] TV borad time is: %s", timebuf);
- if (t != (time_t) -1) {
- ctime_r(&t, timebuf);
- TIZEN_LOGI("[Certificate] CA activation time is: %s", timebuf);
- }
- else
- TIZEN_LOGI("[Certificate] gnutls_x509_crt_get_activation_time ERROR");
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
+ ctime_r(&now, timebuf);
+ TIZEN_LOGI("[Certificate] TV borad time is: %s", timebuf);
+ if (t != (time_t) -1) {
+ ctime_r(&t, timebuf);
+ TIZEN_LOGI("[Certificate] CA activation time is: %s", timebuf);
+ }
+ else
+ TIZEN_LOGI("[Certificate] gnutls_x509_crt_get_activation_time ERROR");
#endif
if (t == (time_t) -1 || t > now)
t = gnutls_x509_crt_get_expiration_time (chain[i]);
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
if (t != (time_t) -1) {
ctime_r(&t, timebuf);
TIZEN_LOGI("[Certificate] CA expiration time is: %s", timebuf);
/* FIXME: check sRVName and uniformResourceIdentifier
* subjectAltNames, if appropriate for @identity.
*/
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_DLOG)
TIZEN_LOGI("[Network] SSL HandShake - Bad Identity");
#endif
if (database == NULL)
{
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_DLOG)
TIZEN_LOGI("[Network] SSL HandShake - Unknown CA");
#endif
GTlsCertificateFlags gtls_flags = 0;
gnutls_x509_crt_t cert;
time_t t, now;
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
char timebuf[256];
#endif
cert = g_tls_certificate_gnutls_get_cert (chain);
t = gnutls_x509_crt_get_activation_time (cert);
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
ctime_r(&now, timebuf);
TIZEN_LOGI("[Certificate] TV borad time is: %s", timebuf);
if (t != (time_t) -1) {
t = gnutls_x509_crt_get_expiration_time (cert);
-#if ENABLE(TIZEN_TV_DLOG)
+#if ENABLE(TIZEN_TV_ADJUST_TIME) && ENABLE(TIZEN_DLOG)
if (t != (time_t) -1) {
ctime_r(&t, timebuf);
TIZEN_LOGI("[Certificate] CA expiration time is: %s", timebuf);