Commit 3e58560
authored
Add a "contents" function that returns the content of the cert chain. (certifi#116)
* Add a "what" function that returns the content of the cert chain.
* Use read_text because it makes more sense.
* Oh, and specify encoding.
* Add a workaround for pre-3.7 version of Python.
This workaround won't work in PyOxidizer but it allows those to
keep working while allowing 3.7+ usage in PyOxidizer.
* Rename "what()" to "contents()".
* Fix __main__ after the change from what() to contents().
* Update docstring.
* Add a comment describing when the fallback is used.
* Black keeps nagging me.
* Missed this after the what->contents change.
* Use a with statement to make sure things get dealt with properly.1 parent dc4007f commit 3e58560
3 files changed
+30
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
| 1 | + | |
2 | 2 | | |
3 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | | - | |
2 | | - | |
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
11 | 22 | | |
12 | 23 | | |
13 | 24 | | |
14 | 25 | | |
15 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
0 commit comments