Skip to content

[3.4, 3.3, 3.0] Backport of #30323 "x509: reject unauthorized stapled OCSP response signers"#30527

Open
esyr wants to merge 2 commits intoopenssl:openssl-3.4from
esyr:esyr/30323-openssl-3.4-backport
Open

[3.4, 3.3, 3.0] Backport of #30323 "x509: reject unauthorized stapled OCSP response signers"#30527
esyr wants to merge 2 commits intoopenssl:openssl-3.4from
esyr:esyr/30323-openssl-3.4-backport

Conversation

@esyr
Copy link
Member

@esyr esyr commented Mar 21, 2026

This is a backport of [1] to openssl-3.4, openssl-3.3, and openssl-3.0 that contains only parts pertaining openssl ocsp command fixes. It is different from [2] as it required conflict resolution in test/recipes/80-test_ocsp.t due to absence of commit 421e8d7 "APPS/ocsp: fix case where reqin and outfile are the same" in those branches.

[1] #30323
[2] #30526

1seal added 2 commits March 21, 2026 23:09
…k paths

This is backport of 8a63091 "x509: remove OCSP_TRUSTOTHER from stapled
response and issuer fallback paths" that includes only parts pertaining
the openssl ocsp command.  Original commit message:

    check_cert_ocsp_resp() verified stapled OCSP responses with
    OCSP_TRUSTOTHER while passing the peer-provided chain (ctx->chain),
    which allowed certificates from that chain to be treated as trusted
    OCSP responder signers.

    similarly, the ocsp CLI issuer fallback path unconditionally used
    OCSP_TRUSTOTHER, making certificates given via -issuer implicitly
    trusted regardless of verify_flags.

    remove OCSP_TRUSTOTHER from both paths so that responder authorization
    is validated against the trust store.

Link: openssl#30323
References: 8a63091 "x509: remove OCSP_TRUSTOTHER from stapled response and issuer fallback paths"
Fixes: c672406 "RT2206: Add -issuer flag to ocsp command"
This is a backport of commit 355ea2b "test: add regression tests
for unauthorized OCSP response signers" that includes only parts
pertaining the openssl ocsp command testing.  The original commit
message:

    extend test_tlsext_status_type() with a handshake that serves a
    leaf-signed stapled OCSP response and verifies the connection fails
    when X509_V_FLAG_OCSP_RESP_CHECK is enabled.

    generalize ocsp_server_cb_single() to use configurable signer
    cert/key instead of hardcoded paths so the same callback serves
    both authorized and unauthorized signer test cases.

    add a test_ocsp() subtest covering the -issuer CLI option with
    an untrusted issuer hint.

Link: openssl#30323
References: 355ea2b "test: add regression tests for unauthorized OCSP response signers"
@esyr esyr added approval: review pending This pull request needs review by a committer triaged: bug The issue/pr is/fixes a bug branch: 3.0 Applies to openssl-3.0 branch branch: 3.3 Applies to openssl-3.3 branch: 3.4 Applies to openssl-3.4 labels Mar 21, 2026
@esyr esyr requested review from DDvO and t8m March 21, 2026 22:17
@t8m t8m added the tests: present The PR has suitable tests present label Mar 23, 2026
@openssl-machine openssl-machine added approval: done This pull request has the required number of approvals and removed approval: review pending This pull request needs review by a committer labels Mar 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approval: done This pull request has the required number of approvals branch: 3.0 Applies to openssl-3.0 branch branch: 3.3 Applies to openssl-3.3 branch: 3.4 Applies to openssl-3.4 tests: present The PR has suitable tests present triaged: bug The issue/pr is/fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants