-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bug?: cannot extract client key from pem file if it encoded by SEC1 EC
#1143
Comments
YuJuncen
added a commit
to YuJuncen/tonic
that referenced
this issue
Nov 9, 2022
Fixes: hyperium#1143 Signed-off-by: Yu Juncen <[email protected]>
LucioFranco
pushed a commit
that referenced
this issue
Feb 13, 2023
* tonic: allow TLS to read ECKeys. Fixes: #1143 Signed-off-by: Yu Juncen <[email protected]> * tonic: minimize the scope of published function. Signed-off-by: Yu Juncen <[email protected]> --------- Signed-off-by: Yu Juncen <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Bug Report
Version
Platform
Linux 3.10.0-1160.36.2.el7.x86_64 #1 SMP Wed Jul 21 11:57:15 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
Crates
tonic
, with featuretls
enabled.Description
I tried this code:
Generally, I have wrote a client looks like this:
Which fills the tls config like:
With a client key file generated by:
openssl ecparam -out "$TEST_DIR/certs/$cluster.key" -name prime256v1 -genkey
I expected to see this happen:
We should be able to connect to the server via the key, or return some error like
DNSNameError
which hints the key is invalid.Instead, this happened:
It returns a error like:
Some notes:
By reading the code, I have noticed that we are going to extract key via applying
pkcs8_private_keys
andrsa_private_keys
. It seemsrustls-pemfile
supportsSEC1 EC
keys however doesn't provide something likeec_private_keys
(!).Perhaps we can use
read_once
direcly, so we only need to iterate the key file once and can extract the EC keys:-->
The text was updated successfully, but these errors were encountered: