krzyzanowskim / OpenSSL

OpenSSL package for SwiftPM, CocoaPod, and Carthage, multiplatform
https://swift.best
Other
928 stars 340 forks source link

missing functions after upgrading #221

Closed wtholliday closed 2 months ago

wtholliday commented 3 months ago

Just updated OpenSSL from 4ae145c1446851cda62fa4b09c7b5e5c540d7b20 to 7405324f9b1a64a79e5fa3660d2eda901d1337f2. Now getting:

error: cannot find 'sk_X509_free' in scope
error: cannot find 'sk_X509_num' in scope
error: cannot find 'sk_X509_value' in scope

Seems these were formerly functions and became macros so they aren't usable from swift directly?

https://github.com/krzyzanowskim/OpenSSL/blob/7405324f9b1a64a79e5fa3660d2eda901d1337f2/macosx/include/OpenSSL/x509.h#L85

krzyzanowskim commented 2 months ago

Swift compiler does not resolve C macros, and that's why. That is OpenSSL API change.