Skip to content

Commit 7793a2e

Browse files
davidbenCommit Queue
authored andcommitted
Avoid call to deprecated X509_STORE_get0_objects
X509_STORE_get0_objects is not thread-safe and also constrains X509_STORE's internals in undesirable ways. See openssl/openssl#23224 TEST=ci Change-Id: I0d501d92208e4af9de944b38c07cbcb66acaec66 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/407840 Auto-Submit: David Benjamin <[email protected]> Commit-Queue: Brian Quinlan <[email protected]> Reviewed-by: Brian Quinlan <[email protected]>
1 parent e0455b7 commit 7793a2e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

runtime/bin/security_context_macos.cc

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,8 @@ static ssl_verify_result_t CertificateVerificationCallback(SSL* ssl,
146146
CFArrayCreateMutable(nullptr, 0, nullptr));
147147
ASSERT(store != nullptr);
148148

149-
for (const X509_OBJECT* obj : X509_STORE_get0_objects(store)) {
149+
bssl::UniquePtr<STACK_OF(X509_OBJECT)> objs(X509_STORE_get1_objects(store));
150+
for (const X509_OBJECT* obj : objs.get()) {
150151
X509* ca = X509_OBJECT_get0_X509(obj);
151152
ScopedSecCertificateRef cert(CreateSecCertificateFromX509(ca));
152153
if (cert == nullptr) {

0 commit comments

Comments
 (0)