Skip to content
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 support to CavemanTcpClient for server side validation only (non mutual TLS) #17

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

wtarr
Copy link

@wtarr wtarr commented Jan 22, 2024

Hi,

I have been using this library in a number of projects recently and has worked really well, however I needed to make some modifications to handle a TLS use case in a project I was working on. I am submitting these changes for review to see if they fit in the main branch,

  • All existing constructors needed to load a certificate in some form in order to activate ssl, in my use case I just wanted to perform TLS with server certificate validation only. A new constructor was added to support this.

  • Also a new validation call back was added to support diagnostics when there are certificate issues encountered, this includes logging out the certificate chain if there is a problem to help debug.

  • Within the client settings, in addition to an existing AcceptInvalidCertificates setting, I propose an additional CheckCertificateRevocation setting which gets used by the SslStream AuthenticateAsClient method in order to determine if the validation should include a online revocation check. In my use case, I only wanted to validate the certificate but not go online to try check the revocation list (CRL). I believe in the other overloads of the framework AuthenicateAsClient method that this defaults to false anyway if not set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant