Lines Matching defs:ssl
31 #include "ssl-utils.h"
36 static int test_GetSupportedCiphers(SSLContextRef ssl)
42 require_noerr(SSLGetNumberSupportedCiphers(ssl, &max_ciphers), out);
51 require_noerr(SSLGetSupportedCiphers(ssl, ciphers, &num_ciphers), out);
234 static int test_GetEnabledCiphers(SSLContextRef ssl)
241 err=SSLSetIOFuncs(ssl, &SocketRead, &SocketWrite);
242 err=SSLSetConnection(ssl, NULL);
243 err=SSLHandshake(ssl);
245 require_noerr(SSLGetNumberEnabledCiphers(ssl, &max_ciphers), out);
254 require_noerr(SSLGetEnabledCiphers(ssl, ciphers, &num_ciphers), out);
272 static int test_SetEnabledCiphers(SSLContextRef ssl)
284 require_noerr(SSLSetEnabledCiphers(ssl, ciphers, sizeof(ciphers)/sizeof(SSLCipherSuite)), out);
285 require_noerr(SSLGetNumberEnabledCiphers(ssl, &num_enabled), out);
300 SSLContextRef ssl = NULL;
302 require(ssl=SSLCreateContext(kCFAllocatorDefault, kSSLClientSide, kSSLStreamType), out);
303 ok(ssl, "SSLCreateContext failed");
306 ok(!test_GetSupportedCiphers(ssl), "GetSupportedCiphers test failed");
307 ok(!test_GetEnabledCiphers(ssl), "GetEnabledCiphers test failed");
309 CFRelease(ssl); ssl=NULL;
311 require(ssl=SSLCreateContext(kCFAllocatorDefault, kSSLClientSide, kSSLStreamType), out);
312 ok(ssl, "SSLCreateContext failed");
314 ok(!test_SetEnabledCiphers(ssl), "SetEnabledCiphers test failed");
317 if(ssl) CFRelease(ssl);