pyXMLSecurity
pyXMLSecurity copied to clipboard
load_pem_x509_cert_str_safe: Handle str or bytes input
- Introduce utils.load_pem_x509_cert_str_safe to handle str or bytes as input to load_pem_x509_certificate
- Use it to wrap calls to the latter where input can be str or bytes
All Submissions:
- [X] Have you checked to ensure there aren't other open Pull Requests for the same update/change?
- [X] Have you added an explanation of what problem you are trying to solve with this PR?
- [X] Have you added information on what your changes do and why you chose this as your solution?
- [ ] Have you written new tests for your changes?
- [ ] Does your submission pass tests?
- [ ] This project follows PEP8 style guide. Have you run your code against the 'flake8' linter?
I opted to make the least changes and only wrap calls to load_pem_x509_certificate where the input may not be a bytestring