openziti / tlsuv

TLS and HTTP(s) client library for libuv
https://docs.openziti.io/tlsuv/
MIT License
45 stars 7 forks source link

Condition iOS code #203

Closed plajjan closed 8 months ago

plajjan commented 9 months ago

I'm not really familiar with this code so fumbling a bit but I believe this is related to iOS. I don't have a Security/Security.h header on my MacOS laptops. This condition fixes so this compiles on MacOS.

ekoby commented 8 months ago

when building for macOS security framework is needed, otherwise you'd get SSL host validation errors

plajjan commented 8 months ago

@ekoby inclusion of Security/Security.h was introduced in https://github.com/openziti/tlsuv/commit/ebacee21c9795ecf2d2b8efa50e0e7b59cec7bd2 from October 18th of last year. The commit specifically talks about handling fallback for CA validation on iOS. Surely, for MacOS the other code still works.

So perhaps it's more of a choice what should be the preferred method for CA validation on MacOS?

ekoby commented 8 months ago

OK, now I remember. On macOS CA bundle is available at /etc/ssl/cert.pem. As long as Apple keeps it around this will work.

Thank you for the contribution. Feel free to add yourself to CONTRIBUTORS file as part of this PR

plajjan commented 8 months ago

@ekoby ok, thanks! I've rebased and added myself to CONTRIBUTORS :)