sfackler / rust-native-tls

Apache License 2.0
468 stars 197 forks source link

Remove unneeded checks for private key #259

Closed UXabre closed 1 year ago

UXabre commented 1 year ago

Solves: https://github.com/sfackler/rust-native-tls/issues/238

THe problem is that EC keys slightly change the separator text and I don't think a check is needed on this level... what if, in the future, a different thing is added?

I think this is part of the appeal of using native TLS, that it can support things not originally supported. That is why I propose to remove the check altogether

sfackler commented 1 year ago

You probably have an EC key in Sec1 format, not pkcs#8. The OpenSSL cli can help you convert your private key file to the appropriate format.

UXabre commented 1 year ago

Ok, now i feel stupid for not realizing this. Thanks for taking the time to reply! Will fix it on my end and close this pr