Check-in [ad1752cdaf]
Bounty program for improvements to Tcl and certain Tcl packages.
Tcl 2019 Conference, Houston/TX, US, Nov 4-8
Send your abstracts to [email protected]
or submit via the online form by Sep 9.

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Mapped OpenSSL errors for read/write wants to EAGAIN
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ad1752cdaf451d869abbdcc76d59260dc2f11f59
User & Date: rkeene 2016-12-13 18:49:19
Context
2016-12-13
18:49
Less heavy handed rewriting of error codes in Tcl BIO check-in: d8ce3045d5 user: rkeene tags: trunk
18:49
Mapped OpenSSL errors for read/write wants to EAGAIN check-in: ad1752cdaf user: rkeene tags: trunk
18:42
Fixed help string for ssl-fastpath to correctly indicate that it is disabled by default check-in: 80d0949714 user: rkeene tags: trunk
Changes

Changes to tlsIO.c.

463
464
465
466
467
468
469





470
471
472
473
474
475
476
...
566
567
568
569
570
571
572
573


574
575
576
577
578
579
580
			break;
		case SSL_ERROR_ZERO_RETURN:
			dprintf("Got SSL_ERROR_ZERO_RETURN, this means an EOF has been reached");
			bytesRead = 0;
			*errorCodePtr = 0;
			break;





		default:
			dprintf("Unknown error (err = %i), mapping to EOF", err);
			*errorCodePtr = 0;
			bytesRead = 0;
			break;
	}

................................................................................
	switch (err) {
		case SSL_ERROR_NONE:
			if (written < 0) {
				written = 0;
			}
			break;
		case SSL_ERROR_WANT_WRITE:
			dprintf(" write W BLOCK");


			break;
		case SSL_ERROR_WANT_READ:
			dprintf(" write R BLOCK");
			break;
		case SSL_ERROR_WANT_X509_LOOKUP:
			dprintf(" write X BLOCK");
			break;






>
>
>
>
>







 







|
>
>







463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
...
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
			break;
		case SSL_ERROR_ZERO_RETURN:
			dprintf("Got SSL_ERROR_ZERO_RETURN, this means an EOF has been reached");
			bytesRead = 0;
			*errorCodePtr = 0;
			break;
		case SSL_ERROR_WANT_READ:
			dprintf("Got SSL_ERROR_WANT_READ, mapping this to EAGAIN");
			bytesRead = -1;
			*errorCodePtr = EAGAIN;
			break;
		default:
			dprintf("Unknown error (err = %i), mapping to EOF", err);
			*errorCodePtr = 0;
			bytesRead = 0;
			break;
	}

................................................................................
	switch (err) {
		case SSL_ERROR_NONE:
			if (written < 0) {
				written = 0;
			}
			break;
		case SSL_ERROR_WANT_WRITE:
			dprintf("Got SSL_ERROR_WANT_WRITE, mapping it to EAGAIN");
			*errorCodePtr = EAGAIN;
			written = -1;
			break;
		case SSL_ERROR_WANT_READ:
			dprintf(" write R BLOCK");
			break;
		case SSL_ERROR_WANT_X509_LOOKUP:
			dprintf(" write X BLOCK");
			break;