Skip to content

Enable setting SSL_CERT_FLAG_TLS_STRICT with ssl config - #17989

Closed
t8m wants to merge 2 commits into
openssl:masterfrom
t8m:strict-check-config
Closed

t8m wants to merge 2 commits into
openssl:masterfrom
t8m:strict-check-config

Conversation

@t8m

@t8m t8m commented Mar 29, 2022

Copy link
Copy Markdown
Member

This can be useful for ssl_new testcases.

Checklist
  • documentation is added or updated
  • tests are added or updated

@t8m t8m added branch: master Applies to master branch approval: review pending This pull request needs review by a committer approval: otc review pending triaged: feature The issue/pr requests/adds a feature labels Mar 29, 2022

@tmshort tmshort left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM (pending CI; which is currently just Windows)

Comment thread doc/man3/SSL_CONF_cmd.pod

B<StrictCertCheck>: Enable strict certificate checking. Equivalent to
setting B<SSL_CERT_FLAG_TLS_STRICT> with SSL_CTX_set_cert_flags().

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just noting that this flag is the equivalent to -strict on the s_client/s_server command line, but none of the command-line options reference config options (just the flags).

Comment thread ssl/ssl_conf.c
SSL_FLAG_TBL_INV("CANames", SSL_OP_DISABLE_TLSEXT_CA_NAMES),
SSL_FLAG_TBL("KTLS", SSL_OP_ENABLE_KTLS)
SSL_FLAG_TBL("KTLS", SSL_OP_ENABLE_KTLS),
SSL_FLAG_TBL_CERT("StrictCertCheck", SSL_CERT_FLAG_TLS_STRICT)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also noting that this is the first time SSL_FLAG_TBL_CERT is being used, it had been previously defined but never used.

@tmshort tmshort removed the approval: review pending This pull request needs review by a committer label Mar 29, 2022
@t8m

t8m commented Apr 1, 2022

Copy link
Copy Markdown
Member Author

ping for second review

"MaxProtocol" => $protocol,
"Certificate" => test_pem("client-pss-restrict-cert.pem"),
"PrivateKey" => test_pem("client-pss-restrict-key.pem"),
"Options" => "StrictCertCheck",

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am slightly confused by this. We are expecting a server fail due to StrictCertCheck....but the option is set client side? Why does the server fail because of a client side option?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because the client certificate as configured at the client will not be used by the client because it is rejected by the StrictCertCheck. As the issuer DN is not on the list sent by the server. The server will fail because it is configured to require a client cert and none is provided.

@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@t8m

t8m commented May 2, 2022

Copy link
Copy Markdown
Member Author

Ping again for the second review.

@openssl-machine

Copy link
Copy Markdown
Collaborator

This PR is in a state where it requires action by @openssl/otc but the last update was 30 days ago

@paulidale paulidale added approval: done This pull request has the required number of approvals and removed approval: otc review pending labels Jun 2, 2022
@openssl-machine openssl-machine added approval: ready to merge The 24 hour grace period has passed, ready to merge and removed approval: done This pull request has the required number of approvals labels Jun 3, 2022
@openssl-machine

Copy link
Copy Markdown
Collaborator

This pull request is ready to merge

@paulidale

Copy link
Copy Markdown
Contributor

Merged to master.

@paulidale paulidale closed this Jun 3, 2022
openssl-machine pushed a commit that referenced this pull request Jun 3, 2022
Reviewed-by: Todd Short <[email protected]>
Reviewed-by: Paul Dale <[email protected]>
(Merged from #17989)
sftcd pushed a commit to sftcd/openssl that referenced this pull request Sep 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: ready to merge The 24 hour grace period has passed, ready to merge branch: master Applies to master branch triaged: feature The issue/pr requests/adds a feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants