Commit 0d7140a
Summary of changes in this commit: (#18)
* Summary of changes in this commit:
* Factor ERR_clear_error into its own function and call in the geterror macro right before we do SSL IO operations;
the openssl docs recommend this and trying to keep your error stack as clean as possible
* Add :acquire/:release memory orderings to our atomic operations; shouldn't make that big of a difference, but
more semantically correct with how we define our atomicget/atomicset macros
* Instead of call `eof(ssl)` before each SSL_read_ex call, we instead only check that the ssl is open, then
optimistically call SSL_read_ex; if there are buffered bytes, they'll be processed and we saved ourselves
an `eof` call; if SSL_read_ex returns SSL_WANT_READ, then we'll call `eof` anyway afterwards
* Remove the finalizer on our SSL struct; @kpamnany recommended avoiding finalizers and we already have really
well defined create/destroy moments for SSLs, so we don't need to be messing w/ the global finalizer list
* Remove 2 `update_tls_error_state` calls in SSL_pending and SSL_has_pending; these aren't needed because
the openssl documentation mentions specifically these don't use the same error reporting as IO functions
* Also tweaked our eof call to avoid allocating a Ref{UInt8} each time it is called
* Update src/ssl.jl
Co-authored-by: Nick Robinson <[email protected]>
* Update src/ssl.jl
Co-authored-by: Nick Robinson <[email protected]>
* Update src/ssl.jl
Co-authored-by: Nick Robinson <[email protected]>
---------
Co-authored-by: Nick Robinson <[email protected]>1 parent e03e6c4 commit 0d7140a
2 files changed
+64
-42
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2931 | 2931 | | |
2932 | 2932 | | |
2933 | 2933 | | |
2934 | | - | |
2935 | | - | |
2936 | | - | |
2937 | | - | |
| 2934 | + | |
2938 | 2935 | | |
2939 | 2936 | | |
2940 | 2937 | | |
2941 | 2938 | | |
2942 | 2939 | | |
2943 | 2940 | | |
2944 | 2941 | | |
| 2942 | + | |
| 2943 | + | |
| 2944 | + | |
| 2945 | + | |
| 2946 | + | |
| 2947 | + | |
| 2948 | + | |
2945 | 2949 | | |
2946 | 2950 | | |
2947 | 2951 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
288 | 288 | | |
289 | 289 | | |
290 | 290 | | |
291 | | - | |
292 | 291 | | |
293 | 292 | | |
294 | 293 | | |
| |||
375 | 374 | | |
376 | 375 | | |
377 | 376 | | |
378 | | - | |
| 377 | + | |
379 | 378 | | |
380 | 379 | | |
381 | 380 | | |
| |||
384 | 383 | | |
385 | 384 | | |
386 | 385 | | |
387 | | - | |
| 386 | + | |
388 | 387 | | |
389 | 388 | | |
390 | 389 | | |
| |||
399 | 398 | | |
400 | 399 | | |
401 | 400 | | |
| 401 | + | |
402 | 402 | | |
403 | 403 | | |
404 | 404 | | |
| |||
414 | 414 | | |
415 | 415 | | |
416 | 416 | | |
417 | | - | |
| 417 | + | |
418 | 418 | | |
419 | | - | |
| 419 | + | |
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
| |||
432 | 432 | | |
433 | 433 | | |
434 | 434 | | |
435 | | - | |
436 | | - | |
437 | | - | |
438 | | - | |
| 435 | + | |
| 436 | + | |
| 437 | + | |
| 438 | + | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
439 | 443 | | |
440 | 444 | | |
441 | 445 | | |
| |||
450 | 454 | | |
451 | 455 | | |
452 | 456 | | |
453 | | - | |
| 457 | + | |
| 458 | + | |
454 | 459 | | |
455 | 460 | | |
456 | 461 | | |
457 | 462 | | |
458 | | - | |
459 | | - | |
460 | | - | |
461 | | - | |
462 | | - | |
463 | | - | |
464 | | - | |
465 | | - | |
466 | | - | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
467 | 479 | | |
468 | 480 | | |
469 | 481 | | |
470 | 482 | | |
471 | 483 | | |
472 | | - | |
473 | | - | |
| 484 | + | |
| 485 | + | |
474 | 486 | | |
475 | 487 | | |
476 | 488 | | |
| |||
534 | 546 | | |
535 | 547 | | |
536 | 548 | | |
537 | | - | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
538 | 552 | | |
539 | | - | |
| 553 | + | |
540 | 554 | | |
541 | 555 | | |
542 | | - | |
| 556 | + | |
543 | 557 | | |
544 | 558 | | |
545 | 559 | | |
546 | 560 | | |
547 | 561 | | |
548 | | - | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
549 | 567 | | |
550 | 568 | | |
551 | 569 | | |
| |||
564 | 582 | | |
565 | 583 | | |
566 | 584 | | |
567 | | - | |
568 | 585 | | |
569 | 586 | | |
570 | 587 | | |
| |||
575 | 592 | | |
576 | 593 | | |
577 | 594 | | |
578 | | - | |
579 | 595 | | |
580 | 596 | | |
581 | 597 | | |
582 | | - | |
583 | | - | |
584 | 598 | | |
585 | 599 | | |
586 | 600 | | |
| |||
598 | 612 | | |
599 | 613 | | |
600 | 614 | | |
601 | | - | |
602 | | - | |
603 | | - | |
604 | | - | |
605 | | - | |
606 | | - | |
607 | | - | |
608 | | - | |
| 615 | + | |
| 616 | + | |
| 617 | + | |
| 618 | + | |
| 619 | + | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
609 | 627 | | |
610 | 628 | | |
611 | 629 | | |
| |||
637 | 655 | | |
638 | 656 | | |
639 | 657 | | |
640 | | - | |
| 658 | + | |
641 | 659 | | |
642 | 660 | | |
643 | 661 | | |
| |||
0 commit comments