Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Fukász Rómeó Ervin
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
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:
...
@@ -20,23 +20,23 @@ class StoreApi:
headers
=
{
'content-type'
:
'application/json'
}
headers
=
{
'content-type'
:
'application/json'
}
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
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'
]),
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
]),
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
)
)
elif
settings
[
'ssl_auth'
]
==
'True'
:
elif
settings
[
'ssl_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
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'
])
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
])
\
)
)
elif
settings
[
'basic_auth'
]
==
'True'
:
elif
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
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'
])
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
\
)
)
else
:
else
:
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
r
=
requests
.
post
(
url
,
data
=
payload
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
]
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
\
)
)
return
r
return
r
@staticmethod
@staticmethod
...
@@ -44,23 +44,23 @@ class StoreApi:
...
@@ -44,23 +44,23 @@ class StoreApi:
headers
=
{
'content-type'
:
'application/json'
}
headers
=
{
'content-type'
:
'application/json'
}
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
if
settings
[
'ssl_auth'
]
==
'True'
and
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
]),
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
]),
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
)
)
elif
settings
[
'ssl_auth'
]
==
'True'
:
elif
settings
[
'ssl_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
])
\
cert
=
(
settings
[
'store_client_cert'
],
settings
[
'store_client_key'
])
\
)
)
elif
settings
[
'basic_auth'
]
==
'True'
:
elif
settings
[
'basic_auth'
]
==
'True'
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
],
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
,
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
\
auth
=
(
settings
[
'store_client_user'
],
settings
[
'store_client_pass'
])
\
)
)
else
:
else
:
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
r
=
requests
.
get
(
url
,
headers
=
headers
,
\
verify
=
settings
[
'verify_ssl'
]
\
verify
=
settings
[
'verify_ssl'
]
==
'True'
\
)
)
return
r
return
r
@staticmethod
@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