Commit 542f327
gh-114572: Fix locking in cert_store_stats and get_ca_certs (GH-114573)
* gh-114572: Fix locking in cert_store_stats and get_ca_certs
cert_store_stats and get_ca_certs query the SSLContext's X509_STORE with
X509_STORE_get0_objects, but reading the result requires a lock. See
openssl/openssl#23224 for details.
Instead, use X509_STORE_get1_objects, newly added in that PR.
X509_STORE_get1_objects does not exist in current OpenSSLs, but we can
polyfill it with X509_STORE_lock and X509_STORE_unlock.
* Work around const-correctness problem
* Add missing X509_STORE_get1_objects failure check
* Add blurb
(cherry picked from commit bce6931)
Co-authored-by: David Benjamin <davidben@google.com>
1 parent d4a1c8e commit 542f327
File tree
2 files changed
+64
-5
lines changed- Misc/NEWS.d/next/Security
- Modules
2 files changed
+64
-5
lines changedLines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4520 | 4520 | | |
4521 | 4521 | | |
4522 | 4522 | | |
| 4523 | + | |
| 4524 | + | |
| 4525 | + | |
| 4526 | + | |
| 4527 | + | |
| 4528 | + | |
| 4529 | + | |
| 4530 | + | |
| 4531 | + | |
| 4532 | + | |
| 4533 | + | |
| 4534 | + | |
| 4535 | + | |
| 4536 | + | |
| 4537 | + | |
| 4538 | + | |
| 4539 | + | |
| 4540 | + | |
| 4541 | + | |
| 4542 | + | |
| 4543 | + | |
| 4544 | + | |
| 4545 | + | |
| 4546 | + | |
| 4547 | + | |
| 4548 | + | |
| 4549 | + | |
| 4550 | + | |
| 4551 | + | |
| 4552 | + | |
| 4553 | + | |
| 4554 | + | |
| 4555 | + | |
| 4556 | + | |
| 4557 | + | |
| 4558 | + | |
| 4559 | + | |
| 4560 | + | |
| 4561 | + | |
| 4562 | + | |
| 4563 | + | |
| 4564 | + | |
| 4565 | + | |
| 4566 | + | |
4523 | 4567 | | |
4524 | 4568 | | |
4525 | 4569 | | |
| |||
4549 | 4593 | | |
4550 | 4594 | | |
4551 | 4595 | | |
4552 | | - | |
| 4596 | + | |
| 4597 | + | |
| 4598 | + | |
| 4599 | + | |
| 4600 | + | |
| 4601 | + | |
4553 | 4602 | | |
4554 | 4603 | | |
4555 | 4604 | | |
| |||
4563 | 4612 | | |
4564 | 4613 | | |
4565 | 4614 | | |
4566 | | - | |
4567 | | - | |
4568 | | - | |
| 4615 | + | |
4569 | 4616 | | |
4570 | 4617 | | |
4571 | 4618 | | |
| 4619 | + | |
4572 | 4620 | | |
4573 | 4621 | | |
4574 | 4622 | | |
| |||
4600 | 4648 | | |
4601 | 4649 | | |
4602 | 4650 | | |
4603 | | - | |
| 4651 | + | |
| 4652 | + | |
| 4653 | + | |
| 4654 | + | |
| 4655 | + | |
| 4656 | + | |
4604 | 4657 | | |
4605 | 4658 | | |
4606 | 4659 | | |
| |||
4628 | 4681 | | |
4629 | 4682 | | |
4630 | 4683 | | |
| 4684 | + | |
4631 | 4685 | | |
4632 | 4686 | | |
4633 | 4687 | | |
| 4688 | + | |
4634 | 4689 | | |
4635 | 4690 | | |
4636 | 4691 | | |
| |||
0 commit comments