summaryrefslogtreecommitdiffstats
path: root/CONTRIBUTING_md.html
blob: 5edccad5f25884b06271e10ee09ef3c064d12213 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
<!DOCTYPE html>

<html>
<head>
<meta charset="UTF-8">

<title>CONTRIBUTING - RDoc Documentation</title>

<script type="text/javascript">
  var rdoc_rel_prefix = "./";
  var index_rel_prefix = "./";
</script>

<script src="./js/navigation.js" defer></script>
<script src="./js/search.js" defer></script>
<script src="./js/search_index.js" defer></script>
<script src="./js/searcher.js" defer></script>
<script src="./js/darkfish.js" defer></script>

<link href="./css/fonts.css" rel="stylesheet">
<link href="./css/rdoc.css" rel="stylesheet">


<body id="top" role="document" class="file">
<nav role="navigation">
  <div id="project-navigation">
    <div id="home-section" role="region" title="Quick navigation" class="nav-section">
  <h2>
    <a href="./index.html" rel="home">Home</a>
  </h2>

  <div id="table-of-contents-navigation">
    <a href="./table_of_contents.html#pages">Pages</a>
    <a href="./table_of_contents.html#classes">Classes</a>
    <a href="./table_of_contents.html#methods">Methods</a>
  </div>
</div>

    <div id="search-section" role="search" class="project-section initially-hidden">
  <form action="#" method="get" accept-charset="utf-8">
    <div id="search-field-wrapper">
      <input id="search-field" role="combobox" aria-label="Search"
             aria-autocomplete="list" aria-controls="search-results"
             type="text" name="search" placeholder="Search" spellcheck="false"
             title="Type to search, Up and Down to navigate, Enter to load">
    </div>

    <ul id="search-results" aria-label="Search Results"
        aria-busy="false" aria-expanded="false"
        aria-atomic="false" class="initially-hidden"></ul>
  </form>
</div>

  </div>

  
<div class="nav-section">
  <h3>Table of Contents</h3>

  <ul class="link-list" role="directory">
    <li><a href="#label-Contributing+to+Ruby+OpenSSL">Contributing to Ruby OpenSSL</a>
    <li><a href="#label-Bugs+and+feature+requests">Bugs and feature requests</a>
    <li><a href="#label-Submitting+patches">Submitting patches</a>
    <li><a href="#label-Testing">Testing</a>
    <li><a href="#label-With+different+versions+of+OpenSSL">With different versions of OpenSSL</a>
    <li><a href="#label-Relation+with+Ruby+source+tree">Relation with Ruby source tree</a>
    <li><a href="#label-Release+policy">Release policy</a>
    <li><a href="#label-Security">Security</a>
  </ul>
</div>


  <div id="project-metadata">
    
<div id="fileindex-section" class="nav-section">
  <h3>Pages</h3>

  <ul class="link-list">
    <li><a href="./CONTRIBUTING_md.html">CONTRIBUTING</a>
    <li><a href="./History_md.html">History</a>
    <li><a href="./README_md.html">README</a>
  </ul>
</div>

  </div>
</nav>

<main role="main" aria-label="Page CONTRIBUTING.md">

<h1 id="label-Contributing+to+Ruby+OpenSSL">Contributing to Ruby <a href="OpenSSL.html"><code>OpenSSL</code></a><span><a href="#label-Contributing+to+Ruby+OpenSSL">&para;</a> <a href="#top">&uarr;</a></span></h1>

<p>Thank you for your interest in contributing to Ruby <a href="OpenSSL.html"><code>OpenSSL</code></a>!</p>

<p>This documentation provides an overview how you can contribute.</p>

<h2 id="label-Bugs+and+feature+requests">Bugs and feature requests<span><a href="#label-Bugs+and+feature+requests">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Bugs and feature requests are tracked on <a href="https://github.com/ruby/openssl">GitHub</a>.</p>

<p>If you think you found a bug, file a ticket on GitHub. Please DO NOT report security issues here, there is a separate procedure which is described on <a href="https://www.ruby-lang.org/en/security/">“Security at ruby-lang.org”</a>.</p>

<p>When reporting a bug, please make sure you include:</p>
<ul><li>
<p>Ruby version (<code>ruby -v</code>)</p>
</li><li>
<p><code>openssl</code> gem version (<code>gem list openssl</code> and <code>OpenSSL::VERSION</code>)</p>
</li><li>
<p><a href="OpenSSL.html"><code>OpenSSL</code></a> library version (<code>OpenSSL::OPENSSL_VERSION</code>)</p>
</li><li>
<p>A sample file that illustrates the problem or link to the repository or  gem that is associated with the bug.</p>
</li></ul>

