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

aws_tls_handler_write exists in header file, but there's no implementation? #624

Open
quinnj opened this issue Feb 18, 2024 · 3 comments
Open
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue

Comments

@quinnj
Copy link
Contributor

quinnj commented Feb 18, 2024

Describe the bug

The tls_channel_handler.h file includes the following declaration:

/**
 * Not necessary if you are installing more handlers into the channel, but if you just want to have TLS for arbitrary
 * data and use the channel handler directly, this function allows you to write data to the channel and have it
 * encrypted.
 */
AWS_IO_API int aws_tls_handler_write(
    struct aws_channel_handler *handler,
    struct aws_channel_slot *slot,
    struct aws_byte_buf *buf,
    aws_channel_on_message_write_completed_fn *on_write_completed,
    void *completion_user_data);

But there doesn't seem to be a generic or any platform-specific implementations of the function.

Expected Behavior

Have an implementation of this function.

Current Behavior

Can't use the function

Reproduction Steps

Tried to use function but discovered I couldn't

Possible Solution

No response

Additional Information/Context

No response

aws-c-io version used

latest master

Compiler and version used

not exactly sure; can find out if needed

Operating System and version

pretty up-to-date macos

@quinnj quinnj added bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 18, 2024
@jmklix
Copy link
Member

jmklix commented Feb 21, 2024

Sorry for any confusion, but this was never implemented as you noticed. I've created a PR to remove it from the header file, but I would like to know more details about your use case and why you would like to use this function?

@jmklix jmklix added feature-request A feature should be added or improved. response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. p3 This is a minor priority issue and removed bug This issue is a bug. needs-triage This issue or PR still needs to be triaged. labels Feb 21, 2024
Copy link

Greetings! It looks like this issue hasn’t been active in longer than a week. We encourage you to check if this is still an issue in the latest release. Because it has been longer than a week since the last update on this, and in the absence of more information, we will be closing this issue soon. If you find that this is still a problem, please feel free to provide a comment or add an upvote to prevent automatic closure, or if the issue is already closed, please feel free to open a new one.

@github-actions github-actions bot added the closing-soon This issue will automatically close in 4 days unless further comments are made. label Feb 23, 2024
@quinnj
Copy link
Contributor Author

quinnj commented Feb 23, 2024

Sorry for any confusion, but this was never implemented as you noticed. I've created a PR to remove it from the header file, but I would like to know more details about your use case and why you would like to use this function?

Well, when I was originally reading through, I figured that using the on_data_read and aws_tls_handler_write would be simplest for my use case (just needing a plain socket + tls that I read/write to directly). But reading up a bit more, writing my own aws_channel_handler ended up not being as intimidating as I originally thought it would.

It seems to me that there could be a default read_write_handler (like the one in the tests) that did the channel_handler stuff for you and the user could just provide the on_data_read and then call write. Under the hood, the handler could either do the operations directly or queue operations up and then process like a lot of the http code does. Anyway, like I said, implementing your own handler actually isn't as scary as it may first seem, so maybe it's not a big deal.

@github-actions github-actions bot removed closing-soon This issue will automatically close in 4 days unless further comments are made. response-requested Waiting on additional info and feedback. Will move to 'closing-soon' in 7 days. labels Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. p3 This is a minor priority issue
Projects
None yet
Development

No branches or pull requests

2 participants