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

fix: reply with sni-specific certs #11

Merged
merged 1 commit into from
Jan 10, 2024
Merged

fix: reply with sni-specific certs #11

merged 1 commit into from
Jan 10, 2024

Conversation

rosahaj
Copy link

@rosahaj rosahaj commented Jan 10, 2024

Currently the proxy uses the CA certificate for all TLS connections with the client, instead of generating a specific certificate for each host.

Example:

./japroxy &
curl --proxy localhost:8080 --cacert cert.pem https://duckduckgo.com/

# Output
curl: (60) SSL: certificate subject name 'localhost' does not match target host name 'duckduckgo.com'

This PR ensures a new certificate matching the host is generated on each request. On proxy startup, a temporary SessionKey is generated to sign all certificates (which should be faster than generating a new key for each certificate). cloudflare/cfssl is used for certificate generation and signing and elliptic curve private keys are used wherever possible.

@LyleMi LyleMi merged commit ee5a038 into LyleMi:master Jan 10, 2024
2 checks passed
@LyleMi
Copy link
Owner

LyleMi commented Jan 10, 2024

Thanks for your pull request! Your contribution is greatly appreciated and has been a valuable addition to our project.

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.

2 participants