~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/transport/http/_urllib2_wrappers.py

  • Committer: Patch Queue Manager
  • Date: 2012-02-18 17:24:52 UTC
  • mfrom: (6468.1.1 merge-2.5)
  • Revision ID: pqm@pqm.ubuntu.com-20120218172452-x7mk642v7mwxtyo1
(jelmer) Merge the 2.5 branch. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
86
86
    # XXX: Needs checking, can't trust the interweb ;) -- vila 2012-01-25
87
87
    u'/etc/openssl/certs/ca-certificates.crt', # Solaris
88
88
    ]
89
 
 
90
89
def default_ca_certs():
91
90
    if sys.platform == 'win32':
92
91
        return os.path.join(os.path.dirname(sys.executable), u"ca_bundle.crt")
122
121
    except KeyError:
123
122
        raise ValueError("invalid value %s" % unicode_str)
124
123
 
 
124
def default_ca_reqs():
 
125
    if sys.platform in ('win32', 'darwin'):
 
126
        # FIXME: Once we get a native access to root certificates there, this
 
127
        # won't needed anymore. See http://pad.lv/920455 -- vila 2012-02-15
 
128
        return u'none'
 
129
    else:
 
130
        return u'required'
125
131
 
126
132
opt_ssl_ca_certs = config.Option('ssl.ca_certs',
127
133
        from_unicode=ca_certs_from_store,
137
143
""")
138
144
 
139
145
opt_ssl_cert_reqs = config.Option('ssl.cert_reqs',
140
 
        default=u"required",
 
146
        default=default_ca_reqs,
141
147
        from_unicode=cert_reqs_from_store,
142
148
        invalid='error',
143
149
        help="""\