<p>There are a number of unresolved issues and feature requests for openssl that need review. Before submitting a new ticket, it is recommended to check <a href="https://github.com/ruby/openssl/issues">known issues</a>.</p>

<h2 id="label-Submitting+patches">Submitting patches<span><a href="#label-Submitting+patches">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Patches are also very welcome!</p>

<p>Please submit a <a href="https://github.com/ruby/openssl/compare">pull request</a> with your changes.</p>

<p>Make sure that your branch does:</p>
<ul><li>
<p>Have good commit messages</p>
</li><li>
<p>Follow Ruby’s coding style (<a href="https://bugs.ruby-lang.org/projects/ruby/wiki/DeveloperHowto">DeveloperHowTo</a>)</p>
</li><li>
<p>Pass the test suite successfully (see “Testing”)</p>
</li></ul>

<h2 id="label-Testing">Testing<span><a href="#label-Testing">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>We have a test suite!</p>

<p>Test cases are located under the {<code>test/openssl</code><a href="https://github.com/ruby/openssl/tree/master/test/openssl">}</a> directory.</p>

<p>You can run it with the following three commands:</p>

<pre>$ bundle install # installs rake-compiler, test-unit, ...
$ bundle exec rake compile
$ bundle exec rake test</pre>

<h3 id="label-With+different+versions+of+OpenSSL">With different versions of <a href="OpenSSL.html"><code>OpenSSL</code></a><span><a href="#label-With+different+versions+of+OpenSSL">&para;</a> <a href="#top">&uarr;</a></span></h3>

<p>Ruby <a href="OpenSSL.html"><code>OpenSSL</code></a> supports various versions of <a href="OpenSSL.html"><code>OpenSSL</code></a> library. The test suite needs to pass on all supported combinations.</p>

<p>Similarly to when installing <code>openssl</code> gem via the <code>gem</code> command, you can pass a <code>--with-openssl-dir</code> argument to <code>rake compile</code> to specify the <a href="OpenSSL.html"><code>OpenSSL</code></a> library to build against.</p>

<pre>$ ( curl -OL https://ftp.openssl.org/source/openssl-3.0.1.tar.gz &amp;&amp;
    tar xf openssl-3.0.1.tar.gz &amp;&amp;
    cd openssl-3.0.1 &amp;&amp;
    ./config --prefix=$HOME/.openssl/openssl-3.0.1 --libdir=lib &amp;&amp;
    make -j4 &amp;&amp;
    make install )

$ # in Ruby/OpenSSL&#39;s source directory
$ bundle exec rake clean
$ bundle exec rake compile -- --with-openssl-dir=$HOME/.openssl/openssl-3.0.1
$ bundle exec rake test</pre>

<p>The GitHub Actions workflow file {<code>test.yml</code><a href="https://github.com/ruby/openssl/tree/master/.github/workflows/test.yml">}</a> contains useful information for building OpenSSL/LibreSSL and testing against them.</p>

<h2 id="label-Relation+with+Ruby+source+tree">Relation with Ruby source tree<span><a href="#label-Relation+with+Ruby+source+tree">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>After Ruby 2.3, <code>ext/openssl</code> was converted into a “default gem”, a library which ships with standard Ruby builds but can be upgraded via RubyGems. This means the development of this gem has migrated to a <a href="https://github.com/ruby/openssl">separate repository</a> and will be released independently.</p>

<p>The version included in the Ruby source tree (trunk branch) is synchronized with the latest release.</p>

<h2 id="label-Release+policy">Release policy<span><a href="#label-Release+policy">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>Bug fixes (including security fixes) will be made only for the version series included in a stable Ruby release.</p>

<h2 id="label-Security">Security<span><a href="#label-Security">&para;</a> <a href="#top">&uarr;</a></span></h2>

<p>If you discovered a security issue, please send us in private, using the security issue handling procedure for Ruby core.</p>

<p>You can either use <a href="https://hackerone.com/ruby">HackerOne</a> or send an email to security@ruby-lang.org.</p>

<p>Please see <a href="https://www.ruby-lang.org/en/security/">Security</a> page on ruby-lang.org website for details.</p>

<p>Reported problems will be published after a fix is released.</p>

<p><em>Thanks for your contributions!</em></p>

<p><em>- The Ruby OpenSSL team</em></p>

</main>



<footer id="validator-badges" role="contentinfo">
  <p><a href="https://validator.w3.org/check/referer">Validate</a>
  <p>Generated by <a href="https://ruby.github.io/rdoc/">RDoc</a> 6.3.2.
  <p>Based on <a href="http://deveiate.org/projects/Darkfish-RDoc/">Darkfish</a> by <a href="http://deveiate.org">Michael Granger</a>.
</footer>