Skip to content

Commit

Permalink
Updating CA cert, instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
nothingface0 committed May 23, 2023
1 parent 097f332 commit cdd0592
Show file tree
Hide file tree
Showing 4 changed files with 257 additions and 111 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,27 @@ cernrequests.get(url, cert=(cert,key))

This way you can even use custom names such as ```cert.pem``` and ```key.pem```

## Testing

```bash
python -m venv venv
source venv/bin/activate
pip install -r testing-requirements.txt
pytest
```

## FAQ

### I'm getting `certificate verify failed`! What should I do?

The `cernrequests/cern-cacerts.pem` file has expired, and will need to be updated by the library maintainer. Download all the CA files from [here](https://ca.cern.ch/cafiles/certificates/Download.aspx?ca=cern) and convert them to `.pem` files, one-by-one by running:

```bash
openssl x509 -in <CERN certification authority file.crt> -out temp.pem -outform PEM
```

Then, merge the contents of each `.pem` file into a single `cern-cacerts.pem` file and replace the existing one. Verify that the certs work by running `pytest`.

## References

- http://docs.python-requests.org/en/master/
Expand Down
Loading

0 comments on commit cdd0592

Please sign in to comment.