Commit 1e241319 authored by Gary Wong's avatar Gary Wong

Provide a useful error message for the host name mismatch problem.

A link to the solutions is provided at no extra charge.
parent 9091e73c
......@@ -15,6 +15,7 @@
from urlparse import urlsplit, urlunsplit
from urllib import splitport
import xmlrpclib
import M2Crypto
from M2Crypto import X509
import socket
......@@ -237,6 +238,14 @@ def do_method(module, method, params, URI=None, quiet=False, version=None):
except xmlrpclib.ProtocolError, e:
if not quiet: print >> sys.stderr, e.errmsg
return (-1, None)
except M2Crypto.SSL.Checker.WrongHost, e:
if not quiet:
print >> sys.stderr, "Warning: certificate host name mismatch."
print >> sys.stderr, "Please consult:"
print >> sys.stderr, " http://www.protogeni.net/trac/protogeni/wiki/HostNameMismatch"
print >> sys.stderr, "for recommended solutions."
print >> sys.stderr, e
return (-1, None)
#
# Parse the Response, which is a Dictionary. See EmulabResponse in the
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment