Skip to content

Commit

Permalink
Fix some casts
Browse files Browse the repository at this point in the history
  • Loading branch information
timja committed Jan 22, 2025
1 parent 382c7af commit 91869ce
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/crypto/crypto_context.cc
Original file line number Diff line number Diff line change
Expand Up @@ -348,11 +348,11 @@ TrustStatus IsTrustSettingsTrustedForPolicy(CFArrayRef trustSettings,
CFIndex trustSettingsCount = CFArrayGetCount(trustSettings);

for (CFIndex i = 0; i < trustSettingsCount; ++i) {
CFDictionaryRef trustDict =
(CFDictionaryRef)CFArrayGetValueAtIndex(trustSettings, i);
CFDictionaryRef trust_dict = reinterpret_cast<CFDictionaryRef>(
const_cast<void*>(CFArrayGetValueAtIndex(trustSettings, i)));

TrustStatus trust =
IsTrustDictionaryTrustedForPolicy(trustDict, isSelfIssued);
IsTrustDictionaryTrustedForPolicy(trust_dict, isSelfIssued);

if (trust == TrustStatus::DISTRUSTED || trust == TrustStatus::TRUSTED) {
return trust;
Expand Down Expand Up @@ -453,8 +453,8 @@ void ReadMacOSKeychainCertificates(

std::vector<X509*> system_root_certificates_X509;
for (int i = 0; i < count; ++i) {
SecCertificateRef certRef =
(SecCertificateRef)CFArrayGetValueAtIndex(currAnchors, i);
SecCertificateRef certRef = reinterpret_cast<SecCertificateRef>(
const_cast<void*>(CFArrayGetValueAtIndex(currAnchors, i)));

CFDataRef derData = SecCertificateCopyData(certRef);
if (!derData) {
Expand Down

0 comments on commit 91869ce

Please sign in to comment.