Overview
Comment: | Updated default callbacks in tls.tcl file |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | errors_and_callbacks |
Files: | files | file ages | folders |
SHA3-256: |
cdb51c799e75a81df602bb5f60b16e48 |
User & Date: | bohagan on 2023-07-30 02:53:19 |
Other Links: | branch diff | manifest | tags |
Context
2023-07-30
| ||
03:21 | Merged errors_and_callbacks branch into master check-in: dbe759a0f2 user: bohagan tags: trunk | |
02:53 | Updated default callbacks in tls.tcl file Leaf check-in: cdb51c799e user: bohagan tags: errors_and_callbacks | |
02:09 | Add match result to ALPN callback parameters. This indicates if a common protocol was found or not. check-in: 75f1cfb376 user: bohagan tags: errors_and_callbacks | |
Changes
Modified doc/tls.html from [0f26c0f2be] to [3c88bc4018].
︙ | |||
499 500 501 502 503 504 505 | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 | - + | Where <em>direction</em> is Sent or Received, <em>version</em> is the protocol version, <em>content_type</em> is the message content type, and <em>data</em> is more info on the message from the <code>SSL_trace</code> API. </dd> <br> <dt> |
︙ | |||
555 556 557 558 559 560 561 | 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 | - + - + - + | <br> <br> <dl> <dt> |
︙ |
Modified generic/tls.c from [45bcc590a0] to [b314eff29c].
︙ | |||
604 605 606 607 608 609 610 611 612 613 614 615 616 617 | 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 | + + | } else if (ssl == NULL) { return SSL_TLSEXT_ERR_NOACK; } /* Create command to eval */ cmdPtr = Tcl_DuplicateObj(statePtr->callback); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj("session", -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(Tcl_GetChannelName(statePtr->self), -1)); /* Session id */ session_id = SSL_SESSION_get_id(session, &ulen); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewByteArrayObj(session_id, (int) ulen)); /* Session ticket */ SSL_SESSION_get0_ticket(session, &ticket, &len2); |
︙ | |||
679 680 681 682 683 684 685 686 687 688 689 690 691 692 | 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | + + | if (statePtr->vcmd == (Tcl_Obj*)NULL) { return res; } /* Create command to eval */ cmdPtr = Tcl_DuplicateObj(statePtr->vcmd); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj("alpn", -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(Tcl_GetChannelName(statePtr->self), -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(*out, -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewBooleanObj(res == SSL_TLSEXT_ERR_OK)); /* Eval callback command */ Tcl_IncrRefCount(cmdPtr); if ((code = EvalCallback(interp, statePtr, cmdPtr)) > 1) { res = SSL_TLSEXT_ERR_NOACK; |
︙ | |||
790 791 792 793 794 795 796 797 798 799 800 801 802 803 | 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 | + + | if (statePtr->vcmd == (Tcl_Obj*)NULL) { return SSL_TLSEXT_ERR_OK; } /* Create command to eval */ cmdPtr = Tcl_DuplicateObj(statePtr->vcmd); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj("sni", -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(Tcl_GetChannelName(statePtr->self), -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(servername , -1)); /* Eval callback command */ Tcl_IncrRefCount(cmdPtr); if ((code = EvalCallback(interp, statePtr, cmdPtr)) > 1) { res = SSL_TLSEXT_ERR_ALERT_WARNING; *alert = SSL_AD_UNRECOGNIZED_NAME; /* Not supported by TLS 1.3 */ |
︙ | |||
890 891 892 893 894 895 896 897 898 899 900 901 902 903 | 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 | + + | } remaining = len; servername = (const char *)p; /* Create command to eval */ cmdPtr = Tcl_DuplicateObj(statePtr->vcmd); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj("hello", -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(Tcl_GetChannelName(statePtr->self), -1)); Tcl_ListObjAppendElement(interp, cmdPtr, Tcl_NewStringObj(servername, (int) len)); /* Eval callback command */ Tcl_IncrRefCount(cmdPtr); if ((code = EvalCallback(interp, statePtr, cmdPtr)) > 1) { res = SSL_CLIENT_HELLO_RETRY; *alert = SSL_R_TLSV1_ALERT_USER_CANCELLED; |
︙ |
Modified library/tls.tcl from [91a83164bf] to [806ff9312a].
︙ | |||
330 331 332 333 334 335 336 | 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 | - + + + + + + + - + - + - + - + - + - + | "error" { foreach {chan msg} $args break log 0 "TLS/$chan: error: $msg" } "info" { # poor man's lassign |
︙ | |||
420 421 422 423 424 425 426 | 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 | - + | } if {$cb(handshake) == "done"} { return 1 } } } |
︙ |