-
Notifications
You must be signed in to change notification settings - Fork 4
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
add SessionSecurity with peer certificate #6
base: master
Are you sure you want to change the base?
Conversation
might not need a review actually, and naming can be fixed later. Actually the real work here is how I get the common name out |
If I understand well, you retrieve the CN from peer certificate which may be used to authenticate the peer later. We will also need to authenticate the peer certificate with appropriate CA. Code looks good to me. For next step, I am not sure how you see the thing but I guess we will need a dedicated command to generate peer certificate and private key from a unique identifier like the Serial Number. |
Yeah something like that. Right now Im struggling however getting the peer certificate into the server. Seems to be some problems with self signed or just messing things up from my side. Currently its logging None for common name. |
It may be implemented like that: cf168a6 I guess it may be improved maybe with intermediate CAs for more flexibility ? Double auth can be tested like that:
|
been testing out a valid tls flow now. Been using Then sent a request with curl to server:
Got back
so not able to get a hold on the peer certificate in hyper. I wonder if its a bug in hyper or im doing it wrong in the curl command |
as you can see im using |
this IS the wrong end of the problem. I mean we don't get a better ACS by working on this, its just that I had already been using a bit of time on this problem, so better finish it ;) and then move on instead of having it in the back of my mind. .. |
Btw i have a cpe laying around somewhere. And i have been using it extensively in the past. For certain things i find it much more easier to test quick and dirty curl commands or postman .. |
Added issue in rust-native-tls: sfackler/rust-native-tls#262 |
I have already made some programs with peer cert authentication with openssl in C but I don't know much about rust-native-tls. I try to had a quick look to jarlah/addPeerCert but I had some linking issues with openssl. I will try to look into it later. |
It would be equally as hard to implement cross platform in c 😓 |
So if i make rust native tls work with requesting Peer certificate from client in server session i do open source a huge favour. Its just pain in the butt. But i will figure it out. Will maybe work on other things in parallell. |
To enable reading certificate later for authentication etc. plus booleans are not very descriptive.
discussion: could probably map the Certificate into a struct with common name etc instead of passing the knowledge of the tls framework deep into the rest of the code
related to #7