~ubuntu-branches/ubuntu/vivid/bzr/vivid

« back to all changes in this revision

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

  • Committer: Jelmer Vernooij
  • Date: 2012-02-25 15:54:11 UTC
  • mfrom: (3930.3.71 unstable-2.5)
  • Revision ID: jelmer@samba.org-20120225155411-7nkz73y3xmshn2n8
Tags: 2.5.0-1ubuntu1
releasing version 2.5.0-1ubuntu1

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
 
        return os.path.join(os.path.dirname(sys.executable), u"ca_bundle.crt")
 
91
        return os.path.join(os.path.dirname(sys.executable), u"cacert.pem")
93
92
    elif sys.platform == 'darwin':
94
93
        # FIXME: Needs some default value for osx, waiting for osx installers
95
94
        # guys feedback -- vila 2012-01-25
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="""\