@@ -12,16 +12,17 @@ If you think you found a bug, file a ticket on GitHub. Please DO NOT report
1212security issues here, there is a separate procedure which is described on
1313[ "Security at ruby-lang.org"] ( https://www.ruby-lang.org/en/security/ ) .
1414
15- When reporting a bug, please make sure you include:
16- * Ruby version
17- * OpenSSL gem version
18- * OpenSSL library version
15+ When reporting a bug, please make sure you include:
16+
17+ * Ruby version (` ruby -v ` )
18+ * ` openssl ` gem version (` gem list openssl ` and ` OpenSSL::VERSION ` )
19+ * OpenSSL library version (` OpenSSL::OPENSSL_VERSION ` )
1920* A sample file that illustrates the problem or link to the repository or
2021 gem that is associated with the bug.
2122
2223There are a number of unresolved issues and feature requests for openssl that
2324need review. Before submitting a new ticket, it is recommended to check
24- [ known issues] and [ bugs.ruby-lang.org ] , the previous issue tracker .
25+ [ known issues] .
2526
2627## Submitting patches
2728
@@ -34,62 +35,50 @@ Make sure that your branch does:
3435* Have good commit messages
3536* Follow Ruby's coding style ([ DeveloperHowTo] )
3637* Pass the test suite successfully (see "Testing")
37- * Add an entry to [ History.md] if necessary
3838
3939## Testing
4040
4141We have a test suite!
4242
4343Test cases are located under the
44- [ ` test/ ` ] ( https://github.com/ruby/openssl/tree/master/test ) directory.
44+ [ ` test/openssl ` ] ( https://github.com/ruby/openssl/tree/master/test/openssl )
45+ directory.
4546
4647You can run it with the following three commands:
4748
4849```
49- $ rake install_dependencies # installs rake-compiler, test-unit, ...
50- $ rake compile
51- $ rake test
50+ $ bundle install # installs rake-compiler, test-unit, ...
51+ $ bundle exec rake compile
52+ $ bundle exec rake test
5253```
5354
54- ### Docker
55-
56- You can also use Docker Compose to run tests. It can be used to check that your
57- changes work correctly with various supported versions of Ruby and OpenSSL.
58-
59- First, you need to install [ Docker] ( https://www.docker.com/products/docker ) and
60- [ Docker Compose] ( https://www.docker.com/products/docker-compose ) on your
61- computer.
55+ ### With different versions of OpenSSL
6256
63- If you're on MacOS or Windows, we recommended to use the official [ Docker
64- Toolbox] ( https://www.docker.com/products/docker-toolbox ) . On Linux, follow the
65- instructions for your package manager. For further information, please check
66- the [ official documentation] ( https://docs.docker.com/ ) .
57+ Ruby OpenSSL supports various versions of OpenSSL library. The test suite needs
58+ to pass on all supported combinations.
6759
68- Once you have Docker and Docker Compose, running the following commands will
69- build the container and execute the openssl tests. In this example, we will use
70- Ruby version 2.3 with OpenSSL version 1.0.2 .
60+ Similarly to when installing ` openssl ` gem via the ` gem ` command,
61+ you can pass a ` --with- openssl-dir ` argument to ` rake compile `
62+ to specify the OpenSSL library to build against .
7163
7264```
73- $ docker-compose build
74- $ export RUBY_VERSION=ruby-2.3
75- $ export OPENSSL_VERSION=openssl-1.0.2
76- $ docker-compose run test
77-
78- # You may want an interactive shell for dubugging
79- $ docker-compose run debug
65+ $ ( curl -OL https://ftp.openssl.org/source/openssl-3.0.1.tar.gz &&
66+ tar xf openssl-3.0.1.tar.gz &&
67+ cd openssl-3.0.1 &&
68+ ./config --prefix=$HOME/.openssl/openssl-3.0.1 --libdir=lib &&
69+ make -j4 &&
70+ make install )
71+
72+ $ # in Ruby/OpenSSL's source directory
73+ $ bundle exec rake clean
74+ $ bundle exec rake compile -- --with-openssl-dir=$HOME/.openssl/openssl-3.0.1
75+ $ bundle exec rake test
8076```
8177
82- All possible values for ` RUBY_VERSION ` and ` OPENSSL_VERSION ` can be found in
83- [ ` test.yml ` ] ( https://github.com/ruby/openssl/tree/master/.github/workflows/test.yml ) .
84-
85- ** NOTE** : these commands must be run from the openssl repository root, in order
86- to use the
87- [ ` docker-compose.yml ` ] ( https://github.com/ruby/openssl/blob/master/docker-compose.yml )
88- file we have provided.
89-
90- This Docker image is built using the
91- [ Dockerfile] ( https://github.com/ruby/openssl/tree/master/tool/ruby-openssl-docker )
92- provided in the repository.
78+ The GitHub Actions workflow file
79+ [ ` test.yml ` ] ( https://github.com/ruby/openssl/tree/master/.github/workflows/test.yml )
80+ contains useful information for building OpenSSL/LibreSSL and testing against
81+ them.
9382
9483
9584## Relation with Ruby source tree
@@ -124,7 +113,6 @@ _Thanks for your contributions!_
124113
125114[ GitHub ] : https://github.com/ruby/openssl
126115[ known issues ] : https://github.com/ruby/openssl/issues
127- [ bugs.ruby-lang.org ] : https://bugs.ruby-lang.org/issues?utf8=%E2%9C%93&set_filter=1&f%5B%5D=status_id&op%5Bstatus_id%5D=o&f%5B%5D=assigned_to_id&op%5Bassigned_to_id%5D=%3D&v%5Bassigned_to_id%5D%5B%5D=7150&f%5B%5D=&c%5B%5D=project&c%5B%5D=tracker&c%5B%5D=status&c%5B%5D=subject&c%5B%5D=assigned_to&c%5B%5D=updated_on&group_by=&t%5B%5D=
128116[ DeveloperHowTo ] : https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto
129117[ HackerOne ] : https://hackerone.com/ruby
130118[ Security ] : https://www.ruby-lang.org/en/security/
0 commit comments