7 #include <Security/SecureTransport.h>
8 #import "STLegacyTests.h"
10 #pragma clang diagnostic push
11 #pragma clang diagnostic ignored "-Wdeprecated-declarations"
13 @implementation STLegacyTests (dhe)
16 OSStatus r(SSLConnectionRef connection, void *data, size_t *dataLength) {
17 return errSSLWouldBlock;
21 OSStatus w(SSLConnectionRef connection, const void *data, size_t *dataLength) {
22 return errSSLWouldBlock;
25 //Testing <rdar://problem/13539215> Trivial SecureTransport example crashes on Cab, where it worked on Zin
30 ctx = SSLCreateContext(NULL, kSSLClientSide, kSSLStreamType);
31 SSLSetIOFuncs(ctx, r, w);
32 ortn = SSLHandshake(ctx);
34 XCTAssertEqual(ortn, errSSLWouldBlock, "SSLHandshake unexpected return\n");
41 #pragma clang diagnostic pop