-
Notifications
You must be signed in to change notification settings - Fork 57
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
Upgrade to latest OpenSSL #51
base: master
Are you sure you want to change the base?
Conversation
…nwrap in examples is acceptable
…eir own SSL configuration
…will contain ssl configuration information to be used in data_command
I discovered that there were some compilation errors I hadn't noticed that arise when building with --features "secure". They have been taken care of.
… the codebase and have multiple copies of definitions of things to work around a feature flag when the tradeoff is having a lot more usable SSL
…es very similar to the into() method (https://doc.rust-lang.org/std/convert/trait.Into.html#tymethod.into), I changed their names to into_secure and into_insecure to be a little clearer about how they work
…type for other cases. The new type allows us to retain (and require) information about an Ssl configuration only when the user wants to supply one. Need a way to avoid so much code duplication though
…under the secure feature flag again
…nt when the secure feature flag is used
…just the String description of the latter
…tain a boxed generic error
…sl, and simplify some code
…o test TLS against
…o the test server
@zsck Looks like the build is broken. |
|
I am ok with the server being in python. Just having a server to test with I think is a big plus. Are you going the fix the example ? |
The example isn't broken, there just isn't any setup in place to have the Python server running before it runs. It doesn't compile because cargo test isn't using the |
I would like the build to pass before merging this in. Could we have the tests startup the python server ? Could we just have the test use the secure feature flag ? |
This update is a bit messy, I appologize in advanced for the lack of structure. I ended up doing a lot of hacking to try to address a few bugs I was dealing with in my own code.
Major things I've done here include:
FtpError::SecureError
fromSslError
toBox<Error>
since the latest rust-OpenSSL contains several different errors in different modules, but we don't want to have to distinguish themFtpStream
now contain anSslContext
since it implementsClone
, andSsl
doesn'tI know it's not great to have things all mixed up like this and again, I'm sorry for the lack of organization. Since I use this library for work, a lot of what I'm doing with it is being added in incrementally according to my immediate needs. I hope you'll agree that, even with an FTP server written in Python instead of Rust, all of these additions add value to the project.
Let me know if there's anything I can do to make this better.