Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(364)

Issue 6480062: Show user-friendly error for invalid HTTP certificates

Can't Edit
Can't Publish+Mail
Start Review
Created:
13 years, 6 months ago by gz
Modified:
13 years, 6 months ago
Reviewers:
jimbaker, mp+121273
Visibility:
Public.

Description

Show user-friendly error for invalid HTTP certificates Makes the openstack client backend detect SSL certificate validation failures and propogate them as nicer errors that users have a chance of comprehending. The hint to set ssl-hostname-validation to off is a judgement call, but is common for tools like curl and wget when they reject a cert. Ideally the hostname and perhaps other details would also be included in the message, but this should do for now. https://code.launchpad.net/~gz/juju/os_https_pretty_error/+merge/121273 Requires: https://code.launchpad.net/~gz/juju/os_https_certs_1026102/+merge/118602 (do not edit description out of merge proposal)

Patch Set 1 #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+57 lines, -4 lines) Patch
A [revision details] View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/providers/openstack/_ssl.py View 1 chunk +2 lines, -0 lines 0 comments Download
M juju/providers/openstack/client.py View 3 chunks +20 lines, -2 lines 0 comments Download
M juju/providers/openstack/tests/test_client.py View 5 chunks +33 lines, -2 lines 1 comment Download

Messages

Total messages: 3
gz
Please take a look.
13 years, 6 months ago (2012-08-24 19:38:57 UTC) #1
jimbaker
+1, looks good to me. I think one test could be made more readable using ...
13 years, 6 months ago (2012-08-25 22:54:43 UTC) #2
gz
13 years, 6 months ago (2012-08-28 12:35:19 UTC) #3
Had missed there was an exception type in juju.errors for doing this anyway,
switched the code to use that. As the exception was confused about what its
param was, also sorted that out.

On 2012/08/25 22:54:43, jimbaker wrote:
> +1, looks good to me. I think one test could be made more readable using
> inlineCallbacks, but that's a real minor.

Now it's using a custom exception type, I just remove the str checking which is
covered in juju.tests.test_error anyway.
Sign in to reply to this message.

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b