Skip to content

openssl: Fix error propagation in csr exports#21403

Merged
ndossche merged 1 commit intophp:PHP-8.4from
ndossche:clesss-35
Apr 3, 2026
Merged

openssl: Fix error propagation in csr exports#21403
ndossche merged 1 commit intophp:PHP-8.4from
ndossche:clesss-35

Conversation

@ndossche
Copy link
Copy Markdown
Member

If the print fails, then the write is still executed, resulting in a partial export without any way of the user knowing this happened. Fix this by only returning true if all writes succeed.

This was found by a hybrid static-dynamic analyser that looks for inconsistent handling of error checks in bindings.

If the print fails, then the write is still executed, resulting in a
partial export without any way of the user knowing this happened.
Fix this by only returning true if all writes succeed.
@ndossche ndossche merged commit 4a16d22 into php:PHP-8.4 Apr 3, 2026
19 checks passed
ndossche added a commit that referenced this pull request Apr 3, 2026
* PHP-8.4:
  openssl: Fix error propagation in csr exports (#21403)
  openssl: Fix missing error propagation in openssl_x509_export() (#21375)
  Fix SKIPIF of openssl_password.phpt (#20941)
ndossche added a commit that referenced this pull request Apr 3, 2026
* PHP-8.5:
  openssl: Fix error propagation in csr exports (#21403)
  openssl: Fix missing error propagation in openssl_x509_export() (#21375)
  Fix SKIPIF of openssl_password.phpt (#20941)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants