@@ -12,16 +12,17 @@ If you think you found a bug, file a ticket on GitHub. Please DO NOT report
12
12
security issues here, there is a separate procedure which is described on
13
13
[ "Security at ruby-lang.org"] ( https://www.ruby-lang.org/en/security/ ) .
14
14
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 ` )
19
20
* A sample file that illustrates the problem or link to the repository or
20
21
gem that is associated with the bug.
21
22
22
23
There are a number of unresolved issues and feature requests for openssl that
23
24
need 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] .
25
26
26
27
## Submitting patches
27
28
@@ -34,62 +35,50 @@ Make sure that your branch does:
34
35
* Have good commit messages
35
36
* Follow Ruby's coding style ([ DeveloperHowTo] )
36
37
* Pass the test suite successfully (see "Testing")
37
- * Add an entry to [ History.md] if necessary
38
38
39
39
## Testing
40
40
41
41
We have a test suite!
42
42
43
43
Test 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.
45
46
46
47
You can run it with the following three commands:
47
48
48
49
```
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
52
53
```
53
54
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
62
56
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.
67
59
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 .
71
63
72
64
```
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
80
76
```
81
77
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.
93
82
94
83
95
84
## Relation with Ruby source tree
@@ -124,7 +113,6 @@ _Thanks for your contributions!_
124
113
125
114
[ GitHub ] : https://github.com/ruby/openssl
126
115
[ 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=
128
116
[ DeveloperHowTo ] : https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto
129
117
[ HackerOne ] : https://hackerone.com/ruby
130
118
[ Security ] : https://www.ruby-lang.org/en/security/
0 commit comments