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

generate_adhoc_ssl_pair: make issuer match subject #1430

Merged
merged 1 commit into from Jan 12, 2019

Conversation

Projects
None yet
2 participants
@mephi42
Copy link
Contributor

commented Jan 5, 2019

With this change, the generated certificate can be trusted,
and the following command starts working:

openssl s_client -showcerts -connect dev:443 -verifyCAfile dev.crt </dev/null
generate_adhoc_ssl_pair: make issuer match subject
With this change, the generated certificate can be trusted,
and the following command starts working:

    openssl s_client -showcerts -connect dev:443 -verifyCAfile dev.crt </dev/null

@mephi42 mephi42 force-pushed the mephi42:master branch from 8933254 to 0d3c0bf Jan 5, 2019

@davidism

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

Why does it need to be trusted? The command is not meant for making a good certificate, it's meant for quickly making a development one. Clearly marking it as such, as is done now, seems better.

@mephi42

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

I found the ability to trust dev certificate useful for testing client's ability to work with custom CA bundles. In particular, when implementing requests-based clients, I need to make sure that I correctly pass the path to CA certificate as verify= argument to all relevant calls.

@davidism

This comment has been minimized.

Copy link
Member

commented Jan 5, 2019

I'm not an expert on SSL. Why is the current version not trustable? What does the change do to make it so?

@mephi42

This comment has been minimized.

Copy link
Contributor Author

commented Jan 5, 2019

The way I see it is that when a web server presents a certificate to a client, a client uses the issuer field to build the trust chain. Currently issuer points to the non-existent CN=Untrusted Authority,O=Self-Signed certificate, and so the verification immediately fails.

When I change the issuer field to point to the dev certificate itself, and trust the dev certificate using e.g. -verifyCAfile or verify=, then issuer begins to point to the trusted certificate, and so the verification succeeds.

@davidism davidism added this to the 0.15 milestone Jan 12, 2019

@davidism davidism merged commit 7ed607a into pallets:master Jan 12, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

davidism added a commit that referenced this pull request Jan 12, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.