-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(transport): Attempt to load RSA private keys in rustls (#39)
Currently, using an RSA key - or indeed any text which is not a PEM-encoded PKCS8-format key with RusTLS panics with an index-out-of- range exception. This commit introduces two new types of `TlsError` which indicate problems with loading a certificate or private key: - `CertificateParseError`, indicating that the certificate cannot be parsed - `PrivateKeyParseError`, indicating that the private key cannot be parsed. Additionally, in the case that reading the private key as PKCS8 fails, we now try loading it as an RSA key before failing.
- Loading branch information
1 parent
2b564ae
commit 2c5c3a2
Showing
1 changed file
with
46 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters