doc/R509/NameSanitizer.html in r509-0.8.1 vs doc/R509/NameSanitizer.html in r509-0.9
- old
+ new
@@ -4,11 +4,11 @@
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>
Class: R509::NameSanitizer
- — Documentation by YARD 0.8.2.1
+ — Documentation by YARD 0.8.5
</title>
<link rel="stylesheet" href="../css/style.css" type="text/css" media="screen" charset="utf-8" />
@@ -103,11 +103,11 @@
<div class="discussion">
<p>Sanitize an X509::Name. The #to_a method replaces unknown OIDs with
"UNDEF", but the #to_s method doesn't. What we want to do is build the
array that would have been produced by #to_a if it didn't throw away the
-OID.</p>
+OID. This method is not required as of ruby-1.9.3p125 and up.</p>
</div>
</div>
<div class="tags">
@@ -244,63 +244,63 @@
<tr>
<td>
<pre class="lines">
-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</pre>
+183
+184
+185
+186
+187
+188
+189
+190
+191
+192
+193
+194
+195
+196
+197
+198
+199
+200
+201
+202
+203
+204
+205
+206
+207</pre>
</td>
<td>
- <pre class="code"><span class="info file"># File 'lib/r509/subject.rb', line 90</span>
+ <pre class="code"><span class="info file"># File 'lib/r509/subject.rb', line 183</span>
<span class='kw'>def</span> <span class='id identifier rubyid_sanitize'>sanitize</span><span class='lparen'>(</span><span class='id identifier rubyid_name'>name</span><span class='rparen'>)</span>
- <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
- <span class='id identifier rubyid_array'>array</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
- <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
- <span class='id identifier rubyid_undefined_components'>undefined_components</span><span class='lparen'>(</span><span class='id identifier rubyid_array'>array</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
- <span class='kw'>begin</span>
- <span class='comment'># get the OID from the subject line that has this value
-</span> <span class='id identifier rubyid_oids'>oids</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/([\d\.]+)=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
- <span class='kw'>if</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
- <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
- <span class='kw'>else</span>
- <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='kw'>not</span> <span class='id identifier rubyid_used_oids'>used_oids</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
- <span class='kw'>end</span>
- <span class='comment'># replace the "UNDEF" OID name in the array at the index the UNDEF was found
-</span> <span class='id identifier rubyid_array'>array</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:index</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_oid'>oid</span>
- <span class='comment'># remove the first occurrence of this in the subject line (so we can handle the same oid/value pair multiple times)
-</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_oid'>oid</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
- <span class='comment'># we record which OIDs we've used in case two different unknown OIDs have the same value
-</span> <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'><<</span> <span class='id identifier rubyid_oid'>oid</span>
- <span class='kw'>rescue</span>
- <span class='comment'># I don't expect this to happen, but if it does we'll just not replace UNDEF and continue
-</span> <span class='kw'>end</span>
- <span class='kw'>end</span>
- <span class='id identifier rubyid_array'>array</span>
+ <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span>
+ <span class='id identifier rubyid_array'>array</span> <span class='op'>=</span> <span class='id identifier rubyid_name'>name</span><span class='period'>.</span><span class='id identifier rubyid_to_a'>to_a</span><span class='period'>.</span><span class='id identifier rubyid_dup'>dup</span>
+ <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'>=</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
+ <span class='id identifier rubyid_undefined_components'>undefined_components</span><span class='lparen'>(</span><span class='id identifier rubyid_array'>array</span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id identifier rubyid_component'>component</span><span class='op'>|</span>
+ <span class='kw'>begin</span>
+ <span class='comment'># get the OID from the subject line that has this value
+</span> <span class='id identifier rubyid_oids'>oids</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_scan'>scan</span><span class='lparen'>(</span><span class='tstring'><span class='regexp_beg'>/</span><span class='tstring_content'>\/([\d\.]+)=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='regexp_end'>/</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_flatten'>flatten</span>
+ <span class='kw'>if</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_size'>size</span> <span class='op'>==</span> <span class='int'>1</span>
+ <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
+ <span class='kw'>else</span>
+ <span class='id identifier rubyid_oid'>oid</span> <span class='op'>=</span> <span class='id identifier rubyid_oids'>oids</span><span class='period'>.</span><span class='id identifier rubyid_select'>select</span><span class='lbrace'>{</span> <span class='op'>|</span><span class='id identifier rubyid_match'>match</span><span class='op'>|</span> <span class='kw'>not</span> <span class='id identifier rubyid_used_oids'>used_oids</span><span class='period'>.</span><span class='id identifier rubyid_include?'>include?</span><span class='lparen'>(</span><span class='id identifier rubyid_match'>match</span><span class='rparen'>)</span> <span class='rbrace'>}</span><span class='period'>.</span><span class='id identifier rubyid_first'>first</span>
+ <span class='kw'>end</span>
+ <span class='comment'># replace the "UNDEF" OID name in the array at the index the UNDEF was found
+</span> <span class='id identifier rubyid_array'>array</span><span class='lbracket'>[</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:index</span><span class='rbracket'>]</span><span class='rbracket'>]</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='id identifier rubyid_oid'>oid</span>
+ <span class='comment'># remove the first occurrence of this in the subject line (so we can handle the same oid/value pair multiple times)
+</span> <span class='id identifier rubyid_line'>line</span> <span class='op'>=</span> <span class='id identifier rubyid_line'>line</span><span class='period'>.</span><span class='id identifier rubyid_sub'>sub</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_content'>/</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_oid'>oid</span><span class='rbrace'>}</span><span class='tstring_content'>=</span><span class='embexpr_beg'>#{</span><span class='id identifier rubyid_component'>component</span><span class='lbracket'>[</span><span class='symbol'>:value</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_end'>"</span></span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>"</span><span class='tstring_end'>"</span></span><span class='rparen'>)</span>
+ <span class='comment'># we record which OIDs we've used in case two different unknown OIDs have the same value
+</span> <span class='id identifier rubyid_used_oids'>used_oids</span> <span class='op'><<</span> <span class='id identifier rubyid_oid'>oid</span>
+ <span class='kw'>rescue</span>
+ <span class='comment'># I don't expect this to happen, but if it does we'll just not replace UNDEF and continue
+</span> <span class='kw'>end</span>
+ <span class='kw'>end</span>
+ <span class='id identifier rubyid_array'>array</span>
<span class='kw'>end</span></pre>
</td>
</tr>
</table>
</div>
@@ -308,12 +308,12 @@
</div>
</div>
<div id="footer">
- Generated on Thu Nov 8 14:19:27 2012 by
+ Generated on Tue Apr 16 10:49:57 2013 by
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
- 0.8.2.1 (ruby-1.9.3).
+ 0.8.5 (ruby-1.9.3).
</div>
</body>
</html>
\ No newline at end of file