* Use serial lock queue
* isProtectedDataAvailable() should block
* Fix a crash in TSKSPKIHashCache caused by concurrent read write operations
* Refactor hashSubjectPublicKeyInfoFromCertificate:
---------
Co-authored-by: Tanner Bennett <tb@datatheorem.io>
- Fixed the random but frequent error about "Redefinition of module
TrustKit" because the tests were also configured to create the app's
module map. Whoops!
In the process of finding that, changed lots of other things:
- Removed the TrustKit+Private.h header. There is no more private header
for test support. Test support is entirely within the test target.
- Moved the #defines out of the precompiled header and into TSKCommon.h.
This didn't end up helping any issue but i think its cleaner anyway.
- Added const to all statics
- Removed the shared background session and greatly simplified the
background session creation.
- Streamlined logging and removed loggerBlock. We should switch to
os_log if available (iOS 10) and perhaps reconsider providing
a backwards compatible solution unless it's really compelling.
- Re-indented TrustKit.h
- Switched TrustKit to use GCD block callbacks for validation result
instead of notifications. It's a lot more performant to not dispatch
main thread notifications for every network requests unless they are
actually needed. It's also cleaner to not support loose coupling – app
can do whatever they want in the callback, including to send NSNotification.