summaryrefslogtreecommitdiff
path: root/gweb
diff options
context:
space:
mode:
authorhyunuktak <hyunuk.tak@samsung.com>2015-12-23 15:03:25 +0900
committerhyunuktak <hyunuk.tak@samsung.com>2015-12-23 15:03:27 +0900
commitdcd2baa12a64c02e214ef872854dbd631389950b (patch)
tree978e56dac8b866c5c19eb8cb75bb76648f5c6ef9 /gweb
parentf338b3299e84ec6590da247efbd1336d89d27aeb (diff)
downloadconnman-dcd2baa12a64c02e214ef872854dbd631389950b.tar.gz
connman-dcd2baa12a64c02e214ef872854dbd631389950b.tar.bz2
connman-dcd2baa12a64c02e214ef872854dbd631389950b.zip
Apply tpkp-gnutls #2
Change-Id: I2cbd57173eea6720389d60324b4e6f374e66611d Signed-off-by: hyunuktak <hyunuk.tak@samsung.com>
Diffstat (limited to 'gweb')
-rwxr-xr-xgweb/giognutls.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/gweb/giognutls.c b/gweb/giognutls.c
index a790eca6..689bc52c 100755
--- a/gweb/giognutls.c
+++ b/gweb/giognutls.c
@@ -461,16 +461,20 @@ GIOChannel *g_io_channel_gnutls_new(int fd)
gnutls_priority_set_direct(gnutls_channel->session,
"NORMAL:-VERS-TLS-ALL:+VERS-TLS1.0:+VERS-SSL3.0:%COMPAT", NULL);
#endif
+ gnutls_certificate_allocate_credentials(&gnutls_channel->cred);
+ gnutls_credentials_set(gnutls_channel->session,
+ GNUTLS_CRD_CERTIFICATE, gnutls_channel->cred);
+#if defined TIZEN_SYS_CA_BUNDLE
+#define QUOTEME(x) #x
gnutls_certificate_set_verify_function(gnutls_channel->cred, &tpkp_gnutls_verify_callback);
/*
* TODO: get ca-bundle path build-time configuration unless gnutls set it as a default
*/
- gnutls_certificate_set_x509_trust_file(gnutls_channel->cred, "/etc/ssl/ca-bundle.pem", GNUTLS_X509_FMT_PEM);
-
- gnutls_certificate_allocate_credentials(&gnutls_channel->cred);
- gnutls_credentials_set(gnutls_channel->session,
- GNUTLS_CRD_CERTIFICATE, gnutls_channel->cred);
+ DBG("tizen sys ca bundle : %s", QUOTEME(TIZEN_SYS_CA_BUNDLE));
+ gnutls_certificate_set_x509_trust_file(gnutls_channel->cred,
+ QUOTEME(TIZEN_SYS_CA_BUNDLE), GNUTLS_X509_FMT_PEM);
+#endif
DBG("channel %p", channel);