Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emulab
emulab-devel
Commits
9b8a3542
Commit
9b8a3542
authored
Jan 12, 2009
by
Leigh B. Stoller
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Deal with port sillyness (:443).
parent
7e2b4134
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
protogeni/test/test-common.py
protogeni/test/test-common.py
+13
-1
No files found.
protogeni/test/test-common.py
View file @
9b8a3542
...
...
@@ -11,6 +11,9 @@
# CONDITION. THE UNIVERSITY OF UTAH DISCLAIMS ANY LIABILITY OF ANY KIND
# FOR ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
from
urlparse
import
urlsplit
,
urlunsplit
from
urllib
import
splitport
HOME
=
os
.
environ
[
"HOME"
]
# Path to my certificate
CERTIFICATE
=
HOME
+
"/.ssl/encrypted.pem"
...
...
@@ -75,9 +78,18 @@ def do_method(module, method, params, URI=None):
path
=
SERVER_PATH
[
"default"
]
URI
=
"https://"
+
addr
+
path
+
module
el
s
e
:
el
if
modul
e
:
URI
=
URI
+
"/"
+
module
pass
scheme
,
netloc
,
path
,
query
,
fragment
=
urlsplit
(
URI
)
if
scheme
==
"https"
:
host
,
port
=
splitport
(
netloc
)
if
not
port
:
netloc
=
netloc
+
":443"
URI
=
urlunsplit
((
scheme
,
netloc
,
path
,
query
,
fragment
));
pass
pass
ctx
=
SSL
.
Context
(
"sslv23"
)
ctx
.
load_cert
(
CERTIFICATE
,
CERTIFICATE
,
PassPhraseCB
)
...
...
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