Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: third_party/gsutil/boto/tests/s3/test_https_cert_validation.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 # Copyright 2011 Google Inc. 1 # Copyright 2011 Google Inc.
2 # 2 #
3 # Permission is hereby granted, free of charge, to any person obtaining a 3 # Permission is hereby granted, free of charge, to any person obtaining a
4 # copy of this software and associated documentation files (the 4 # copy of this software and associated documentation files (the
5 # "Software"), to deal in the Software without restriction, including 5 # "Software"), to deal in the Software without restriction, including
6 # without limitation the rights to use, copy, modify, merge, publish, dis- 6 # without limitation the rights to use, copy, modify, merge, publish, dis-
7 # tribute, sublicense, and/or sell copies of the Software, and to permit 7 # tribute, sublicense, and/or sell copies of the Software, and to permit
8 # persons to whom the Software is furnished to do so, subject to the fol- 8 # persons to whom the Software is furnished to do so, subject to the fol-
9 # lowing conditions: 9 # lowing conditions:
10 # 10 #
(...skipping 27 matching lines...) Expand all
38 import os 38 import os
39 import ssl 39 import ssl
40 import unittest 40 import unittest
41 41
42 import boto 42 import boto
43 from boto import exception, https_connection 43 from boto import exception, https_connection
44 from boto.gs.connection import GSConnection 44 from boto.gs.connection import GSConnection
45 from boto.s3.connection import S3Connection 45 from boto.s3.connection import S3Connection
46 46
47 # File 'other_cacerts.txt' contains a valid CA certificate of a CA that is used 47 # File 'other_cacerts.txt' contains a valid CA certificate of a CA that is used
48 # by neither S3 nor Google Storage. Validation against this CA cert should 48 # by neither S3 nor Google Cloud Storage. Validation against this CA cert should
49 # result in a certificate error. 49 # result in a certificate error.
50 DEFAULT_CA_CERTS_FILE = os.path.join( 50 DEFAULT_CA_CERTS_FILE = os.path.join(
51 os.path.dirname(os.path.abspath(__file__ )), 'other_cacerts.txt') 51 os.path.dirname(os.path.abspath(__file__ )), 'other_cacerts.txt')
52 52
53 53
54 PROXY_HOST = os.environ.get('PROXY_HOST', 'cache') 54 PROXY_HOST = os.environ.get('PROXY_HOST', 'cache')
55 PROXY_PORT = os.environ.get('PROXY_PORT', '3128') 55 PROXY_PORT = os.environ.get('PROXY_PORT', '3128')
56 56
57 # This test assumes that this host returns a certificate signed by one of the 57 # This test assumes that this host returns a certificate signed by one of the
58 # trusted CAs, but with a Common Name that won't match host name 'www' (i.e., 58 # trusted CAs, but with a Common Name that won't match host name 'www' (i.e.,
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 self.assertConnectionThrows( 128 self.assertConnectionThrows(
129 GSConnection, https_connection.InvalidCertificateException) 129 GSConnection, https_connection.InvalidCertificateException)
130 130
131 def test_invalid_host(self): 131 def test_invalid_host(self):
132 self.do_test_invalid_host() 132 self.do_test_invalid_host()
133 133
134 def test_invalid_host_with_proxy(self): 134 def test_invalid_host_with_proxy(self):
135 self.enableProxy() 135 self.enableProxy()
136 self.do_test_invalid_host() 136 self.do_test_invalid_host()
137 137
OLDNEW
« no previous file with comments | « third_party/gsutil/boto/tests/s3/test_gsconnection.py ('k') | third_party/gsutil/boto/tests/s3/test_key.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698