-
Notifications
You must be signed in to change notification settings - Fork 194
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LPC Socket : TLS support #1033
LPC Socket : TLS support #1033
Conversation
…efun socket_set_option() and socket_get_option() for setting TLS params. Also update test_tls.c and /std/http.c to showcase connecting to https://www.google.com
Qodana Community for PythonIt seems all right 👌 No new problems were found according to the checks applied 💡 Qodana analysis was run in the pull request mode: only the changed files were checked Contact Qodana teamContact us at qodana-support@jetbrains.com
|
auto option = (sp - 1)->u.number; | ||
|
||
if (lpc_sock < 0 || lpc_sock >= lpc_socks_num()) { | ||
error("Bad socket descriptor: %d\n", lpc_sock); |
Check failure
Code scanning / CodeQL
Wrong type of arguments to formatting function High
copy_and_push_string(lpc_socks_get(lpc_sock)->options[SO_TLS_SNI_HOSTNAME].u.string); | ||
break; | ||
default: | ||
error("Unknown socket option: %d\n", option); |
Check failure
Code scanning / CodeQL
Wrong type of arguments to formatting function High
auto *arg = sp; | ||
|
||
if (lpc_sock < 0 || lpc_sock >= lpc_socks_num()) { | ||
error("Bad socket descriptor: %d\n", lpc_sock); |
Check failure
Code scanning / CodeQL
Wrong type of arguments to formatting function High
bad_arg(3, F_SOCKET_SET_OPTION); | ||
} | ||
if (arg->u.number != 0 && arg->u.number != 1) { | ||
error("Bad socket option value: %d, onl 0 or 1 is accepted.\n", arg->u.number); |
Check failure
Code scanning / CodeQL
Wrong type of arguments to formatting function High
assign_svalue_no_free(&lpc_socks_get(lpc_sock)->options[SO_TLS_SNI_HOSTNAME], arg); | ||
break; | ||
default: | ||
error("Unknown socket option: %d\n", option); |
Check failure
Code scanning / CodeQL
Wrong type of arguments to formatting function High
…efun socket_set_option() and socket_get_option() for setting TLS params. (fluffos#1033) Also update test_tls.c and /std/http.c to showcase connecting to https://www.google.com
Adding two new mode: STREAM_TLS, STREAM_TLS_BINARY, also add two new efun socket_set_option() and socket_get_option() for setting TLS params.
Also update test_tls.c and /std/http.c to showcase connecting to https://www.google.com