~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

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

  • Committer: Vincent Ladeuil
  • Date: 2012-03-08 18:30:33 UTC
  • mfrom: (6487 +trunk)
  • mto: This revision was merged to the branch mainline in revision 6488.
  • Revision ID: v.ladeuil+lp@free.fr-20120308183033-bccqnbr1tpozs711
Merge bzr.dev resolving conflicts

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="""\