diff options
author | Julian Ospald <hasufell@hasufell.de> | 2015-02-07 22:06:40 +0100 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-02-20 16:30:04 +0100 |
commit | 90314100e0880144b2d8b7f7d02c51df9d6beece (patch) | |
tree | a120e174c3ee00458da94f2ccb3d1e020d9d7174 /lib/url.c | |
parent | 20112ed8467c492a923b0ed2fb2d878c1a14ba44 (diff) | |
download | curl-90314100e0880144b2d8b7f7d02c51df9d6beece.tar.gz |
configure: allow both --with-ca-bundle and --with-ca-path
SSL_CTX_load_verify_locations by default (and if given non-Null
parameters) searches the CAfile first and falls back to CApath. This
allows for CAfile to be a basis (e.g. installed by the package manager)
and CApath to be a user configured directory.
This wasn't reflected by the previous configure constraint which this
patch fixes.
Bug: https://github.com/bagder/curl/pull/139
Diffstat (limited to 'lib/url.c')
-rw-r--r-- | lib/url.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -5,7 +5,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 1998 - 2014, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 1998 - 2015, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -586,8 +586,13 @@ CURLcode Curl_init_userdefined(struct UserDefined *set) /* This is our preferred CA cert bundle/path since install time */ #if defined(CURL_CA_BUNDLE) result = setstropt(&set->str[STRING_SSL_CAFILE], (char *) CURL_CA_BUNDLE); -#elif defined(CURL_CA_PATH) + if(result) + return result; +#endif +#if defined(CURL_CA_PATH) result = setstropt(&set->str[STRING_SSL_CAPATH], (char *) CURL_CA_PATH); + if(result) + return result; #endif set->wildcardmatch = FALSE; |