Skip to content

Commit 0342926

Browse files
authored
Merge pull request certifi#79 from jdufresne/drop-weak
Remove old_where()
2 parents 785eb15 + be97435 commit 0342926

File tree

6 files changed

+11
-5446
lines changed

6 files changed

+11
-5446
lines changed

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include MANIFEST.in README.rst LICENSE certifi/cacert.pem certifi/weak.pem certifi/old_root.pem
1+
include MANIFEST.in README.rst LICENSE certifi/cacert.pem

Makefile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
update:
22
curl https://mkcert.org/generate/ | ./strip-non-ascii > certifi/cacert.pem
3-
cat certifi/cacert.pem certifi/old_root.pem > certifi/weak.pem
43

54
publish:
65
python setup.py sdist bdist_wheel

README.rst

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,12 @@ bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key)
3535
certificate from the same CA. Because Mozilla removed these certificates from
3636
its bundle, ``certifi`` removed them as well.
3737

38-
Unfortunately, old versions of OpenSSL (less than 1.0.2) sometimes fail to
39-
validate certificate chains that use the strong roots. For this reason, if you
40-
fail to validate a certificate using the ``certifi.where()`` mechanism, you can
41-
intentionally re-add the 1024-bit roots back into your bundle by calling
42-
``certifi.old_where()`` instead. This is not recommended in production: if at
43-
all possible you should upgrade to a newer OpenSSL. However, if you have no
44-
other option, this may work for you.
38+
In previous versions, ``certifi`` provided the ``certifi.old_where()`` function
39+
to intentionally re-add the 1024-bit roots back into your bundle. This was not
40+
recommended in production and therefore was removed. To assist in migrating old
41+
code, the function ``certifi.old_where()`` continues to exist as an alias of
42+
``certifi.where()``. Please update your code to use ``certifi.where()``
43+
instead. ``certifi.old_where()`` will be removed in 2018.
4544

4645
.. _`Certifi`: http://certifi.io/en/latest/
4746
.. _`Requests`: http://docs.python-requests.org/en/latest/

certifi/core.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ def where():
2626

2727
def old_where():
2828
warnings.warn(
29-
"The weak security bundle is being deprecated. It will be removed in "
30-
"2018.",
29+
"The weak security bundle has been removed. certifi.old_where() is now an alias "
30+
"of certifi.where(). Please update your code to use certifi.where() instead. "
31+
"certifi.old_where() will be removed in 2018.",
3132
DeprecatedBundleWarning
3233
)
33-
f = os.path.dirname(__file__)
34-
return os.path.join(f, 'weak.pem')
34+
return where()
3535

3636
if __name__ == '__main__':
3737
print(where())

0 commit comments

Comments
 (0)