Skip to content

Conversation

@tosinator
Copy link

I have been using Daedalus as my cardano-wallet provider. Daedalus uses HTTPS with custom CA and client certificates. In order to be able to use them properly, we need to pass "verify" and "cert" parameters to requests library. This patch accomplishes that.

I'm not sure if I need to consider anything else (I used this library only for a little).
If not a direct contribution to code, hopefully this at least serves as a feature request.

Thanks!

_log.debug("WalletREST backend url: {:s}".format(self.base_url))

def raw_request(self, method, path, params=None):
def raw_request(self, method, path, params=None, verify=None, cert=None):
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems this method doesn't use the new keywords

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yikes, seems like I need to get some sleep.
I'll take a look at this (and other comments) tomorrow with fresh eyes and will re-submit.
Thanks for fast review!

u"{method} {url}\nParams:\n{params}".format(
method=method,
url=url,
verify=verify,
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These aren't used in the resulting message

)
rsp = getattr(requests, method.lower())(
url, headers=hdr, data=json.dumps(params), timeout=self.timeout
url, headers=hdr, data=json.dumps(params), timeout=self.timeout, verify=self.verify, cert=self.cert
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kwargs are dropped but instead values from self. are used (which is right)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants