Skip to content

Use line endings appropriate for current platform#118

Merged
est31 merged 4 commits into
rustls:masterfrom
frjonsen:master
Jun 15, 2023
Merged

Use line endings appropriate for current platform#118
est31 merged 4 commits into
rustls:masterfrom
frjonsen:master

Conversation

@frjonsen

@frjonsen frjonsen commented Apr 10, 2023

Copy link
Copy Markdown
Contributor

PR in reference to #115

Adds platform checking to decide what line endings to use when serializing to PEM.

I tried activating Github Actions for Windows to test correctness for that platform too, but unfortunately it seems the dev-dependency openssl does not work: https://github.com/frjonsen/rcgen/actions/runs/4655417259/jobs/8238039795

@est31

est31 commented Apr 10, 2023

Copy link
Copy Markdown
Member

I think one can add openssl via vcpkg: https://github.com/sfackler/rust-openssl/blob/master/.github/workflows/ci.yml#L94

Ideally, yes, one would add windows CI too so that it can be tested on windows as well, given we have windows platform specific tests now.

Comment thread src/lib.rs Outdated
The pem library will always use CRLF when calling the encode function.
@frjonsen frjonsen force-pushed the master branch 5 times, most recently from 21e428f to ee9dca0 Compare April 11, 2023 07:25
@frjonsen

Copy link
Copy Markdown
Contributor Author

I think one can add openssl via vcpkg: https://github.com/sfackler/rust-openssl/blob/master/.github/workflows/ci.yml#L94

This did indeed solve this particular issue, but I've been getting some follow up issues for other packages. I've resolved one. but currently I'm stuck on building botan. Trying to resolve these other issues is unfortunately taking more time than I currently have to offer, so I'm not quite sure when I will be able to finish up this PR.

@est31

est31 commented Apr 11, 2023

Copy link
Copy Markdown
Member

@frjonsen it's ok, is there a way to mark a github CI job as allow failure? Or alternatively, one could comment it all out.

@est31 est31 force-pushed the master branch 2 times, most recently from 63c04dd to d6f5d46 Compare April 13, 2023 17:10
@frjonsen

Copy link
Copy Markdown
Contributor Author

@frjonsen it's ok, is there a way to mark a github CI job as allow failure? Or alternatively, one could comment it all out.

Could probably do that. I see though that you've been working on resolving this, so thanks for that. I was looking into this during work time, so unfortunately had to prioritize other things, since using the pem lib directly does work as a workaround.

@est31

est31 commented Apr 17, 2023

Copy link
Copy Markdown
Member

I see though that you've been working on resolving this, so thanks for that.

I've thought that your PR is useful and it's not really your fault that there is no CI for windows right now, so I thought I would help you. PR #103 I left open for a long time hoping for smaller fixes to it, but they didn't happen. Later on it turned out that one of the functions I wrote to support that PR had an issue.

botan's maintainer has been very helpful in resolving the build issues on windows, I think now we'll have to wait until a release of botan includes randombit/botan#3504

@est31

est31 commented Apr 27, 2023

Copy link
Copy Markdown
Member

Update: there has been no release of botan yet. There is also a PR randombit/botan-rs#84 to add windows CI to botan-rs, which seems to be green for them.

@randombit

Copy link
Copy Markdown

Hi @est31 just wanted to give an update here - newly released botan 0.10.3 does include the support for setting the source file link method. But Windows CI is still stalled, it is "green" but actually a no-op. I need to write a new script for CI orchestration.

@est31 est31 mentioned this pull request Jun 13, 2023
@est31

est31 commented Jun 13, 2023

Copy link
Copy Markdown
Member

Hmm I wonder if it's possible to have the botan dev dependency and tests only for non-windows platforms. @frjonsen could you put botan into [target.'cfg(not(windows))'.dependencies] in Cargo.toml, and add cfg's to the test file?

@est31

est31 commented Jun 14, 2023

Copy link
Copy Markdown
Member

Hmm I pushed it manually... now it complains about openssl not being found :/ Not sure why that is the case given that we install it just before via vcpkg.

@est31 est31 force-pushed the master branch 2 times, most recently from cea5275 to e4088a0 Compare June 15, 2023 04:35
@est31 est31 mentioned this pull request Jun 15, 2023
@est31

est31 commented Jun 15, 2023

Copy link
Copy Markdown
Member

I have successfully merged this PR by disabling botan on the windows CI. Sorry for the delay @frjonsen. I have opened #125 for enabling botan on the windows CI once it's ready.

@frjonsen

Copy link
Copy Markdown
Contributor Author

Thanks for finishing the PR. It looks like you had a very productive day yesterday!

@est31

est31 commented Jun 15, 2023

Copy link
Copy Markdown
Member

Yes I did some trial and error with the CI to make it green. Sorry for the notification noise :).

est31 added a commit that referenced this pull request Sep 10, 2023
In #118, windows CI was added but the botan specific tests were disabled as the build for rust doesn't work. With the help of upstream, we can now enable botan in CI as well.

---

Co-authored-by: Daniel McCarney <daniel@binaryparadox.net>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants