You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This adds a method to include default/installable
certificates from Mozilla's CA store which could
solve the default certs problem from micropython/micropython#8968
Signed-off-by: Carlos Gil <carlosgilglez@gmail.com>
This will create `ca_bundle_mp.py` file with the selected certificates.
38
+
39
+
40
+
#### 3. Split `ca_bundle_mp.py` into ca-bundles grouped by CA.
41
+
42
+
Using `make-certifi.py` will split the filtered ca-bundle into installable packages by CA name
43
+
.e.g `require("certifi-digicert")`
44
+
45
+
46
+
#### 4. Automate using Makefile
47
+
48
+
Automate updates to ca-certificates using `$ make certifi`
49
+
50
+
51
+
#### 5. Default ca-bundle.
52
+
53
+
`certifi` package will include CA Root certs `ISRG Root X1` which is used to validate MicroPython `mip` server and `DigiCert Global Root CA`, which is used to validate `github.com`. This way `mip` can validate by default that the package being installed comes in fact from MicroPython package index server, or from the github repo of a 3rd party package.
54
+
55
+
56
+
#### 6. Install
57
+
58
+
In a manifest file:
59
+
```python
60
+
require("certifi")
61
+
# or any additional bundle e.g.
62
+
# require("certifi-digicert")
63
+
```
64
+
Install additional bundles with mip at runtime
65
+
```console
66
+
>>> import mip
67
+
>>> mip.install("certifi-digicert")
68
+
```
69
+
70
+
#### 7. Usage
71
+
72
+
```console
73
+
>>> import certifi
74
+
# check config
75
+
>>> certifi.config()
76
+
{'certs': 'certifi.default', 'path': 'cacerts'}
77
+
```
78
+
Defaults can be configured, where `certs` can be the module where CA certs are or the CA cert chain as bytes. And `path` is where CA certs files will be loaded from.
79
+
If both options are indicated, then both CA certs will be concatenated into CA cert chain.
0 commit comments