Overview
Comment: | Moved SSL shutdown up into the CloseProc, away from the asynchronous EventuallyFree |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
b3abc0c1c474b5b2ea14e4f8d59785e0 |
User & Date: | welch on 2000-06-05 18:09:53 |
Other Links: | manifest | tags |
Context
2000-06-05
| ||
20:20 | changed generation of pkgIndex file for test target check-in: 24a46987ec user: aborr tags: trunk | |
18:09 | Moved SSL shutdown up into the CloseProc, away from the asynchronous EventuallyFree check-in: b3abc0c1c4 user: welch tags: trunk | |
2000-06-03
| ||
05:01 | More test fixes. Tests marked "empty" will hang, presumably because of the synchronous nature of those tests. check-in: 2af1d4883b user: awb tags: trunk | |
Changes
Modified ChangeLog from [5ef64b5c12] to [8f015c6d0b].
|
Modified tls.c from [58fc6e64f6] to [574ea1f12d].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 | - + | /* * Copyright (C) 1997-1999 Matt Newman <[email protected]> * |
︙ | |||
724 725 726 727 728 729 730 | 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | + - + | (TCL_READABLE | TCL_WRITABLE), statePtr->parent); #else statePtr->self = chan; Tcl_StackChannel( interp, Tls_ChannelType(), (ClientData) statePtr, (TCL_READABLE | TCL_WRITABLE), chan); #endif if (statePtr->self == (Tcl_Channel) NULL) { Tls_Free(statePtr); |
︙ | |||
752 753 754 755 756 757 758 | 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 | + - + | statePtr->ssl = SSL_new(statePtr->ctx); if (!statePtr->ssl) { /* SSL library error */ Tcl_AppendResult(interp, "couldn't construct ssl session: ", REASON(), (char *) NULL); Tls_Free(statePtr); |
︙ | |||
1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 | 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + - - + + + + - - + + | *------------------------------------------------------------------- */ void Tls_Free( char *blockPtr ) { State *statePtr = (State *)blockPtr; Tls_Clean(blockPtr); Tcl_Free((char *)statePtr); } /* *------------------------------------------------------------------- * * Tls_Clean -- * * This procedure cleans up when a SSL socket based channel * is closed and its reference count falls below 1. This should * be called synchronously by the CloseProc, not in the * EventuallyFree callback. * * Results: * none * * Side effects: * Frees all the state * *------------------------------------------------------------------- */ void Tls_Clean( char *blockPtr ) { State *statePtr = (State *)blockPtr; /* we're assuming here that we're single-threaded */ if (statePtr->ssl) { SSL_shutdown(statePtr->ssl); SSL_free(statePtr->ssl); statePtr->ssl = NULL; } |
︙ |
Modified tlsIO.c from [917446d5a9] to [83d2c33ca1].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 | - + | /* * Copyright (C) 1997-2000 Matt Newman <[email protected]> * |
︙ | |||
138 139 140 141 142 143 144 145 146 147 148 149 150 151 | 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 | + | ChannelHandler, (ClientData) statePtr); if (statePtr->timer != (Tcl_TimerToken)NULL) { Tcl_DeleteTimerHandler (statePtr->timer); statePtr->timer = (Tcl_TimerToken)NULL; } Tls_Clean(statePtr); Tcl_EventuallyFree( (ClientData)statePtr, Tls_Free); return TCL_OK; } /* *------------------------------------------------------------------- * |
︙ |