Skip to content
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

Merged
merged 1 commit into from
Dec 23, 2023
Merged

LPC Socket : TLS support #1033

merged 1 commit into from
Dec 23, 2023

Conversation

thefallentree
Copy link
Member

@thefallentree thefallentree commented Dec 23, 2023

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

…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
@thefallentree thefallentree changed the title Adding two new mode: STREAM_TLS, STREAM_TLS_BINARY, also add two new … LPC Socket : TLS support Dec 23, 2023
Copy link

Qodana Community for Python

It 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
☁️ View the detailed Qodana report

Contact Qodana team

Contact 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

This argument should be of type 'int' but is of type 'signed long'.
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

This argument should be of type 'int' but is of type 'signed long'.
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

This argument should be of type 'int' but is of type 'signed long'.
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

This argument should be of type 'int' but is of type 'signed long'.
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

This argument should be of type 'int' but is of type 'signed long'.
@thefallentree thefallentree merged commit 1fd7f61 into master Dec 23, 2023
13 of 16 checks passed
lostsnow pushed a commit to lostsnow/fluffos that referenced this pull request Mar 12, 2024
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant