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

SSL suppoer #2

Closed
wants to merge 1 commit into from
Closed

SSL suppoer #2

wants to merge 1 commit into from

Conversation

lupine
Copy link

@lupine lupine commented May 4, 2011

Hi again.

We find ourselves needing in-process SSL for our project using rack-jetty, which seems to be set up using the following procedure (in Java):

http://actionsresults.com/blog/2009/10/24/embedded-jetty-ssl-https/

This pull implements it, although no tests as yet - I thought I'd ask for feedback first, especially since the tests will require a keystore + truststore to be added to the repository, & I'm not sure what the best values to use / way to test would be.

Plus, the project needs updating for recent rspecs ;) - running the specs, never mind writing them, is a bit of a trial right now.

If you're interested in adding the code but want tests (and documentation, of course. Can't forget that), I'm happy to pile some more commits on top - just let me know.

@stormbrew
Copy link
Owner

I'm in favour in principle, but I'm not sure how to test it. What's the issue with running specs right now? Just the rspec2 incompatibility?

@lupine
Copy link
Author

lupine commented May 9, 2011

Mm, at the moment I end up with both rspec 1 & rspec 2 in the environment, which breaks all the tests. Obviously, I do have them both installed... AIUI, they're substantially the same though, so porting the tests should be only a bit of hassle.

Testing is probably simple enough - commit two files, one a valid keyfile, one not, start the server a few times and use net/https to verify that it's running HTTPS and presenting the correct certificate, or raising appropriate errors if the invalid keyfile is being pointed to.

Actually, to avoid committing binary blobs that have an expiry date, it might be better to programmatically generate keyfiles in the tests. There's surely a Java API for doing so.

@stormbrew
Copy link
Owner

Ok, well I upgraded to rspec2 (tested on 2.5.0). I'm not really working in java/jruby right now, so if you wouldn't mind figuring out the testing side of things as well I'd definitely get it bumped out to a release.

Thanks for the help!

@stormbrew
Copy link
Owner

Alternatively, if you can figure out a way to generate keyfiles and/or generate a pair as you described with a distant future expiry, I could do the actual test writing. It's mostly the key generation part I'm wary of digging into, and since you're apparently actually dealing with this it seems likely you'd have a better idea on how. :)

@lupine
Copy link
Author

lupine commented Jun 4, 2011

OK, thanks very much for the commit access - I'll do my best to put together some tests & merge it all in the next few weeks. Things are just a bit hectic at the moment - trying to pull together a release! :D

@stormbrew
Copy link
Owner

Hey, @lupine, @tomdz recently wrote another patch for this that also upgrades the jetty version (something that seems entirely worth doing) while also adding SSL support. Could you take a look at it and see if it would also fit your needs? The two versions seem quite similar to me, but his adds a little more.

I would still like tests either way, but my use cases for rack-jetty have mostly dried up so it's up to you guys how this should proceed.

@stormbrew stormbrew closed this Sep 24, 2011
@stormbrew stormbrew reopened this Sep 24, 2011
@lupine lupine closed this Mar 3, 2023
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.

None yet

2 participants