- Timestamp:
- Apr 2, 2015, 7:51:48 PM (7 years ago)
- Branches:
- asyncio, debian/master, debian/stretch-backports, jessie-backports, master, proxy-ticket, upstream
- Children:
- 809c422
- Parents:
- 36db6c9
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/gnutls_hooks.c
r36db6c9 rbd24203 1753 1753 int ret = APR_SUCCESS; 1754 1754 int err = GNUTLS_E_SUCCESS; 1755 1756 /* load certificate and key for client auth, if configured */ 1755 1757 if (sc->proxy_x509_key_file && sc->proxy_x509_cert_file) 1756 1758 { … … 1787 1789 if (sc->proxy_x509_ca_file) 1788 1790 { 1789 /* returns number of loaded certificates */ 1790 err = gnutls_certificate_set_x509_trust_file(sc->proxy_x509_creds, 1791 sc->proxy_x509_ca_file, 1792 GNUTLS_X509_FMT_PEM); 1791 /* initialize the trust list */ 1792 err = gnutls_x509_trust_list_init(&sc->proxy_x509_tl, 0); 1793 if (err != GNUTLS_E_SUCCESS) 1794 { 1795 ap_log_error(APLOG_MARK, APLOG_ERR, 0, s, 1796 "%s: gnutls_x509_trust_list_init failed: %s (%d)", 1797 __func__, gnutls_strerror(err), err); 1798 ret = APR_EGENERAL; 1799 } 1800 1801 /* returns number of loaded elements */ 1802 err = gnutls_x509_trust_list_add_trust_file(sc->proxy_x509_tl, 1803 sc->proxy_x509_ca_file, 1804 NULL /* crl_file */, 1805 GNUTLS_X509_FMT_PEM, 1806 0 /* tl_flags */, 1807 0 /* tl_vflags */); 1793 1808 if (err > 0) 1794 1809 ap_log_error(APLOG_MARK, APLOG_DEBUG, 0, s, 1795 "%s: proxy CA trust list: %d certificates loaded",1810 "%s: proxy CA trust list: %d structures loaded", 1796 1811 __func__, err); 1797 1812 else if (err == 0) … … 1803 1818 "%s: error loading proxy CA trust list: %s (%d)", 1804 1819 __func__, gnutls_strerror(err), err); 1820 1821 /* attach trust list to credentials */ 1822 gnutls_certificate_set_trust_list(sc->proxy_x509_creds, 1823 sc->proxy_x509_tl, 0); 1805 1824 } 1806 1825 else 1807 1826 ap_log_error(APLOG_MARK, APLOG_WARNING, 0, s, 1808 "%s: no CA trust list for proxy connections missing, "1827 "%s: no CA trust list for proxy connections, " 1809 1828 "TLS connections will fail!", __func__); 1810 1829
Note: See TracChangeset
for help on using the changeset viewer.