Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Tom
crown-core
Commits
eecec247
Commit
eecec247
authored
7 years ago
by
Ashot
Browse files
Options
Download
Email Patches
Plain Diff
Fixed ca bundle path
parent
6364b429
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
depends/packages/curl.mk
+1
-1
depends/packages/curl.mk
src/updater.cpp
+8
-3
src/updater.cpp
src/updater.h
+1
-0
src/updater.h
with
10 additions
and
4 deletions
+10
-4
depends/packages/curl.mk
View file @
eecec247
...
...
@@ -6,7 +6,7 @@ $(package)_dependencies=openssl
$(package)_sha256_hash
=
1a084da1edbfc3bd632861358b26af45ba91aaadfb15d6482de55748b8dfc693
define
$(package)_set_vars
$(package)_config_opts
+=
--with-ssl
=
$(host_prefix)
--without-librtmp
--with-ca-bundle
=
curl-ca-bundle.crt
--disable-shared
$(package)_config_opts
+=
--with-ssl
=
$(host_prefix)
--without-librtmp
--disable-shared
endef
define
$(package)_preprocess_cmds
...
...
This diff is collapsed.
Click to expand it.
src/updater.cpp
View file @
eecec247
...
...
@@ -29,7 +29,8 @@ Updater::Updater() :
stopDownload
(
false
),
testnetUrl
(
"https://raw.githubusercontent.com/Crowndev/crowncoin/master/update_testnet.json"
),
//mainnetUrl("https://raw.githubusercontent.com/Crowndev/crowncoin/master/update.json")
mainnetUrl
(
"https://raw.githubusercontent.com/ashotkhachatryan/crowncoin/systemnode/update1.json"
)
mainnetUrl
(
"https://raw.githubusercontent.com/ashotkhachatryan/crowncoin/systemnode/update1.json"
),
caBundle
(
"curl-ca-bundle.crt"
)
{
}
...
...
@@ -104,12 +105,16 @@ void Updater::SetJsonPath()
void
Updater
::
SetCAPath
(
CURL
*
curl
)
{
curl_easy_setopt
(
curl
,
CURLOPT_CAINFO
,
caBundle
.
c_str
());
#ifdef __linux__
path
app
=
strprintf
(
"/proc/%s/exe"
,
getpid
());
if
(
exists
(
app
)
&&
is_symlink
(
app
))
{
path
appPath
=
canonical
(
app
).
parent_path
();
curl_easy_setopt
(
curl
,
CURLOPT_CAPATH
,
appPath
);
path
appPath
=
canonical
(
app
).
parent_path
()
/
caBundle
;
if
(
exists
(
appPath
))
{
curl_easy_setopt
(
curl
,
CURLOPT_CAINFO
,
appPath
.
string
().
c_str
());
}
}
#endif
}
...
...
This diff is collapsed.
Click to expand it.
src/updater.h
View file @
eecec247
...
...
@@ -60,6 +60,7 @@ private:
Value
jsonData
;
const
std
::
string
testnetUrl
;
const
std
::
string
mainnetUrl
;
const
std
::
string
caBundle
;
private:
bool
LoadUpdateInfo
();
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment