1
0
Fork 0
mirror of https://github.com/puma/puma.git synced 2022-11-09 13:48:40 -05:00
Commit graph

18 commits

Author SHA1 Message Date
Evan Phoenix
806e46f72a Allow a bare % in a query string. Fixes #958 2016-04-22 17:06:18 -07:00
Tawan Sierek
403b1b968d Fix java parser generation
`rake ragel` failed due to renaming the ragel machine from
`http_parser` to `puma_parser` in 3726b7ef19.
The problem was probably overseen since the file
http11_parser.java.rl has not been touched at this commit
and therefore the rake task did not invoke the parser
generation for the java parser.
2016-01-31 18:56:33 +01:00
joe miller
4ae0de4f4c support TLS client auth (verify_mode) in jruby
Adds support for `verify_mode` to configure client authentication when running under JRuby.

Things to note:

- Assumes the CA used to verify client certs is in the same java
  keystore file that is used when setting up the HTTPS TLS listener. We
could split this out, but not sure if it's necessary.
- Friendly/helpful error messages explaining why the verification failed
  are not present in the same way they are in the CRuby/OpenSSL code
path. I'm not sure how to make them available.
- I did not include any code to create the `keystore.jks` file in the
  `examples/puma/client-certs` directory because I didn't see any
existing code to create the `examples/puma/keystore.jks` file. The
commands to create this keystore would be:

```
cd examples/puma/client-certs
  openssl pkcs12 -chain -CAfile ./ca.crt -export -password pass:blahblah -inkey server.key -in server.crt -name server -out server.p12
  keytool -importkeystore -srckeystore server.p12 -srcstoretype pkcs12 -srcstorepass blahblah -destkeystore keystore.jks -deststoretype JKS -storepass blahblah
  keytool -importcert -alias ca -noprompt -trustcacerts -file ca.crt -keystore keystore.jks -storepass blahblah
```
2015-11-28 18:17:01 -08:00
Evan Phoenix
e1bbb27e93 Fix JRuby parser 2015-11-07 09:14:25 -08:00
Alejandro Martinez Ruiz
800cfeeac3 ext/puma_http11: handle duplicate headers as per RFC for Java ext
The parser stores headers in a Ruby hash table so that when a header
is found twice its value replaces the old one. As per RFC[1] this is
not correct, since duplicated headers should all be considered. In
particular, they are semantically equivalent to a single header with
comma separated values. In this case, we follow existing practice of
joining values with a comma and a single space character.

[1] See RFC2616 section 4.2:
    http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
2015-11-06 18:56:56 +01:00
Daniel Marcotte
95a0645443 Eliminate logging overhead from JRuby SSL
Previously, even when not debugging, we were doing work to compose the
log messages.  Delete these diagnostic messages to keep things as fast
and lean as possible.
2015-08-12 14:21:11 -07:00
Evan Phoenix
2348285fcb Stub out peercert on JRuby for now. Fixes #739 2015-07-17 11:48:47 -07:00
Daniel Marcotte
abcce826d1 Remove enable_SSLv3 support from JRuby
The C implementation has not supported SSLv3 at all since #591, and
SSLv3 is disabled by default in java now
(http://www.oracle.com/technetwork/java/javase/documentation/cve-2014-3566-2342133.html)
so we can drop support from JRuby.
2015-05-01 16:49:48 -07:00
Daniel Marcotte
6995981303 Fix hang on bad SSL handshake
Both the C and JRuby SSL implementations would hang on a bad handshake
because they were not producing the EOF expected in that case.
Update their error handling to behave correctly here (note:
`test_ssl_v3_rejection` covers this).
2015-05-01 16:39:22 -07:00
Daniel Marcotte
8eee16d445 JRuby SSL POODLE update
Default SSLv3 to disabled in response to the POODLE vulnerability.
2014-10-15 20:04:58 -07:00
Daniel Marcotte
c54807700c Add SSL support for JRuby
- Implement MiniSSL for JRuby

- Modify `Binder` and `MiniSSL::Context` to to accommodate the fact
that Java SSL demands a java keystore rather than a key/cert pair

- Change the MiniSSL native extension interface to take a
`MiniSSL::Context` rather than a key/cert pair so that each extension
can grab keys off the context as appropriate
2014-05-05 14:30:15 -07:00
Priyank Chodisetti
139690ecf9 Increase the max URI path length to 2048 chars from 1024 chars 2013-11-10 00:16:30 -08:00
Evan Phoenix
7adcb771a5 More work on the Java version, not working 2012-08-26 13:55:36 -07:00
Jingwen Owen Ou
6a5b30ea30 Move singleton method to MiniSSL.java 2012-08-23 20:06:18 -07:00
Evan Phoenix
e191003fc4 Start java version of MiniSSL 2012-08-23 16:56:37 -07:00
Charles Oliver Nutter
0e316b2c20 Fix use of "unsafeBytes" leading to offset errors and regen parser. 2011-11-22 16:23:34 -06:00
Evan Phoenix
dcffc1b765 Some fixes to the java parser 2011-11-22 13:17:22 -08:00
Charles Oliver Nutter
d692475955 First pass updating JRuby bits for Puma.
* Rename Mongrel to Puma and move files appropriately
* Add HttParser11#body method
* Fix native.rake to not attempt C ext under JRuby
* Mask out all of test_unix_socket.rb under JRuby
2011-11-22 13:43:54 -06:00