Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gyuricska Milán
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6912709b
authored
Jan 28, 2013
by
x
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix ssl_verify
parent
ba97bf0e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
store/api.py
+8
-8
No files found.
store/api.py
View file @
6912709b
...
...
@@ -20,23 +20,23 @@ class StoreApi:
headers
=
{
'content-type'
:
'application/json'
}
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
]),
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
)
elif
settings
[
'ssl_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
])
\
)
elif
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
\
)
else
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
]
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
\
)
return
r
@staticmethod
...
...
@@ -44,23 +44,23 @@ class StoreApi:
headers
=
{
'content-type'
:
'application/json'
}
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
]),
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
)
elif
settings
[
'ssl_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
])
\
)
elif
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
\
)
else
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
]
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
\
)
return
r
@staticmethod
...
...
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