You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a project where I'm generating a self-signed certs with rcgen and then using that cert with rust-native-tls & hyper. I've run into some strange problems when testing that I've isolated into a repro. I believe this is an schannel issue, because I can only reproduce it on Windows, and the handshake error is coming from this crate.
To reproduce (the order of operations here is very important):
In one shell, run cargo run --example server 12345
In another shell, run curl -v --insecure https://localhost:12345/ - it should succeed. This is just to confirm that everything seems to be working. Running that command over and over works just fine.
In another shell, run cargo run --example server 12346
Now run that same curl command again (curl -v --insecure https://localhost:12345/). I get this error:
Sometimes it's last octet invalid, sometimes first octet invalid, sometimes data too large for modulus.
6. If you restart the first server, the curl command will work again. However, if you now run it against the second server (port 12346), that one no longer works (you can test it before step (5) to confirm it worked initially).
It seems like there is some kind of cross-process corruption happening somehow, and I am baffled as to how that would be the case. As far as I can tell, the two processes are completely disconnected from each other - they're bound to different ports, they use different self-signed certs (generated at process startup), and they're not communicating with each other in any way.
Any thoughts on what could be happening here?
The text was updated successfully, but these errors were encountered:
Of course, as soon as I posted this I had a thought, and it turned out to be correct. The problem is that rust-native-tls is using the same container name for the store no matter what. Not sure what the right solution here is, but I don't think it's a problem in schannel-rs.
I have a project where I'm generating a self-signed certs with
rcgen
and then using that cert withrust-native-tls
&hyper
. I've run into some strange problems when testing that I've isolated into a repro. I believe this is anschannel
issue, because I can only reproduce it on Windows, and the handshake error is coming from this crate.To reproduce (the order of operations here is very important):
cargo run --example server 12345
curl -v --insecure https://localhost:12345/
- it should succeed. This is just to confirm that everything seems to be working. Running that command over and over works just fine.cargo run --example server 12346
curl -v --insecure https://localhost:12345/
). I get this error:Sometimes it's
last octet invalid
, sometimesfirst octet invalid
, sometimesdata too large for modulus
.6. If you restart the first server, the
curl
command will work again. However, if you now run it against the second server (port12346
), that one no longer works (you can test it before step (5) to confirm it worked initially).It seems like there is some kind of cross-process corruption happening somehow, and I am baffled as to how that would be the case. As far as I can tell, the two processes are completely disconnected from each other - they're bound to different ports, they use different self-signed certs (generated at process startup), and they're not communicating with each other in any way.
Any thoughts on what could be happening here?
The text was updated successfully, but these errors were encountered: