11 #if defined( __MVS__ ) || defined( __VMCMS__ )
13 #pragma convlit( suspend )
15 #if defined( __ILEC400__ )
25 #if defined( __WINDOWS__ ) && defined( _MSC_VER ) && ( _MSC_VER == 1200 ) && \
26 !defined( NDEBUG ) && 1
27 #define NO_SESSION_CACHE
86 #if defined( TEST_SESSION ) || defined( TEST_SESSION_LOOPBACK )
96 #if defined( __WINDOWS__ ) && !defined( _WIN32_WCE )
207 #define SSL_SERVER_NO 2
208 #define TLS_SERVER_NO 3
209 #define TLS11_SERVER_NO 4
210 #define TLS12_SERVER_NO 29
213 #if ( SSL_SERVER_NO == TLS_SERVER_NO ) || \
214 ( SSL_SERVER_NO == TLS11_SERVER_NO ) || \
215 ( TLS_SERVER_NO == TLS11_SERVER_NO )
216 #error SSL/TLS/TLS11 servers must be distinct to avoid tests being no-op'd due to cacheing
219 static const struct {
224 {
TEXT(
"localhost" ),
"/" },
225 {
TEXT(
"https://www.amazon.com" ),
"/" },
226 {
TEXT(
"https://www.paypal.com" ),
"/" },
227 {
TEXT(
"https://www.redhat.com" ),
"/" },
228 {
TEXT(
"https://www.cs.berkeley.edu" ),
"/~daw/people/crypto.html" },
229 {
TEXT(
"pop.web.de:995" ),
"/" },
230 {
TEXT(
"imap4-gw.uni-regensburg.de:993" ),
"/" },
231 {
TEXT(
"securepop.t-online.de:995" ),
"/" },
232 {
TEXT(
"https://homedir.wlv.ac.uk" ),
"/" },
233 {
TEXT(
"https://www.horaso.com:20443" ),
"/" },
234 {
TEXT(
"https://homedir.wlv.ac.uk" ),
"/" },
235 {
TEXT(
"https://www.microsoft.com" ),
"/" },
236 {
TEXT(
"https://alphaworks.ibm.com/" ),
"/" },
237 {
TEXT(
"https://webmount.turbulent.ca/" ),
"/" },
238 {
TEXT(
"https://www.gnutls.org/" ),
"/" },
239 {
TEXT(
"https://www.gnutls.org:5555/" ),
"/" },
240 {
TEXT(
"https://www.networksolutions.com/" ),
"/" },
241 {
TEXT(
"https://olb.westpac.com.au/" ),
"/" },
242 {
TEXT(
"https://www.hertz.com/" ),
"/" },
243 {
TEXT(
"https://www.openssl.org/" ),
"/" },
244 {
TEXT(
"https://secureads.ft.com/" ),
"/" },
245 {
TEXT(
"https://mail.maine.edu/" ),
"/" },
246 {
TEXT(
"https://www.mikestoolbox.net/" ),
"/" },
247 {
TEXT(
"https://test.gnutls.org:5556/" ),
"/" },
248 {
TEXT(
"https://sni.velox.ch/" ),
"/" },
249 {
TEXT(
"https://tls.secg.org:40023/connect.php" ),
"/" },
250 {
TEXT(
"https://ecc.fedora.redhat.com" ),
"/" },
251 {
TEXT(
"https://tls.secg.org/" ),
"/" },
252 {
TEXT(
"https://tls.woodgrovebank.com:25000/" ),
"/" },
253 {
TEXT(
"https://tls.woodgrovebank.com:25002/" ),
"/" },
254 {
TEXT(
"https://tls.woodgrovebank.com:25003/" ),
"/" },
255 {
TEXT(
"https://tls.woodgrovebank.com:25005/" ),
"/" },
256 {
TEXT(
"https://203.166.62.199/" ),
"/" },
310 #define STARTTLS_SERVER_NO 12
312 typedef enum { PROTOCOL_NONE, PROTOCOL_SMTP, PROTOCOL_SMTP_DIRECT,
313 PROTOCOL_POP, PROTOCOL_IMAP, PROTOCOL_POP_DIRECT,
317 static const struct {
320 PROTOCOL_TYPE protocol;
323 {
TEXT(
"132.239.1.57" ), 25, PROTOCOL_SMTP },
324 {
TEXT(
"144.92.240.11" ), 1110, PROTOCOL_POP },
325 {
TEXT(
"144.92.12.93" ), 25, PROTOCOL_SMTP },
326 {
TEXT(
"128.59.59.23" ), 25, PROTOCOL_SMTP },
327 {
TEXT(
"192.108.102.201" ), 110, PROTOCOL_POP },
328 {
TEXT(
"194.25.134.46" ), 995, PROTOCOL_POP_DIRECT },
329 {
TEXT(
"68.38.166.195" ), 21, PROTOCOL_FTP },
330 {
TEXT(
"141.30.198.37" ), 110, PROTOCOL_POP },
331 {
TEXT(
"134.76.10.26" ), 25, PROTOCOL_SMTP },
332 {
TEXT(
"209.151.91.6" ), 995, PROTOCOL_POP_DIRECT },
333 {
TEXT(
"64.233.167.111" ), 110, PROTOCOL_POP },
334 {
TEXT(
"128.151.224.17" ), 995, PROTOCOL_POP_DIRECT },
335 {
TEXT(
"134.84.119.35" ), 465, PROTOCOL_SMTP_DIRECT },
336 {
TEXT(
"65.55.172.253" ), 995, PROTOCOL_POP_DIRECT },
342 #if ( SSL_SERVER_NO == 7 ) || ( TLS12_SERVER_NO == 30 ) || \
343 ( TLS12_SERVER_NO == 31 ) || ( STARTTLS_SERVER_NO == 8 )
344 #define IS_BROKEN_SERVER
346 #pragma message( " Building with reduced compliance level for buggy SSL/TLS server." )
349 #if ( SSL_SERVER_NO == 3 )
350 #define IS_HIGHVOLUME_SERVER
357 #ifdef WINDOWS_THREADS
358 unsigned __stdcall tlsServerDualThread2(
void *
dummy );
364 #if defined( __MSDOS16__ ) || defined( __WIN16__ )
365 #define BULKDATA_BUFFER_SIZE 20000
367 #define BULKDATA_BUFFER_SIZE 300000L
373 int sum1 = 0, sum2 = 0, i;
380 sum1 += dataPtr[ i ];
384 return( sum2 & 0xFFFF );
395 for( i = 0; i < BULKDATA_BUFFER_SIZE - 2; i++ )
396 buffer[ i ] = i & 0xFF;
397 checkSum = checksumData( buffer, BULKDATA_BUFFER_SIZE - 2 );
398 buffer[ BULKDATA_BUFFER_SIZE - 2 ] = ( checkSum >> 8 ) & 0xFF;
399 buffer[ BULKDATA_BUFFER_SIZE - 1 ] = checkSum & 0xFF;
405 for( i = 0; i < BULKDATA_BUFFER_SIZE - 2; i++ )
407 if( buffer[ i ] != ( i & 0xFF ) )
410 checkSum = checksumData( buffer, BULKDATA_BUFFER_SIZE - 2 );
411 if( buffer[ BULKDATA_BUFFER_SIZE - 2 ] != ( ( checkSum >> 8 ) & 0xFF ) || \
412 buffer[ BULKDATA_BUFFER_SIZE - 1 ] != ( checkSum & 0xFF ) )
420 #if defined( __WINDOWS__ ) && !( defined( __WIN16__ ) || defined( _WIN32_WCE ) )
422 static int readLine( SOCKET netSocket,
char *buffer )
427 status >= 0 && bufPos < 1024 && \
428 ( bufPos < 1 || buffer[ bufPos -1 ] !=
'\n' );
430 status = recv( netSocket, buffer + bufPos, 1, 0 );
431 while( bufPos > 1 && isspace( buffer[ bufPos - 1 ] ) )
435 while( bufPos > 1 && isspace( buffer[ bufPos - 1 ] ) )
437 buffer[
min( bufPos, 56 ) ] =
'\0';
442 static SOCKET negotiateSTARTTLS(
int *protocol )
445 struct sockaddr_in serverAddr;
449 puts(
"Negotiating SMTP/POP/IMAP/FTP session through to TLS start..." );
450 *protocol = starttlsInfo[ STARTTLS_SERVER_NO ].protocol;
454 memset( &serverAddr, 0,
sizeof(
struct sockaddr_in ) );
455 serverAddr.sin_family = AF_INET;
456 serverAddr.sin_port = htons( ( u_short ) starttlsInfo[ STARTTLS_SERVER_NO ].port );
457 serverAddr.sin_addr.s_addr = inet_addr( starttlsInfo[ STARTTLS_SERVER_NO ].
name );
458 netSocket = socket( PF_INET, SOCK_STREAM, 0 );
459 if( netSocket == INVALID_SOCKET )
461 printf(
"Couldn't create socket, line %d.\n", __LINE__ );
464 status = connect( netSocket, (
struct sockaddr * ) &serverAddr,
465 sizeof(
struct sockaddr_in ) );
466 if( status == SOCKET_ERROR )
468 closesocket( netSocket );
469 printf(
"Couldn't connect socket, line %d.\n", __LINE__ );
474 if( *protocol == PROTOCOL_POP_DIRECT )
476 *protocol = PROTOCOL_POP;
479 if( *protocol == PROTOCOL_SMTP_DIRECT )
481 *protocol = PROTOCOL_SMTP;
486 bufPos = readLine( netSocket, buffer );
487 if( bufPos < 3 || ( strncmp( buffer,
"220", 3 ) && \
488 strncmp( buffer,
"+OK", 3 ) && \
489 strncmp( buffer,
"OK", 2 ) ) )
491 closesocket( netSocket );
492 printf(
"Got response '%s', line %d.\n", buffer, __LINE__ );
495 printf(
" Server said: '%s'\n", buffer );
496 assert( ( *protocol == PROTOCOL_SMTP && !strncmp( buffer,
"220", 3 ) ) || \
497 ( *protocol == PROTOCOL_POP && !strncmp( buffer,
"+OK", 3 ) ) || \
498 ( *protocol == PROTOCOL_IMAP && !strncmp( buffer,
"OK", 2 ) ) || \
499 ( *protocol == PROTOCOL_FTP && !strncmp( buffer,
"220", 3 ) ) || \
500 *protocol == PROTOCOL_NONE );
504 send( netSocket,
"STLS\r\n", 6, 0 );
505 puts(
" We said: 'STLS'" );
514 send( netSocket,
"a001 STARTTLS\r\n", 15, 0 );
515 puts(
" We said: 'STARTTLS'" );
519 send( netSocket,
"EHLO foo.bar.com\r\n", 18, 0 );
520 puts(
" We said: 'EHLO foo.bar.com'" );
523 bufPos = readLine( netSocket, buffer );
524 if( bufPos < 3 || strncmp( buffer,
"250", 3 ) )
526 closesocket( netSocket );
527 printf(
"Got response '%s', line %d.\n", buffer,
531 printf(
" Server said: '%s'\n", buffer );
533 while( !strncmp( buffer,
"250-", 4 ) );
534 send( netSocket,
"STARTTLS\r\n", 10, 0 );
535 puts(
" We said: 'STARTTLS'" );
539 send( netSocket,
"AUTH TLS\r\n", 10, 0 );
540 puts(
" We said: 'AUTH TLS'" );
546 bufPos = readLine( netSocket, buffer );
547 if( bufPos < 3 || ( strncmp( buffer,
"220", 3 ) && \
548 strncmp( buffer,
"+OK", 3 ) && \
549 strncmp( buffer,
"OK", 2 ) && \
550 strncmp( buffer,
"234", 3 ) ) )
552 printf(
"Got response '%s', line %d.\n", buffer, __LINE__ );
555 printf(
" Server said: '%s'\n", buffer );
564 const int sessionID,
const BOOLEAN localSession )
569 const char *versionStr[] = {
"SSL",
"TLS",
"TLS 1.1",
"TLS 1.2",
"TLS 1.3" };
571 starttlsInfo[ STARTTLS_SERVER_NO ].
name : \
573 sslInfo[ SSL_SERVER_NO ].name : \
575 sslInfo[ TLS_SERVER_NO ].
name : \
577 sslInfo[ TLS11_SERVER_NO ].name : \
578 sslInfo[ TLS12_SERVER_NO ].name;
579 BYTE *bulkBuffer = NULL;
580 #if defined( __WINDOWS__ ) && !( defined( __WIN16__ ) || defined( _WIN32_WCE ) )
584 #ifdef IS_BROKEN_SERVER
602 printf(
"Timed out waiting for server to initialise, "
603 "line %d.\n", __LINE__ );
612 #ifdef WINDOWS_THREADS
614 goto dualThreadContinue;
618 printf(
"%02d: ", sessionID );
619 printf(
"%sTesting %s%s session%s...\n", isServer ?
"SVR: " :
"",
620 localSession ?
"local " :
"", versionStr[ version ],
627 ( testType ==
SSL_TEST_ECC ) ?
" with P256 ECC crypto" : \
629 if( !isServer && !localSession )
630 printf(
" Remote host: %s.\n", serverName );
638 printf(
"cryptCreateSession() failed with error code %d, line %d.\n",
646 printf(
"cryptSetAttribute() failed with error code %d, line %d.\n",
654 if( ( bulkBuffer = malloc( BULKDATA_BUFFER_SIZE ) ) == NULL )
656 printf(
"Failed to allocated %ld bytes, line %d.\n",
657 BULKDATA_BUFFER_SIZE, __LINE__ );
661 handleBulkBuffer( bulkBuffer,
TRUE );
676 #ifdef UNICODE_STRINGS
679 void *fileNamePtr = filenameBuffer;
695 #ifdef UNICODE_STRINGS
696 mbstowcs( wcBuffer, filenameBuffer,
697 strlen( filenameBuffer ) + 1 );
698 fileNamePtr = wcBuffer;
720 printf(
"SVR: Client certificate keyset open failed with error "
721 "code %d, line %d.\n", status, __LINE__ );
742 #if defined( __WINDOWS__ ) && !( defined( __WIN16__ ) || defined( _WIN32_WCE ) )
745 if( WSAStartup( 2, &wsaData ) )
747 printf(
"Couldn't initialise sockets interface, line %d.\n",
756 netSocket = negotiateSTARTTLS( &protocol );
763 puts(
"This is a nonfatal error (a great many other "
764 "things can go wrong while\nnegotiating through "
765 "to the TLS upgrade).\n" );
772 #if defined( _MSC_VER ) && defined( _M_X64 )
779 #elif defined( DDNAME_IO )
783 #elif defined( __WIN16__ ) || defined( _WIN32_WCE )
811 #if ( TLS12_SERVER_NO == 30 && 0 )
813 "cc47650c403654f6fe439e5c88a2e6c2_66335081-ee61-4aa8-862d-a423d58",
886 #if defined( __WINDOWS__ ) && !( defined( __WIN16__ ) || defined( _WIN32_WCE ) )
887 closesocket( netSocket );
896 printf(
"cryptSetAttribute/AttributeString() failed with error code "
897 "%d, line %d.\n", status, __LINE__ );
900 #ifdef IS_BROKEN_SERVER
913 printf(
"%02d: ", sessionID );
914 printf(
"%sActivating %s session...\n", isServer ?
"SVR: " :
"",
915 versionStr[ version ] );
923 if( localSession && isServer )
929 #ifdef IS_BROKEN_SERVER
940 printf(
"%02d: ", sessionID );
943 #ifdef WINDOWS_THREADS
951 localCryptSession = cryptSession;
952 _beginthreadex( NULL, 0, tlsServerDualThread2, NULL, 0, &threadID );
957 assert( localSession > 0 );
958 cryptSession = localCryptSession;
961 puts(
"SVR: Confirming authentication to client..." );
971 char strBuffer[ 128 ];
975 #if defined( __WINDOWS__ ) && !defined( _WIN32_WCE )
976 closesocket( netSocket );
990 printf(
"%02d: ", sessionID );
991 sprintf( strBuffer,
"%sAttempt to activate %s%s session",
992 isServer ?
"SVR: " :
"", localSession ?
"local " :
"",
993 versionStr[ version ] );
1004 puts(
" (Server could be down, faking it and continuing...)\n" );
1012 puts(
" (This test checks error handling, so the failure "
1013 "response is correct).\n" );
1021 #ifdef NO_SESSION_CACHE
1025 printf(
"%sTLS-PSK handshake without password should have "
1026 "failed but succeeded,\nline %d.\n",
1027 isServer ?
"SVR: " :
"", __LINE__ );
1034 #ifndef NO_SESSION_CACHE
1044 printf(
"%sSession resumption didn't actually resume a previous "
1045 "session, line %d.\n", isServer ?
"SVR: " :
"",
1055 const BOOLEAN isFirstSession = \
1059 #ifdef NO_SESSION_CACHE
1069 !isServer && isFirstSession,
FALSE ) )
1076 printf(
"Warning: Expected to connect using %s but only "
1077 "connected using %s.\n", versionStr[ version ],
1078 versionStr[ actualVersion ] );
1081 #ifdef NO_SESSION_CACHE
1082 if( ( !localSession && !isServer ) ||
1085 if( !localSession && !isServer )
1091 &cryptCertificate );
1094 printf(
"%sCouldn't get %s certificate, status %d, line %d.\n",
1095 isServer ?
"SVR: " :
"", isServer ?
"client" :
"server",
1099 puts( localSession ?
"SVR: Client certificate details are:" : \
1100 "Server certificate details are:" );
1111 userNameBuffer, &length );
1114 printf(
"SVR: Couldn't read client user name, status %d, line "
1115 "%d.\n", status, __LINE__ );
1118 #ifdef UNICODE_STRINGS
1119 userNameBuffer[ length /
sizeof(
wchar_t ) ] =
TEXT(
'\0' );
1120 printf(
"SVR: Client user name = '%S'.\n", userNameBuffer );
1122 userNameBuffer[
length ] =
'\0';
1123 printf(
"SVR: Client user name = '%s'.\n", userNameBuffer );
1130 #ifdef IS_HIGHVOLUME_SERVER
1142 "SVR: Session timeout set" :
"Session timeout set",
1154 status =
cryptPushData( cryptSession, bulkBuffer + byteCount,
1155 BULKDATA_BUFFER_SIZE - byteCount,
1161 byteCount < BULKDATA_BUFFER_SIZE );
1165 "SVR: Send of bulk data to client", status,
1173 "SVR: Flush of bulk data to client", status,
1177 if( byteCount != BULKDATA_BUFFER_SIZE )
1179 printf(
"Only sent %ld of %ld bytes, line %d.\n", byteCount,
1180 BULKDATA_BUFFER_SIZE, __LINE__ );
1190 status =
cryptPopData( cryptSession, bulkBuffer + byteCount,
1191 BULKDATA_BUFFER_SIZE - byteCount,
1197 byteCount < BULKDATA_BUFFER_SIZE );
1200 char strBuffer[ 256 ];
1202 sprintf( strBuffer,
"Read of bulk data from server aborted "
1203 "after %ld of %ld bytes were read\n(last "
1204 "read = %d bytes), transfer",
1205 byteCount, BULKDATA_BUFFER_SIZE,
1210 if( byteCount != BULKDATA_BUFFER_SIZE )
1212 printf(
"Only received %ld of %ld bytes, line %d.\n",
1213 byteCount, BULKDATA_BUFFER_SIZE, __LINE__ );
1216 if( !handleBulkBuffer( bulkBuffer,
FALSE ) )
1218 printf(
"Received buffer contents don't match sent buffer "
1219 "contents, line %d.", __LINE__ );
1235 #if defined( __MVS__ ) || defined( __VMCMS__ )
1236 #pragma convlit( resume )
1238 #if defined( __ILEC400__ )
1239 #pragma convert( 819 )
1241 const char serverReply[] = \
1243 "Date: Fri, 7 June 2005 20:02:07 GMT\n"
1244 "Server: cryptlib SSL/TLS test\n"
1245 "Content-Type: text/html\n"
1246 "Connection: Close\n"
1248 "<!DOCTYPE HTML SYSTEM \"html.dtd\">\n"
1251 "<title>cryptlib SSL/TLS test page</title>\n"
1253 "Test message from the cryptlib SSL/TLS server.<p>\n"
1256 #if defined( __MVS__ ) || defined( __VMCMS__ )
1257 #pragma convlit( suspend )
1259 #if defined( __ILEC400__ )
1260 #pragma convert( 0 )
1269 "from client", status, __LINE__ );
1274 #if defined( __MVS__ ) || defined( __VMCMS__ )
1275 asciiToEbcdic( buffer, bytesCopied );
1279 printf(
"---- Client sent %d bytes ----\n", bytesCopied );
1281 puts(
"---- End of output ----" );
1286 sizeof( serverReply ) - 1, &bytesCopied );
1290 bytesCopied !=
sizeof( serverReply ) - 1 )
1293 "client", status, __LINE__ );
1304 char fetchString[ 128 ];
1313 strcpy( fetchString,
"EHLO foo.bar.com\r\n" );
1317 strcpy( fetchString,
"CAPA\r\n" );
1321 strcpy( fetchString,
"a003 CAPABILITY\r\n" );
1325 strcpy( fetchString,
"USER test\r\n" );
1330 sprintf( fetchString,
"GET %s HTTP/1.0\r\n\r\n",
1331 sslInfo[ SSL_SERVER_NO ].
path );
1333 fetchStringLen = strlen( fetchString );
1334 #if defined( __MVS__ ) || defined( __VMCMS__ )
1335 ebcdicToAscii( fetchString, fetchStringLen );
1338 fetchStringLen, &bytesCopied );
1344 "server", status, __LINE__ );
1355 "server", status, __LINE__ );
1366 puts(
"Server returned no data in response to our request." );
1370 buffer[
min( bytesCopied, 4096 ) ] =
'\0';
1371 #if defined( __MVS__ ) || defined( __VMCMS__ )
1372 asciiToEbcdic( buffer, bytesCopied );
1376 printf(
"---- Server sent %d bytes ----\n", bytesCopied );
1378 if( bytesCopied > 4096 )
1379 printf(
" (Further %d bytes data omitted)\n",
1380 bytesCopied - 4096 );
1381 puts(
"---- End of output ----" );
1384 #ifdef IS_HIGHVOLUME_SERVER
1396 puts(
"Remote system closed connection." );
1401 "server", status, __LINE__ );
1409 #if defined( __MVS__ ) || defined( __VMCMS__ )
1410 asciiToEbcdic( buffer, bytesCopied );
1414 printf(
"---- Server sent further %d bytes ----\n",
1417 puts(
"---- End of output ----" );
1428 strcpy( fetchString,
"QUIT\r\n" );
1432 strcpy( fetchString,
"USER test\r\n" );
1436 strcpy( fetchString,
"a004 LOGIN test\r\n" );
1440 strcpy( fetchString,
"QUIT\r\n" );
1442 fetchStringLen = strlen( fetchString );
1443 #if defined( __MVS__ ) || defined( __VMCMS__ )
1444 ebcdicToAscii( fetchString, fetchStringLen );
1447 fetchStringLen, &bytesCopied );
1453 "server", status, __LINE__ );
1462 "server", status, __LINE__ );
1467 #if defined( __MVS__ ) || defined( __VMCMS__ )
1468 asciiToEbcdic( buffer, bytesCopied );
1472 printf(
"---- Server sent %d bytes ----\n", bytesCopied );
1474 puts(
"---- End of output ----" );
1484 printf(
"cryptDestroySession() failed with error code %d, line %d.\n",
1488 #if defined( __WINDOWS__ ) && !defined( _WIN32_WCE )
1491 closesocket( netSocket );
1497 printf(
"%02d: ", sessionID );
1498 printf(
"%s%s session succeeded.\n", isServer ?
"SVR: " :
"",
1499 versionStr[ version ] );
1611 int testSessionTLS12Server(
void )
1624 #ifdef WINDOWS_THREADS
1626 unsigned __stdcall sslServerThread(
void *
dummy )
1641 hThread = (
HANDLE ) _beginthreadex( NULL, 0, sslServerThread,
1642 NULL, 0, &threadID );
1652 unsigned __stdcall sslClientCertServerThread(
void *dummy )
1667 hThread = (
HANDLE ) _beginthreadex( NULL, 0, sslClientCertServerThread,
1668 NULL, 0, &threadID );
1678 unsigned __stdcall tlsServerThread(
void *dummy )
1693 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsServerThread,
1694 NULL, 0, &threadID );
1704 unsigned __stdcall tlsSharedKeyServerThread(
void *dummy )
1719 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsSharedKeyServerThread,
1720 NULL, 0, &threadID );
1730 unsigned __stdcall tlsNoSharedKeyServerThread(
void *arg )
1732 int testType = *( (
int * ) arg );
1748 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsNoSharedKeyServerThread,
1749 &arg, 0, &threadID );
1756 if( status !=
TRUE )
1762 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsNoSharedKeyServerThread,
1763 &arg, 0, &threadID );
1773 unsigned __stdcall tlsBulkTransferServerThread(
void *dummy )
1788 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsBulkTransferServerThread,
1789 NULL, 0, &threadID );
1799 unsigned __stdcall tlsResumeServerThread(
void *dummy )
1814 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsServerThread,
1815 NULL, 0, &threadID );
1825 unsigned __stdcall tls11ServerThread(
void *dummy )
1840 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tls11ServerThread,
1841 NULL, 0, &threadID );
1851 unsigned __stdcall tls12ServerThread(
void *dummy )
1866 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tls12ServerThread,
1867 NULL, 0, &threadID );
1877 unsigned __stdcall tls12ServerEccThread(
void *dummy )
1893 puts(
"ECC is disabled in this build of cryptlib, skipping TLS ECC "
1900 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tls12ServerEccThread,
1901 NULL, 0, &threadID );
1911 unsigned __stdcall tls12ServerEcc384Thread(
void *dummy )
1927 puts(
"ECC is disabled in this build of cryptlib, skipping TLS ECC "
1934 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tls12ServerEcc384Thread,
1935 NULL, 0, &threadID );
1945 unsigned __stdcall tls12ClientCertServerThread(
void *dummy )
1960 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tls12ClientCertServerThread,
1961 NULL, 0, &threadID );
1971 unsigned __stdcall tlsServerDualThread2(
void *dummy )
1978 unsigned __stdcall tlsServerDualThread1(
void *dummy )
1993 hThread = (
HANDLE ) _beginthreadex( NULL, 0, tlsServerDualThread1,
1994 NULL, 0, &threadID );
2004 unsigned __stdcall tlsServerMultiThread(
void *threadIdPtr )
2006 int threadID = *( (
int * ) threadIdPtr );
2013 unsigned __stdcall tlsClientMultiThread(
void *threadIdPtr )
2015 int threadID = *( (
int * ) threadIdPtr );