Overview
Comment: | Added IO buffer checks to TlsChannelHandlerTimer mask function. Reordered TlsNotifyProc to check conditions prior to timer deletion. Pass buffer length in MessageCallback. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | main |
Files: | files | file ages | folders |
SHA3-256: |
6252a3a1f56de1c69f993bbaa539efd0 |
User & Date: | bohagan on 2024-12-29 04:36:20 |
Other Links: | branch diff | manifest | tags |
Context
2024-12-31
| ||
04:12 | More comment updates and changes for fast path option check-in: c61a46b561 user: bohagan tags: trunk, main | |
2024-12-29
| ||
04:36 | Added IO buffer checks to TlsChannelHandlerTimer mask function. Reordered TlsNotifyProc to check conditions prior to timer deletion. Pass buffer length in MessageCallback. check-in: 6252a3a1f5 user: bohagan tags: trunk, main | |
04:18 | Renamed BIO read/write functions to input/output to avoid confusion with API names. Added PKI and Certificates section to docs. Added/updated comments, formatting updates, etc. check-in: 3848af25d2 user: bohagan tags: trunk, main | |
Changes
Modified generic/tls.c
from [6556ea2daa]
to [1c80245128].
︙ | |||
227 228 229 230 231 232 233 234 235 236 237 238 239 240 | 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 | + | { State *statePtr = (State*)arg; Tcl_Interp *interp = statePtr->interp; Tcl_Obj *cmdPtr; char *ver, *type; BIO *bio; char buffer[15000]; Tcl_Size blen = 0; buffer[0] = 0; dprintf("Called"); if (statePtr->callback == (Tcl_Obj*)NULL) { return; } |
︙ | |||
296 297 298 299 300 301 302 | 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 | - - - - + + + - + | #endif default: type = "unknown"; } /* Needs compile time option "enable-ssl-trace". */ if ((bio = BIO_new(BIO_s_mem())) != NULL) { |
︙ | |||
2564 2565 2566 2567 2568 2569 2570 | 2564 2565 2566 2567 2568 2569 2570 2571 2572 2573 2574 2575 2576 2577 2578 | - + | /* connection state */ LAPPEND_STR(interp, objPtr, "state", SSL_state_string_long(ssl), -1); /* Get SNI requested server name */ LAPPEND_STR(interp, objPtr, "servername", SSL_get_servername(ssl, TLSEXT_NAMETYPE_host_name), -1); /* Report the selected protocol as a result of the negotiation */ |
︙ | |||
3100 3101 3102 3103 3104 3105 3106 | 3100 3101 3102 3103 3104 3105 3106 3107 3108 3109 3110 3111 3112 3113 3114 3115 3116 3117 3118 | - + - + | /* Remove list of ALPN protocols */ if (statePtr->protos) { ckfree(statePtr->protos); statePtr->protos = NULL; } |
︙ |
Modified generic/tlsIO.c
from [0f8d7086c3]
to [a3e847176e].
︙ | |||
982 983 984 985 986 987 988 | 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 | - + - - + + - - + + - - + + - - - | */ static void TlsChannelHandlerTimer( ClientData clientData) /* Socket state. */ { State *statePtr = (State *) clientData; int mask = statePtr->want; /* Init to SSL_ERROR_WANT_READ and SSL_ERROR_WANT_WRITE */ |
︙ | |||
1079 1080 1081 1082 1083 1084 1085 | 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 | - + - + | watchProc(Tcl_GetChannelInstanceData(parent), mask); /* Do we have any pending events */ pending = (statePtr->want || \ ((mask & TCL_READABLE) && ((Tcl_InputBuffered(statePtr->self) > 0) || (BIO_ctrl_pending(statePtr->bio) > 0))) || ((mask & TCL_WRITABLE) && ((Tcl_OutputBuffered(statePtr->self) > 0) || (BIO_ctrl_wpending(statePtr->bio) > 0)))); |
︙ | |||
1153 1154 1155 1156 1157 1158 1159 | 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 | - + - - - - - - - - - - - - - + + | ClientData instanceData, /* Socket state. */ int mask) /* type of event that occurred: OR-ed * combination of TCL_READABLE or TCL_WRITABLE */ { State *statePtr = (State *) instanceData; int errorCode = 0; |
︙ | |||
1192 1193 1194 1195 1196 1197 1198 | 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 | - - + + + + + + + + + + + - - + + - + | return 0; } dprintf("Tls_WaitForConnect returned an error"); } } |
︙ |