hxcpp

created pr with hxcpp/ssl-short-read.1 on 2026-10-27T21:26:44Z · by d7025af3
added hxcpp/ssl-short-read.2 on 2026-10-27T21:29:42Z · by d7025af3
1: d70d1ca < -: ------- SSL read/write needs to return wouldblock if partial read
-: ------- > 1: dd64130 SSL read/write needs to return wouldblock if partial read
2: af61d88 = 2: d3fe10a Throw exceptions for more error codes
3: 124b85a = 3: 6f33bf1 Retry handshake on would block
4: e8e22fe = 4: 5a504b4 Include whole erorr message in exception
cmds
checkout latest patchset:
ssh pr.pico.sh pull hxcpp:ssl-short-read | git am -3
checkout specific patchset revision:
ssh pr.pico.sh pull hxcpp:ssl-short-read [rev] | git am -3
add changes to patch request:
git format-patch main --stdout | ssh pr.pico.sh hxcpp:ssl-short-read
add comment to patch request:
ssh pr.pico.sh comment hxcpp:ssl-short-read "lgtm!"
+7 -4 Sources/c_borogove/src/hx/libs/ssl/SSL.cpp #
......@@ -131,10 +131,13 @@ static OSStatus socket_write(SSLConnectionRef conn, const void *data, size_t *le
131131 void _hx_ssl_set_socket(Dynamic hssl, Dynamic hsocket) {
132132 sslctx* ctx = val_ssl(hssl);
133133 SocketWrapper* sock = val_socket(hsocket);
134- SSLSetConnection(ctx->sslCtx, (SSLConnectionRef)(intptr_t)sock->socket);
135- SSLSetIOFuncs(ctx->sslCtx, socket_read, socket_write);
136- SSLSetProtocolVersionMin(ctx->sslCtx, kTLSProtocol1);
137- SSLSetProtocolVersionMax(ctx->sslCtx, kTLSProtocol13);
134+ OSStatus s;
135+
136+ s = SSLSetConnection(ctx->sslCtx, (SSLConnectionRef)(intptr_t)sock->socket);
137+ if (s != noErr) hx::Throw(HX_CSTRING("SSLSetConnection failed"));
138+
139+ s = SSLSetIOFuncs(ctx->sslCtx, socket_read, socket_write);
140+ if (s != noErr) hx::Throw(HX_CSTRING("SSLSetIOFuncs failed"));
138141 }
139142
140143 void _hx_ssl_set_hostname(Dynamic hssl, String hostname) {
Back to top