fakeldap 0.0.1 → 0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (114) hide show
  1. checksums.yaml +7 -0
  2. data/README.md +7 -1
  3. data/lib/fakeldap.rb +133 -10
  4. data/lib/fakeldap/version.rb +1 -1
  5. metadata +50 -191
  6. data/vendor/ruby-ldapserver/COPYING +0 -27
  7. data/vendor/ruby-ldapserver/ChangeLog +0 -83
  8. data/vendor/ruby-ldapserver/Manifest.txt +0 -32
  9. data/vendor/ruby-ldapserver/README +0 -222
  10. data/vendor/ruby-ldapserver/Rakefile +0 -22
  11. data/vendor/ruby-ldapserver/doc/LDAP.html +0 -104
  12. data/vendor/ruby-ldapserver/doc/LDAP/Abandon.html +0 -112
  13. data/vendor/ruby-ldapserver/doc/LDAP/Error.html +0 -115
  14. data/vendor/ruby-ldapserver/doc/LDAP/ResultError.html +0 -241
  15. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AdminLimitExceeded.html +0 -158
  16. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AffectsMultipleDSAs.html +0 -158
  17. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasDereferencingProblem.html +0 -158
  18. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AliasProblem.html +0 -158
  19. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AttributeOrValueExists.html +0 -158
  20. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/AuthMethodNotSupported.html +0 -158
  21. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Busy.html +0 -158
  22. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareFalse.html +0 -158
  23. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/CompareTrue.html +0 -158
  24. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConfidentialityRequired.html +0 -158
  25. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ConstraintViolation.html +0 -158
  26. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/EntryAlreadyExists.html +0 -158
  27. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateAuthentication.html +0 -158
  28. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InappropriateMatching.html +0 -158
  29. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InsufficientAccessRights.html +0 -158
  30. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidAttributeSyntax.html +0 -158
  31. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidCredentials.html +0 -158
  32. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/InvalidDNSyntax.html +0 -158
  33. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/IsLeaf.html +0 -158
  34. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/LoopDetect.html +0 -158
  35. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NamingViolation.html +0 -158
  36. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchAttribute.html +0 -158
  37. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NoSuchObject.html +0 -158
  38. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnNonLeaf.html +0 -158
  39. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/NotAllowedOnRDN.html +0 -158
  40. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassModsProhibited.html +0 -158
  41. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ObjectClassViolation.html +0 -158
  42. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/OperationsError.html +0 -158
  43. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Other.html +0 -158
  44. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/ProtocolError.html +0 -158
  45. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Referral.html +0 -158
  46. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SaslBindInProgress.html +0 -158
  47. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/SizeLimitExceeded.html +0 -158
  48. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/StrongAuthRequired.html +0 -158
  49. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Success.html +0 -158
  50. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/TimeLimitExceeded.html +0 -158
  51. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/Unavailable.html +0 -158
  52. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnavailableCriticalExtension.html +0 -158
  53. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UndefinedAttributeType.html +0 -158
  54. data/vendor/ruby-ldapserver/doc/LDAP/ResultError/UnwillingToPerform.html +0 -158
  55. data/vendor/ruby-ldapserver/doc/LDAP/Server.html +0 -1056
  56. data/vendor/ruby-ldapserver/doc/LDAP/Server/Connection.html +0 -1353
  57. data/vendor/ruby-ldapserver/doc/LDAP/Server/Filter.html +0 -634
  58. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule.html +0 -1132
  59. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/DefaultMatchingClass.html +0 -219
  60. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Equality.html +0 -170
  61. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Downcase.html +0 -143
  62. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/IA5Trim.html +0 -155
  63. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Integer.html +0 -143
  64. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Ordering.html +0 -212
  65. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringDowncase.html +0 -143
  66. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/StringTrim.html +0 -154
  67. data/vendor/ruby-ldapserver/doc/LDAP/Server/MatchingRule/Substrings.html +0 -177
  68. data/vendor/ruby-ldapserver/doc/LDAP/Server/Operation.html +0 -2994
  69. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema.html +0 -2024
  70. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/AttributeType.html +0 -1462
  71. data/vendor/ruby-ldapserver/doc/LDAP/Server/Schema/ObjectClass.html +0 -1097
  72. data/vendor/ruby-ldapserver/doc/LDAP/Server/Syntax.html +0 -1254
  73. data/vendor/ruby-ldapserver/doc/LDAP/Server/VERSION.html +0 -134
  74. data/vendor/ruby-ldapserver/doc/_index.html +0 -662
  75. data/vendor/ruby-ldapserver/doc/class_list.html +0 -36
  76. data/vendor/ruby-ldapserver/doc/css/common.css +0 -1
  77. data/vendor/ruby-ldapserver/doc/css/full_list.css +0 -50
  78. data/vendor/ruby-ldapserver/doc/css/style.css +0 -303
  79. data/vendor/ruby-ldapserver/doc/file.README.html +0 -399
  80. data/vendor/ruby-ldapserver/doc/file_list.html +0 -38
  81. data/vendor/ruby-ldapserver/doc/frames.html +0 -13
  82. data/vendor/ruby-ldapserver/doc/index.html +0 -399
  83. data/vendor/ruby-ldapserver/doc/js/app.js +0 -204
  84. data/vendor/ruby-ldapserver/doc/js/full_list.js +0 -112
  85. data/vendor/ruby-ldapserver/doc/js/jquery.js +0 -154
  86. data/vendor/ruby-ldapserver/doc/method_list.html +0 -1571
  87. data/vendor/ruby-ldapserver/doc/top-level-namespace.html +0 -88
  88. data/vendor/ruby-ldapserver/examples/README +0 -89
  89. data/vendor/ruby-ldapserver/examples/mkcert.rb +0 -31
  90. data/vendor/ruby-ldapserver/examples/rbslapd1.rb +0 -111
  91. data/vendor/ruby-ldapserver/examples/rbslapd2.rb +0 -161
  92. data/vendor/ruby-ldapserver/examples/rbslapd3.rb +0 -172
  93. data/vendor/ruby-ldapserver/examples/speedtest.rb +0 -37
  94. data/vendor/ruby-ldapserver/lib/ldap/server.rb +0 -4
  95. data/vendor/ruby-ldapserver/lib/ldap/server/connection.rb +0 -276
  96. data/vendor/ruby-ldapserver/lib/ldap/server/filter.rb +0 -223
  97. data/vendor/ruby-ldapserver/lib/ldap/server/match.rb +0 -283
  98. data/vendor/ruby-ldapserver/lib/ldap/server/operation.rb +0 -487
  99. data/vendor/ruby-ldapserver/lib/ldap/server/preforkserver.rb +0 -93
  100. data/vendor/ruby-ldapserver/lib/ldap/server/result.rb +0 -71
  101. data/vendor/ruby-ldapserver/lib/ldap/server/schema.rb +0 -592
  102. data/vendor/ruby-ldapserver/lib/ldap/server/server.rb +0 -89
  103. data/vendor/ruby-ldapserver/lib/ldap/server/syntax.rb +0 -235
  104. data/vendor/ruby-ldapserver/lib/ldap/server/tcpserver.rb +0 -91
  105. data/vendor/ruby-ldapserver/lib/ldap/server/util.rb +0 -88
  106. data/vendor/ruby-ldapserver/lib/ldap/server/version.rb +0 -11
  107. data/vendor/ruby-ldapserver/test/core.schema +0 -582
  108. data/vendor/ruby-ldapserver/test/encoding_test.rb +0 -279
  109. data/vendor/ruby-ldapserver/test/filter_test.rb +0 -107
  110. data/vendor/ruby-ldapserver/test/match_test.rb +0 -59
  111. data/vendor/ruby-ldapserver/test/schema_test.rb +0 -113
  112. data/vendor/ruby-ldapserver/test/syntax_test.rb +0 -40
  113. data/vendor/ruby-ldapserver/test/test_helper.rb +0 -2
  114. data/vendor/ruby-ldapserver/test/util_test.rb +0 -51
@@ -1,1353 +0,0 @@
1
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
- "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
- <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
- <head>
5
- <meta name="Content-Type" content="text/html; charset=utf-8" />
6
- <title>Class: LDAP::Server::Connection</title>
7
- <link rel="stylesheet" href="../../css/style.css" type="text/css" media="screen" charset="utf-8" />
8
- <link rel="stylesheet" href="../../css/common.css" type="text/css" media="screen" charset="utf-8" />
9
-
10
- <script type="text/javascript" charset="utf-8">
11
- relpath = '../..';
12
- if (relpath != '') relpath += '/';
13
- </script>
14
- <script type="text/javascript" charset="utf-8" src="../../js/jquery.js"></script>
15
- <script type="text/javascript" charset="utf-8" src="../../js/app.js"></script>
16
-
17
- </head>
18
- <body>
19
- <script type="text/javascript" charset="utf-8">
20
- if (window.top.frames.main) document.body.className = 'frames';
21
- </script>
22
-
23
- <div id="header">
24
- <div id="menu">
25
-
26
- <a href="../../_index.html">Index (C)</a> &raquo;
27
- <span class='title'><span class='object_link'><a href="../../LDAP.html" title="LDAP (module)">LDAP</a></span></span> &raquo; <span class='title'><span class='object_link'><a href="../Server.html" title="LDAP::Server (class)">Server</a></span></span>
28
- &raquo;
29
- <span class="title">Connection</span>
30
-
31
-
32
- <div class="noframes"><span class="title">(</span><a href="." target="_top">no frames</a><span class="title">)</span></div>
33
- </div>
34
-
35
- <div id="search">
36
- <a id="class_list_link" href="#">Class List</a>
37
- <a id="method_list_link" href="#">Method List</a>
38
- <a id ="file_list_link" href="#">File List</a>
39
- </div>
40
-
41
- <div class="clear"></div>
42
- </div>
43
-
44
- <iframe id="search_frame"></iframe>
45
-
46
- <div id="content"><h1>Class: LDAP::Server::Connection
47
-
48
-
49
-
50
- </h1>
51
-
52
- <dl class="box">
53
-
54
- <dt class="r1">Inherits:</dt>
55
- <dd class="r1">
56
- <span class="inheritName">Object</span>
57
-
58
- <ul class="fullTree">
59
- <li>Object</li>
60
-
61
- <li class="next">LDAP::Server::Connection</li>
62
-
63
- </ul>
64
- <a href="#" class="inheritanceTree">show all</a>
65
-
66
- </dd>
67
-
68
-
69
-
70
-
71
-
72
-
73
-
74
-
75
-
76
- <dt class="r2 last">Defined in:</dt>
77
- <dd class="r2 last">lib/ldap/server/connection.rb</dd>
78
-
79
- </dl>
80
- <div class="clear"></div>
81
-
82
- <h2>Overview</h2><div class="docstring">
83
- <div class="discussion">
84
- <p>
85
- An object which handles an LDAP connection. Note that LDAP allows requests
86
- and responses to be exchanged asynchronously: e.g. a client can send three
87
- requests, and the three responses can come back in any order. For that
88
- reason, we start a new thread for each request, and we need a mutex on the
89
- io object so that multiple responses don&#8217;t interfere with each other.
90
- </p>
91
-
92
-
93
- </div>
94
- </div>
95
- <div class="tags">
96
-
97
- </div>
98
-
99
- <h2>Instance Attribute Summary <small>(<a href="#" class="summary_toggle">collapse</a>)</small></h2>
100
- <ul class="summary">
101
-
102
- <li class="public ">
103
- <span class="summary_signature">
104
-
105
- <a href="#binddn-instance_method" title="#binddn (instance method)">- (Object) <strong>binddn</strong> </a>
106
-
107
-
108
-
109
- </span>
110
-
111
-
112
- <span class="note title readonly">readonly</span>
113
-
114
-
115
-
116
-
117
-
118
-
119
-
120
-
121
- <span class="summary_desc"><div class='inline'><p>
122
- Returns the value of attribute binddn.
123
- </p>
124
- </div></span>
125
-
126
- </li>
127
-
128
-
129
- <li class="public ">
130
- <span class="summary_signature">
131
-
132
- <a href="#opt-instance_method" title="#opt (instance method)">- (Object) <strong>opt</strong> </a>
133
-
134
-
135
-
136
- </span>
137
-
138
-
139
- <span class="note title readonly">readonly</span>
140
-
141
-
142
-
143
-
144
-
145
-
146
-
147
-
148
- <span class="summary_desc"><div class='inline'><p>
149
- Returns the value of attribute opt.
150
- </p>
151
- </div></span>
152
-
153
- </li>
154
-
155
-
156
- <li class="public ">
157
- <span class="summary_signature">
158
-
159
- <a href="#version-instance_method" title="#version (instance method)">- (Object) <strong>version</strong> </a>
160
-
161
-
162
-
163
- </span>
164
-
165
-
166
- <span class="note title readonly">readonly</span>
167
-
168
-
169
-
170
-
171
-
172
-
173
-
174
-
175
- <span class="summary_desc"><div class='inline'><p>
176
- Returns the value of attribute version.
177
- </p>
178
- </div></span>
179
-
180
- </li>
181
-
182
-
183
- </ul>
184
-
185
-
186
-
187
- <h2>
188
- Instance Method Summary
189
- <small>(<a href="#" class="summary_toggle">collapse</a>)</small>
190
- </h2>
191
-
192
- <ul class="summary">
193
-
194
- <li class="public ">
195
- <span class="summary_signature">
196
-
197
- <a href="#abandon-instance_method" title="#abandon (instance method)">- (Object) <strong>abandon</strong>(messageID) </a>
198
-
199
-
200
-
201
- </span>
202
-
203
-
204
-
205
-
206
-
207
-
208
-
209
-
210
- <span class="summary_desc"><div class='inline'></div></span>
211
-
212
- </li>
213
-
214
-
215
- <li class="public ">
216
- <span class="summary_signature">
217
-
218
- <a href="#abandon_all-instance_method" title="#abandon_all (instance method)">- (Object) <strong>abandon_all</strong> </a>
219
-
220
-
221
-
222
- </span>
223
-
224
-
225
-
226
-
227
-
228
-
229
-
230
-
231
- <span class="summary_desc"><div class='inline'></div></span>
232
-
233
- </li>
234
-
235
-
236
- <li class="public ">
237
- <span class="summary_signature">
238
-
239
- <a href="#ber_read-instance_method" title="#ber_read (instance method)">- (Object) <strong>ber_read</strong>(io) </a>
240
-
241
-
242
-
243
- </span>
244
-
245
-
246
-
247
-
248
-
249
-
250
-
251
-
252
- <span class="summary_desc"><div class='inline'><p>
253
- Read one ASN1 element from the given stream.
254
- </p>
255
- </div></span>
256
-
257
- </li>
258
-
259
-
260
- <li class="public ">
261
- <span class="summary_signature">
262
-
263
- <a href="#handle_requests-instance_method" title="#handle_requests (instance method)">- (Object) <strong>handle_requests</strong> </a>
264
-
265
-
266
-
267
- </span>
268
-
269
-
270
-
271
-
272
-
273
-
274
-
275
-
276
- <span class="summary_desc"><div class='inline'></div></span>
277
-
278
- </li>
279
-
280
-
281
- <li class="public ">
282
- <span class="summary_signature">
283
-
284
- <a href="#initialize-instance_method" title="#initialize (instance method)">- (Connection) <strong>initialize</strong>(io, opt = {}) </a>
285
-
286
-
287
-
288
- </span>
289
-
290
- <span class="note title constructor">constructor</span>
291
-
292
-
293
-
294
-
295
-
296
-
297
-
298
-
299
- <span class="summary_desc"><div class='inline'><p>
300
- A new instance of Connection.
301
- </p>
302
- </div></span>
303
-
304
- </li>
305
-
306
-
307
- <li class="public ">
308
- <span class="summary_signature">
309
-
310
- <a href="#log-instance_method" title="#log (instance method)">- (Object) <strong>log</strong>(msg) </a>
311
-
312
-
313
-
314
- </span>
315
-
316
-
317
-
318
-
319
-
320
-
321
-
322
-
323
- <span class="summary_desc"><div class='inline'></div></span>
324
-
325
- </li>
326
-
327
-
328
- <li class="public ">
329
- <span class="summary_signature">
330
-
331
- <a href="#send_notice_of_disconnection-instance_method" title="#send_notice_of_disconnection (instance method)">- (Object) <strong>send_notice_of_disconnection</strong>(resultCode, errorMessage = &quot;&quot;) </a>
332
-
333
-
334
-
335
- </span>
336
-
337
-
338
-
339
-
340
-
341
-
342
-
343
-
344
- <span class="summary_desc"><div class='inline'></div></span>
345
-
346
- </li>
347
-
348
-
349
- <li class="public ">
350
- <span class="summary_signature">
351
-
352
- <a href="#send_unsolicited_notification-instance_method" title="#send_unsolicited_notification (instance method)">- (Object) <strong>send_unsolicited_notification</strong>(resultCode, opt = {}) </a>
353
-
354
-
355
-
356
- </span>
357
-
358
-
359
-
360
-
361
-
362
-
363
-
364
-
365
- <span class="summary_desc"><div class='inline'></div></span>
366
-
367
- </li>
368
-
369
-
370
- <li class="public ">
371
- <span class="summary_signature">
372
-
373
- <a href="#startssl-instance_method" title="#startssl (instance method)">- (Object) <strong>startssl</strong> </a>
374
-
375
-
376
-
377
- </span>
378
-
379
-
380
-
381
-
382
-
383
-
384
-
385
-
386
- <span class="summary_desc"><div class='inline'><p>
387
- :yields:.
388
- </p>
389
- </div></span>
390
-
391
- </li>
392
-
393
-
394
- <li class="public ">
395
- <span class="summary_signature">
396
-
397
- <a href="#write-instance_method" title="#write (instance method)">- (Object) <strong>write</strong>(data) </a>
398
-
399
-
400
-
401
- </span>
402
-
403
-
404
-
405
-
406
-
407
-
408
-
409
-
410
- <span class="summary_desc"><div class='inline'></div></span>
411
-
412
- </li>
413
-
414
-
415
- <li class="public ">
416
- <span class="summary_signature">
417
-
418
- <a href="#writelock-instance_method" title="#writelock (instance method)">- (Object) <strong>writelock</strong> </a>
419
-
420
-
421
-
422
- </span>
423
-
424
-
425
-
426
-
427
-
428
-
429
-
430
-
431
- <span class="summary_desc"><div class='inline'></div></span>
432
-
433
- </li>
434
-
435
-
436
- </ul>
437
-
438
-
439
- <div id="constructor_details" class="method_details_list">
440
- <h2>Constructor Details</h2>
441
-
442
- <div class="method_details first">
443
- <p class="signature first" id="initialize-instance_method">
444
-
445
- - (<tt><span class='object_link'><a href="" title="LDAP::Server::Connection (class)">Connection</a></span></tt>) <strong>initialize</strong>(io, opt = {})
446
-
447
-
448
-
449
- </p><div class="docstring">
450
- <div class="discussion">
451
- <p>
452
- A new instance of Connection
453
- </p>
454
-
455
-
456
- </div>
457
- </div>
458
- <div class="tags">
459
-
460
- </div><table class="source_code">
461
- <tr>
462
- <td>
463
- <pre class="lines">
464
-
465
-
466
- 18
467
- 19
468
- 20
469
- 21
470
- 22
471
- 23
472
- 24
473
- 25
474
- 26
475
- 27
476
- 28
477
- 29</pre>
478
- </td>
479
- <td>
480
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 18</span>
481
-
482
- <span class='kw'>def</span> <span class='id initialize'>initialize</span><span class='lparen'>(</span><span class='id io'>io</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
483
- <span class='ivar'>@io</span> <span class='op'>=</span> <span class='id io'>io</span>
484
- <span class='ivar'>@opt</span> <span class='op'>=</span> <span class='id opt'>opt</span>
485
- <span class='ivar'>@mutex</span> <span class='op'>=</span> <span class='const'>Mutex</span><span class='period'>.</span><span class='id new'>new</span>
486
- <span class='ivar'>@active_reqs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span> <span class='comment'># map message ID to thread object
487
- </span> <span class='ivar'>@binddn</span> <span class='op'>=</span> <span class='kw'>nil</span>
488
- <span class='ivar'>@version</span> <span class='op'>=</span> <span class='int'>3</span>
489
- <span class='ivar'>@logger</span> <span class='op'>=</span> <span class='ivar'>@opt</span><span class='lbracket'>[</span><span class='symbol'>:logger</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='gvar'>$stderr</span>
490
- <span class='ivar'>@ssl</span> <span class='op'>=</span> <span class='kw'>false</span>
491
-
492
- <span class='id startssl'>startssl</span> <span class='kw'>if</span> <span class='ivar'>@opt</span><span class='lbracket'>[</span><span class='symbol'>:ssl_on_connect</span><span class='rbracket'>]</span>
493
- <span class='kw'>end</span></pre>
494
- </td>
495
- </tr>
496
- </table>
497
- </div>
498
-
499
- </div>
500
-
501
- <div id="instance_attr_details" class="attr_details">
502
- <h2>Instance Attribute Details</h2>
503
-
504
-
505
- <span id=""></span>
506
- <span id="binddn-instance_method"></span>
507
- <div class="method_details first">
508
- <p class="signature first" id="binddn-instance_method">
509
-
510
- - (<tt>Object</tt>) <strong>binddn</strong> <span class="extras">(readonly)</span>
511
-
512
-
513
-
514
- </p><div class="docstring">
515
- <div class="discussion">
516
- <p>
517
- Returns the value of attribute binddn
518
- </p>
519
-
520
-
521
- </div>
522
- </div>
523
- <div class="tags">
524
-
525
- </div><table class="source_code">
526
- <tr>
527
- <td>
528
- <pre class="lines">
529
-
530
-
531
- 16
532
- 17
533
- 18</pre>
534
- </td>
535
- <td>
536
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 16</span>
537
-
538
- <span class='kw'>def</span> <span class='id binddn'>binddn</span>
539
- <span class='ivar'>@binddn</span>
540
- <span class='kw'>end</span></pre>
541
- </td>
542
- </tr>
543
- </table>
544
- </div>
545
-
546
-
547
- <span id=""></span>
548
- <span id="opt-instance_method"></span>
549
- <div class="method_details ">
550
- <p class="signature " id="opt-instance_method">
551
-
552
- - (<tt>Object</tt>) <strong>opt</strong> <span class="extras">(readonly)</span>
553
-
554
-
555
-
556
- </p><div class="docstring">
557
- <div class="discussion">
558
- <p>
559
- Returns the value of attribute opt
560
- </p>
561
-
562
-
563
- </div>
564
- </div>
565
- <div class="tags">
566
-
567
- </div><table class="source_code">
568
- <tr>
569
- <td>
570
- <pre class="lines">
571
-
572
-
573
- 16
574
- 17
575
- 18</pre>
576
- </td>
577
- <td>
578
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 16</span>
579
-
580
- <span class='kw'>def</span> <span class='id opt'>opt</span>
581
- <span class='ivar'>@opt</span>
582
- <span class='kw'>end</span></pre>
583
- </td>
584
- </tr>
585
- </table>
586
- </div>
587
-
588
-
589
- <span id=""></span>
590
- <span id="version-instance_method"></span>
591
- <div class="method_details ">
592
- <p class="signature " id="version-instance_method">
593
-
594
- - (<tt>Object</tt>) <strong>version</strong> <span class="extras">(readonly)</span>
595
-
596
-
597
-
598
- </p><div class="docstring">
599
- <div class="discussion">
600
- <p>
601
- Returns the value of attribute version
602
- </p>
603
-
604
-
605
- </div>
606
- </div>
607
- <div class="tags">
608
-
609
- </div><table class="source_code">
610
- <tr>
611
- <td>
612
- <pre class="lines">
613
-
614
-
615
- 16
616
- 17
617
- 18</pre>
618
- </td>
619
- <td>
620
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 16</span>
621
-
622
- <span class='kw'>def</span> <span class='id version'>version</span>
623
- <span class='ivar'>@version</span>
624
- <span class='kw'>end</span></pre>
625
- </td>
626
- </tr>
627
- </table>
628
- </div>
629
-
630
- </div>
631
-
632
-
633
- <div id="instance_method_details" class="method_details_list">
634
- <h2>Instance Method Details</h2>
635
-
636
-
637
- <div class="method_details first">
638
- <p class="signature first" id="abandon-instance_method">
639
-
640
- - (<tt>Object</tt>) <strong>abandon</strong>(messageID)
641
-
642
-
643
-
644
- </p><table class="source_code">
645
- <tr>
646
- <td>
647
- <pre class="lines">
648
-
649
-
650
- 227
651
- 228
652
- 229
653
- 230
654
- 231
655
- 232</pre>
656
- </td>
657
- <td>
658
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 227</span>
659
-
660
- <span class='kw'>def</span> <span class='id abandon'>abandon</span><span class='lparen'>(</span><span class='id messageID'>messageID</span><span class='rparen'>)</span>
661
- <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
662
- <span class='id thread'>thread</span> <span class='op'>=</span> <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id messageID'>messageID</span><span class='rparen'>)</span>
663
- <span class='id thread'>thread</span><span class='period'>.</span><span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>Abandon</span> <span class='kw'>if</span> <span class='id thread'>thread</span> <span class='kw'>and</span> <span class='id thread'>thread</span><span class='period'>.</span><span class='id alive?'>alive?</span>
664
- <span class='kw'>end</span>
665
- <span class='kw'>end</span></pre>
666
- </td>
667
- </tr>
668
- </table>
669
- </div>
670
-
671
- <div class="method_details ">
672
- <p class="signature " id="abandon_all-instance_method">
673
-
674
- - (<tt>Object</tt>) <strong>abandon_all</strong>
675
-
676
-
677
-
678
- </p><table class="source_code">
679
- <tr>
680
- <td>
681
- <pre class="lines">
682
-
683
-
684
- 234
685
- 235
686
- 236
687
- 237
688
- 238
689
- 239
690
- 240
691
- 241
692
- 242</pre>
693
- </td>
694
- <td>
695
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 234</span>
696
-
697
- <span class='kw'>def</span> <span class='id abandon_all'>abandon_all</span>
698
- <span class='kw'>return</span> <span class='kw'>if</span> <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>==</span> <span class='int'>0</span>
699
- <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
700
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id each'>each</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id id'>id</span><span class='comma'>,</span> <span class='id thread'>thread</span><span class='op'>|</span>
701
- <span class='id thread'>thread</span><span class='period'>.</span><span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>Abandon</span> <span class='kw'>if</span> <span class='id thread'>thread</span><span class='period'>.</span><span class='id alive?'>alive?</span>
702
- <span class='kw'>end</span>
703
- <span class='ivar'>@active_reqs</span> <span class='op'>=</span> <span class='lbrace'>{</span><span class='rbrace'>}</span>
704
- <span class='kw'>end</span>
705
- <span class='kw'>end</span></pre>
706
- </td>
707
- </tr>
708
- </table>
709
- </div>
710
-
711
- <div class="method_details ">
712
- <p class="signature " id="ber_read-instance_method">
713
-
714
- - (<tt>Object</tt>) <strong>ber_read</strong>(io)
715
-
716
-
717
-
718
- </p><div class="docstring">
719
- <div class="discussion">
720
- <p>
721
- Read one ASN1 element from the given stream. Return String containing the
722
- raw element.
723
- </p>
724
-
725
-
726
- </div>
727
- </div>
728
- <div class="tags">
729
-
730
- </div><table class="source_code">
731
- <tr>
732
- <td>
733
- <pre class="lines">
734
-
735
-
736
- 49
737
- 50
738
- 51
739
- 52
740
- 53
741
- 54
742
- 55
743
- 56
744
- 57
745
- 58
746
- 59
747
- 60
748
- 61
749
- 62
750
- 63
751
- 64
752
- 65
753
- 66
754
- 67
755
- 68
756
- 69
757
- 70
758
- 71
759
- 72
760
- 73
761
- 74
762
- 75
763
- 76
764
- 77
765
- 78
766
- 79
767
- 80
768
- 81
769
- 82
770
- 83
771
- 84
772
- 85</pre>
773
- </td>
774
- <td>
775
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 49</span>
776
-
777
- <span class='kw'>def</span> <span class='id ber_read'>ber_read</span><span class='lparen'>(</span><span class='id io'>io</span><span class='rparen'>)</span>
778
- <span class='id blk'>blk</span> <span class='op'>=</span> <span class='id io'>io</span><span class='period'>.</span><span class='id read'>read</span><span class='lparen'>(</span><span class='int'>2</span><span class='rparen'>)</span> <span class='comment'># minimum: short tag, short length
779
- </span> <span class='id throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:close</span><span class='rparen'>)</span> <span class='kw'>if</span> <span class='id blk'>blk</span><span class='period'>.</span><span class='id nil?'>nil?</span>
780
-
781
- <span class='id codepoints'>codepoints</span> <span class='op'>=</span> <span class='id blk'>blk</span><span class='period'>.</span><span class='id respond_to?'>respond_to?</span><span class='lparen'>(</span><span class='symbol'>:codepoints</span><span class='rparen'>)</span> <span class='op'>?</span> <span class='id blk'>blk</span><span class='period'>.</span><span class='id codepoints'>codepoints</span><span class='period'>.</span><span class='id to_a'>to_a</span> <span class='op'>:</span> <span class='id blk'>blk</span>
782
-
783
- <span class='id tag'>tag</span> <span class='op'>=</span> <span class='id codepoints'>codepoints</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span> <span class='op'>&amp;</span> <span class='int'>0x1f</span>
784
- <span class='id len'>len</span> <span class='op'>=</span> <span class='id codepoints'>codepoints</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
785
-
786
- <span class='kw'>if</span> <span class='id tag'>tag</span> <span class='op'>==</span> <span class='int'>0x1f</span> <span class='comment'># long form
787
- </span> <span class='id tag'>tag</span> <span class='op'>=</span> <span class='int'>0</span>
788
- <span class='kw'>while</span> <span class='kw'>true</span>
789
- <span class='id ch'>ch</span> <span class='op'>=</span> <span class='id io'>io</span><span class='period'>.</span><span class='id getc'>getc</span>
790
- <span class='id blk'>blk</span> <span class='op'>&lt;&lt;</span> <span class='id ch'>ch</span>
791
- <span class='id tag'>tag</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id tag'>tag</span> <span class='op'>&lt;&lt;</span> <span class='int'>7</span><span class='rparen'>)</span> <span class='op'>|</span> <span class='lparen'>(</span><span class='id ch'>ch</span> <span class='op'>&amp;</span> <span class='int'>0x7f</span><span class='rparen'>)</span>
792
- <span class='kw'>break</span> <span class='kw'>if</span> <span class='lparen'>(</span><span class='id ch'>ch</span> <span class='op'>&amp;</span> <span class='int'>0x80</span><span class='rparen'>)</span> <span class='op'>==</span> <span class='int'>0</span>
793
- <span class='kw'>end</span>
794
- <span class='id len'>len</span> <span class='op'>=</span> <span class='id io'>io</span><span class='period'>.</span><span class='id getc'>getc</span>
795
- <span class='id blk'>blk</span> <span class='op'>&lt;&lt;</span> <span class='id len'>len</span>
796
- <span class='kw'>end</span>
797
-
798
- <span class='kw'>if</span> <span class='lparen'>(</span><span class='id len'>len</span> <span class='op'>&amp;</span> <span class='int'>0x80</span><span class='rparen'>)</span> <span class='op'>!=</span> <span class='int'>0</span> <span class='comment'># long form
799
- </span> <span class='id len'>len</span> <span class='op'>=</span> <span class='id len'>len</span> <span class='op'>&amp;</span> <span class='int'>0x7f</span>
800
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Indefinite length encoding not supported</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>if</span> <span class='id len'>len</span> <span class='op'>==</span> <span class='int'>0</span>
801
- <span class='id offset'>offset</span> <span class='op'>=</span> <span class='id blk'>blk</span><span class='period'>.</span><span class='id length'>length</span>
802
- <span class='id blk'>blk</span> <span class='op'>&lt;&lt;</span> <span class='id io'>io</span><span class='period'>.</span><span class='id read'>read</span><span class='lparen'>(</span><span class='id len'>len</span><span class='rparen'>)</span>
803
- <span class='comment'># is there a more efficient way of doing this?
804
- </span> <span class='id len'>len</span> <span class='op'>=</span> <span class='int'>0</span>
805
- <span class='id blk'>blk</span><span class='lbracket'>[</span><span class='id offset'>offset</span><span class='op'>..</span><span class='op'>-</span><span class='int'>1</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id each_byte'>each_byte</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id b'>b</span><span class='op'>|</span> <span class='id len'>len</span> <span class='op'>=</span> <span class='lparen'>(</span><span class='id len'>len</span> <span class='op'>&lt;&lt;</span> <span class='int'>8</span><span class='rparen'>)</span> <span class='op'>|</span> <span class='id b'>b</span> <span class='rbrace'>}</span>
806
- <span class='kw'>end</span>
807
-
808
- <span class='id offset'>offset</span> <span class='op'>=</span> <span class='id blk'>blk</span><span class='period'>.</span><span class='id length'>length</span>
809
- <span class='id blk'>blk</span> <span class='op'>&lt;&lt;</span> <span class='id io'>io</span><span class='period'>.</span><span class='id read'>read</span><span class='lparen'>(</span><span class='id len'>len</span><span class='rparen'>)</span>
810
- <span class='kw'>return</span> <span class='id blk'>blk</span>
811
- <span class='comment'># or if we wanted to keep the partial decoding we've done:
812
- </span> <span class='comment'># return blk, [blk[0] &gt;&gt; 6, tag], offset
813
- </span><span class='kw'>end</span></pre>
814
- </td>
815
- </tr>
816
- </table>
817
- </div>
818
-
819
- <div class="method_details ">
820
- <p class="signature " id="handle_requests-instance_method">
821
-
822
- - (<tt>Object</tt>) <strong>handle_requests</strong>
823
-
824
-
825
-
826
- </p><table class="source_code">
827
- <tr>
828
- <td>
829
- <pre class="lines">
830
-
831
-
832
- 87
833
- 88
834
- 89
835
- 90
836
- 91
837
- 92
838
- 93
839
- 94
840
- 95
841
- 96
842
- 97
843
- 98
844
- 99
845
- 100
846
- 101
847
- 102
848
- 103
849
- 104
850
- 105
851
- 106
852
- 107
853
- 108
854
- 109
855
- 110
856
- 111
857
- 112
858
- 113
859
- 114
860
- 115
861
- 116
862
- 117
863
- 118
864
- 119
865
- 120
866
- 121
867
- 122
868
- 123
869
- 124
870
- 125
871
- 126
872
- 127
873
- 128
874
- 129
875
- 130
876
- 131
877
- 132
878
- 133
879
- 134
880
- 135
881
- 136
882
- 137
883
- 138
884
- 139
885
- 140
886
- 141
887
- 142
888
- 143
889
- 144
890
- 145
891
- 146
892
- 147
893
- 148
894
- 149
895
- 150
896
- 151
897
- 152
898
- 153
899
- 154
900
- 155
901
- 156
902
- 157
903
- 158
904
- 159
905
- 160
906
- 161
907
- 162
908
- 163
909
- 164
910
- 165
911
- 166
912
- 167
913
- 168
914
- 169
915
- 170
916
- 171
917
- 172
918
- 173
919
- 174
920
- 175
921
- 176
922
- 177
923
- 178
924
- 179
925
- 180
926
- 181
927
- 182
928
- 183
929
- 184
930
- 185
931
- 186
932
- 187
933
- 188
934
- 189
935
- 190
936
- 191
937
- 192
938
- 193
939
- 194
940
- 195
941
- 196
942
- 197
943
- 198
944
- 199
945
- 200
946
- 201
947
- 202
948
- 203
949
- 204
950
- 205
951
- 206
952
- 207
953
- 208
954
- 209
955
- 210
956
- 211</pre>
957
- </td>
958
- <td>
959
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 87</span>
960
-
961
- <span class='kw'>def</span> <span class='id handle_requests'>handle_requests</span>
962
- <span class='id operationClass'>operationClass</span> <span class='op'>=</span> <span class='ivar'>@opt</span><span class='lbracket'>[</span><span class='symbol'>:operation_class</span><span class='rbracket'>]</span>
963
- <span class='id ocArgs'>ocArgs</span> <span class='op'>=</span> <span class='ivar'>@opt</span><span class='lbracket'>[</span><span class='symbol'>:operation_args</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='lbracket'>[</span><span class='rbracket'>]</span>
964
- <span class='id catch'>catch</span><span class='lparen'>(</span><span class='symbol'>:close</span><span class='rparen'>)</span> <span class='kw'>do</span>
965
- <span class='kw'>while</span> <span class='kw'>true</span>
966
- <span class='kw'>begin</span>
967
- <span class='id blk'>blk</span> <span class='op'>=</span> <span class='id ber_read'>ber_read</span><span class='lparen'>(</span><span class='ivar'>@io</span><span class='rparen'>)</span>
968
- <span class='id asn1'>asn1</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='id decode'>decode</span><span class='lparen'>(</span><span class='id blk'>blk</span><span class='rparen'>)</span>
969
- <span class='comment'># Debugging:
970
- </span> <span class='comment'># puts &quot;Request: #{blk.unpack(&quot;H*&quot;)}\n#{asn1.inspect}&quot; if $debug
971
- </span>
972
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>LDAPMessage must be SEQUENCE</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='rparen'>)</span>
973
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bad Message ID</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Integer</span><span class='rparen'>)</span>
974
- <span class='id messageId'>messageId</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id value'>value</span>
975
-
976
- <span class='id protocolOp'>protocolOp</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>1</span><span class='rbracket'>]</span>
977
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bad protocolOp</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>ASN1Data</span><span class='rparen'>)</span>
978
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Bad protocolOp tag class</span><span class='tstring_end'>&quot;</span></span> <span class='kw'>unless</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id tag_class'>tag_class</span> <span class='op'>==</span> <span class='symbol'>:APPLICATION</span>
979
-
980
- <span class='comment'># controls are not properly implemented
981
- </span> <span class='id c'>c</span> <span class='op'>=</span> <span class='id asn1'>asn1</span><span class='period'>.</span><span class='id value'>value</span><span class='lbracket'>[</span><span class='int'>2</span><span class='rbracket'>]</span>
982
- <span class='kw'>if</span> <span class='id c'>c</span><span class='period'>.</span><span class='id is_a?'>is_a?</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>ASN1Data</span><span class='rparen'>)</span> <span class='kw'>and</span> <span class='id c'>c</span><span class='period'>.</span><span class='id tag_class'>tag_class</span> <span class='op'>==</span> <span class='symbol'>:APPLICATION</span> <span class='kw'>and</span> <span class='id c'>c</span><span class='period'>.</span><span class='id tag'>tag</span> <span class='op'>==</span> <span class='int'>0</span>
983
- <span class='id controls'>controls</span> <span class='op'>=</span> <span class='id c'>c</span><span class='period'>.</span><span class='id value'>value</span>
984
- <span class='kw'>end</span>
985
-
986
- <span class='kw'>case</span> <span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id tag'>tag</span>
987
- <span class='kw'>when</span> <span class='int'>0</span> <span class='comment'># BindRequest
988
- </span> <span class='id abandon_all'>abandon_all</span>
989
- <span class='ivar'>@binddn</span><span class='comma'>,</span> <span class='ivar'>@version</span> <span class='op'>=</span> <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span>
990
- <span class='id do_bind'>do_bind</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='id controls'>controls</span><span class='rparen'>)</span>
991
-
992
- <span class='kw'>when</span> <span class='int'>2</span> <span class='comment'># UnbindRequest
993
- </span> <span class='id throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:close</span><span class='rparen'>)</span>
994
-
995
- <span class='kw'>when</span> <span class='int'>3</span> <span class='comment'># SearchRequest
996
- </span> <span class='comment'># Note: RFC 2251 4.4.4.1 says behaviour is undefined if
997
- </span> <span class='comment'># client sends an overlapping request with same message ID,
998
- </span> <span class='comment'># so we don't have to worry about the case where there is
999
- </span> <span class='comment'># already a thread with this id in @active_reqs.
1000
- </span> <span class='comment'># However, to avoid a race we copy messageId/
1001
- </span> <span class='comment'># protocolOp/controls into thread-local variables, because
1002
- </span> <span class='comment'># they will change when the next request comes in.
1003
- </span> <span class='comment'>#
1004
- </span> <span class='comment'># There is a theoretical race condition here: a client could
1005
- </span> <span class='comment'># send an abandon request before Thread.current is assigned to
1006
- </span> <span class='comment'># @active_reqs[thrm]. It's not a problem, because abandon isn't
1007
- </span> <span class='comment'># guaranteed to work anyway. Doing it this way ensures that
1008
- </span> <span class='comment'># @active_reqs does not leak memory on a long-lived connection.
1009
- </span>
1010
- <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1011
- <span class='kw'>begin</span>
1012
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1013
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_search'>do_search</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1014
- <span class='kw'>ensure</span>
1015
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1016
- <span class='kw'>end</span>
1017
- <span class='kw'>end</span>
1018
-
1019
- <span class='kw'>when</span> <span class='int'>6</span> <span class='comment'># ModifyRequest
1020
- </span> <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1021
- <span class='kw'>begin</span>
1022
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1023
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_modify'>do_modify</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1024
- <span class='kw'>ensure</span>
1025
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1026
- <span class='kw'>end</span>
1027
- <span class='kw'>end</span>
1028
-
1029
- <span class='kw'>when</span> <span class='int'>8</span> <span class='comment'># AddRequest
1030
- </span> <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1031
- <span class='kw'>begin</span>
1032
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1033
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_add'>do_add</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1034
- <span class='kw'>ensure</span>
1035
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1036
- <span class='kw'>end</span>
1037
- <span class='kw'>end</span>
1038
-
1039
- <span class='kw'>when</span> <span class='int'>10</span> <span class='comment'># DelRequest
1040
- </span> <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1041
- <span class='kw'>begin</span>
1042
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1043
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_del'>do_del</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1044
- <span class='kw'>ensure</span>
1045
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1046
- <span class='kw'>end</span>
1047
- <span class='kw'>end</span>
1048
-
1049
- <span class='kw'>when</span> <span class='int'>12</span> <span class='comment'># ModifyDNRequest
1050
- </span> <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1051
- <span class='kw'>begin</span>
1052
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1053
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_modifydn'>do_modifydn</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1054
- <span class='kw'>ensure</span>
1055
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1056
- <span class='kw'>end</span>
1057
- <span class='kw'>end</span>
1058
-
1059
- <span class='kw'>when</span> <span class='int'>14</span> <span class='comment'># CompareRequest
1060
- </span> <span class='const'>Thread</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='id messageId'>messageId</span><span class='comma'>,</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span><span class='id controls'>controls</span><span class='rparen'>)</span> <span class='kw'>do</span> <span class='op'>|</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='id thrp'>thrp</span><span class='comma'>,</span><span class='id thrc'>thrc</span><span class='op'>|</span>
1061
- <span class='kw'>begin</span>
1062
- <span class='ivar'>@active_reqs</span><span class='lbracket'>[</span><span class='id thrm'>thrm</span><span class='rbracket'>]</span> <span class='op'>=</span> <span class='const'>Thread</span><span class='period'>.</span><span class='id current'>current</span>
1063
- <span class='id operationClass'>operationClass</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='kw'>self</span><span class='comma'>,</span><span class='id thrm'>thrm</span><span class='comma'>,</span><span class='op'>*</span><span class='id ocArgs'>ocArgs</span><span class='rparen'>)</span><span class='period'>.</span><span class='id do_compare'>do_compare</span><span class='lparen'>(</span><span class='id thrp'>thrp</span><span class='comma'>,</span> <span class='id thrc'>thrc</span><span class='rparen'>)</span>
1064
- <span class='kw'>ensure</span>
1065
- <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id delete'>delete</span><span class='lparen'>(</span><span class='id thrm'>thrm</span><span class='rparen'>)</span>
1066
- <span class='kw'>end</span>
1067
- <span class='kw'>end</span>
1068
-
1069
- <span class='kw'>when</span> <span class='int'>16</span> <span class='comment'># AbandonRequest
1070
- </span> <span class='id abandon'>abandon</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id value'>value</span><span class='rparen'>)</span>
1071
-
1072
- <span class='kw'>else</span>
1073
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>Unrecognised protocolOp tag </span><span class='embexpr_beg'>#{</span><span class='id protocolOp'>protocolOp</span><span class='period'>.</span><span class='id tag'>tag</span><span class='rbrace'>}</span><span class='tstring_end'>&quot;</span></span>
1074
- <span class='kw'>end</span>
1075
-
1076
- <span class='kw'>rescue</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='comma'>,</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>ASN1Error</span> <span class='op'>=&gt;</span> <span class='id e'>e</span>
1077
- <span class='id send_notice_of_disconnection'>send_notice_of_disconnection</span><span class='lparen'>(</span><span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>ProtocolError</span><span class='period'>.</span><span class='id new'>new</span><span class='period'>.</span><span class='id to_i'>to_i</span><span class='comma'>,</span> <span class='id e'>e</span><span class='period'>.</span><span class='id message'>message</span><span class='rparen'>)</span>
1078
- <span class='id throw'>throw</span><span class='lparen'>(</span><span class='symbol'>:close</span><span class='rparen'>)</span>
1079
-
1080
- <span class='comment'># all other exceptions propagate up and are caught by tcpserver
1081
- </span> <span class='kw'>end</span>
1082
- <span class='kw'>end</span>
1083
- <span class='kw'>end</span>
1084
- <span class='id abandon_all'>abandon_all</span>
1085
- <span class='kw'>end</span></pre>
1086
- </td>
1087
- </tr>
1088
- </table>
1089
- </div>
1090
-
1091
- <div class="method_details ">
1092
- <p class="signature " id="log-instance_method">
1093
-
1094
- - (<tt>Object</tt>) <strong>log</strong>(msg)
1095
-
1096
-
1097
-
1098
- </p><table class="source_code">
1099
- <tr>
1100
- <td>
1101
- <pre class="lines">
1102
-
1103
-
1104
- 31
1105
- 32
1106
- 33</pre>
1107
- </td>
1108
- <td>
1109
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 31</span>
1110
-
1111
- <span class='kw'>def</span> <span class='id log'>log</span><span class='lparen'>(</span><span class='id msg'>msg</span><span class='rparen'>)</span>
1112
- <span class='ivar'>@logger</span> <span class='op'>&lt;&lt;</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>[</span><span class='embexpr_beg'>#{</span><span class='ivar'>@io</span><span class='period'>.</span><span class='id peeraddr'>peeraddr</span><span class='lbracket'>[</span><span class='int'>3</span><span class='rbracket'>]</span><span class='rbrace'>}</span><span class='tstring_content'>]: </span><span class='embexpr_beg'>#{</span><span class='id msg'>msg</span><span class='rbrace'>}</span><span class='tstring_content'>\n</span><span class='tstring_end'>&quot;</span></span>
1113
- <span class='kw'>end</span></pre>
1114
- </td>
1115
- </tr>
1116
- </table>
1117
- </div>
1118
-
1119
- <div class="method_details ">
1120
- <p class="signature " id="send_notice_of_disconnection-instance_method">
1121
-
1122
- - (<tt>Object</tt>) <strong>send_notice_of_disconnection</strong>(resultCode, errorMessage = &quot;&quot;)
1123
-
1124
-
1125
-
1126
- </p><table class="source_code">
1127
- <tr>
1128
- <td>
1129
- <pre class="lines">
1130
-
1131
-
1132
- 268
1133
- 269
1134
- 270
1135
- 271
1136
- 272
1137
- 273</pre>
1138
- </td>
1139
- <td>
1140
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 268</span>
1141
-
1142
- <span class='kw'>def</span> <span class='id send_notice_of_disconnection'>send_notice_of_disconnection</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id errorMessage'>errorMessage</span><span class='op'>=</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span>
1143
- <span class='id send_unsolicited_notification'>send_unsolicited_notification</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span>
1144
- <span class='symbol'>:errorMessage</span><span class='op'>=&gt;</span><span class='id errorMessage'>errorMessage</span><span class='comma'>,</span>
1145
- <span class='symbol'>:responseName</span><span class='op'>=&gt;</span><span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_content'>1.3.6.1.4.1.1466.20036</span><span class='tstring_end'>&quot;</span></span>
1146
- <span class='rparen'>)</span>
1147
- <span class='kw'>end</span></pre>
1148
- </td>
1149
- </tr>
1150
- </table>
1151
- </div>
1152
-
1153
- <div class="method_details ">
1154
- <p class="signature " id="send_unsolicited_notification-instance_method">
1155
-
1156
- - (<tt>Object</tt>) <strong>send_unsolicited_notification</strong>(resultCode, opt = {})
1157
-
1158
-
1159
-
1160
- </p><table class="source_code">
1161
- <tr>
1162
- <td>
1163
- <pre class="lines">
1164
-
1165
-
1166
- 244
1167
- 245
1168
- 246
1169
- 247
1170
- 248
1171
- 249
1172
- 250
1173
- 251
1174
- 252
1175
- 253
1176
- 254
1177
- 255
1178
- 256
1179
- 257
1180
- 258
1181
- 259
1182
- 260
1183
- 261
1184
- 262
1185
- 263
1186
- 264
1187
- 265
1188
- 266</pre>
1189
- </td>
1190
- <td>
1191
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 244</span>
1192
-
1193
- <span class='kw'>def</span> <span class='id send_unsolicited_notification'>send_unsolicited_notification</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='comma'>,</span> <span class='id opt'>opt</span><span class='op'>=</span><span class='lbrace'>{</span><span class='rbrace'>}</span><span class='rparen'>)</span>
1194
- <span class='id protocolOp'>protocolOp</span> <span class='op'>=</span> <span class='lbracket'>[</span>
1195
- <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Enumerated</span><span class='lparen'>(</span><span class='id resultCode'>resultCode</span><span class='rparen'>)</span><span class='comma'>,</span>
1196
- <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:matchedDN</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span>
1197
- <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:errorMessage</span><span class='rbracket'>]</span> <span class='op'>||</span> <span class='tstring'><span class='tstring_beg'>&quot;</span><span class='tstring_end'>&quot;</span></span><span class='rparen'>)</span><span class='comma'>,</span>
1198
- <span class='rbracket'>]</span>
1199
- <span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:referral</span><span class='rbracket'>]</span>
1200
- <span class='id rs'>rs</span> <span class='op'>=</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:referral</span><span class='rbracket'>]</span><span class='period'>.</span><span class='id collect'>collect</span> <span class='lbrace'>{</span> <span class='op'>|</span><span class='id r'>r</span><span class='op'>|</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id r'>r</span><span class='rparen'>)</span> <span class='rbrace'>}</span>
1201
- <span class='id protocolOp'>protocolOp</span> <span class='op'>&lt;&lt;</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id rs'>rs</span><span class='comma'>,</span> <span class='int'>3</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
1202
- <span class='kw'>end</span>
1203
- <span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:responseName</span><span class='rbracket'>]</span>
1204
- <span class='id protocolOp'>protocolOp</span> <span class='op'>&lt;&lt;</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:responseName</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>10</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
1205
- <span class='kw'>end</span>
1206
- <span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:response</span><span class='rbracket'>]</span>
1207
- <span class='id protocolOp'>protocolOp</span> <span class='op'>&lt;&lt;</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>OctetString</span><span class='lparen'>(</span><span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:response</span><span class='rbracket'>]</span><span class='comma'>,</span> <span class='int'>11</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span>
1208
- <span class='kw'>end</span>
1209
- <span class='id message'>message</span> <span class='op'>=</span> <span class='lbracket'>[</span>
1210
- <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Integer</span><span class='lparen'>(</span><span class='int'>0</span><span class='rparen'>)</span><span class='comma'>,</span>
1211
- <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id protocolOp'>protocolOp</span><span class='comma'>,</span> <span class='int'>24</span><span class='comma'>,</span> <span class='symbol'>:IMPLICIT</span><span class='comma'>,</span> <span class='symbol'>:APPLICATION</span><span class='rparen'>)</span><span class='comma'>,</span>
1212
- <span class='rbracket'>]</span>
1213
- <span class='id message'>message</span> <span class='op'>&lt;&lt;</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:controls</span><span class='rbracket'>]</span> <span class='kw'>if</span> <span class='id opt'>opt</span><span class='lbracket'>[</span><span class='symbol'>:controls</span><span class='rbracket'>]</span>
1214
- <span class='id write'>write</span><span class='lparen'>(</span><span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>ASN1</span><span class='op'>::</span><span class='const'>Sequence</span><span class='lparen'>(</span><span class='id message'>message</span><span class='rparen'>)</span><span class='period'>.</span><span class='id to_der'>to_der</span><span class='rparen'>)</span>
1215
- <span class='kw'>end</span></pre>
1216
- </td>
1217
- </tr>
1218
- </table>
1219
- </div>
1220
-
1221
- <div class="method_details ">
1222
- <p class="signature " id="startssl-instance_method">
1223
-
1224
- - (<tt>Object</tt>) <strong>startssl</strong>
1225
-
1226
-
1227
-
1228
- </p><div class="docstring">
1229
- <div class="discussion">
1230
- <p>
1231
- :yields:
1232
- </p>
1233
-
1234
-
1235
- </div>
1236
- </div>
1237
- <div class="tags">
1238
-
1239
- </div><table class="source_code">
1240
- <tr>
1241
- <td>
1242
- <pre class="lines">
1243
-
1244
-
1245
- 35
1246
- 36
1247
- 37
1248
- 38
1249
- 39
1250
- 40
1251
- 41
1252
- 42
1253
- 43
1254
- 44</pre>
1255
- </td>
1256
- <td>
1257
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 35</span>
1258
-
1259
- <span class='kw'>def</span> <span class='id startssl'>startssl</span> <span class='comment'># :yields:
1260
- </span> <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
1261
- <span class='id raise'>raise</span> <span class='const'>LDAP</span><span class='op'>::</span><span class='const'>ResultError</span><span class='op'>::</span><span class='const'>OperationsError</span> <span class='kw'>if</span> <span class='ivar'>@ssl</span> <span class='kw'>or</span> <span class='ivar'>@active_reqs</span><span class='period'>.</span><span class='id size'>size</span> <span class='op'>&gt;</span> <span class='int'>0</span>
1262
- <span class='kw'>yield</span> <span class='kw'>if</span> <span class='id block_given?'>block_given?</span>
1263
- <span class='ivar'>@io</span> <span class='op'>=</span> <span class='const'>OpenSSL</span><span class='op'>::</span><span class='const'>SSL</span><span class='op'>::</span><span class='const'>SSLSocket</span><span class='period'>.</span><span class='id new'>new</span><span class='lparen'>(</span><span class='ivar'>@io</span><span class='comma'>,</span> <span class='ivar'>@opt</span><span class='lbracket'>[</span><span class='symbol'>:ssl_ctx</span><span class='rbracket'>]</span><span class='rparen'>)</span>
1264
- <span class='ivar'>@io</span><span class='period'>.</span><span class='id sync_close'>sync_close</span> <span class='op'>=</span> <span class='kw'>true</span>
1265
- <span class='ivar'>@io</span><span class='period'>.</span><span class='id accept'>accept</span>
1266
- <span class='ivar'>@ssl</span> <span class='op'>=</span> <span class='kw'>true</span>
1267
- <span class='kw'>end</span>
1268
- <span class='kw'>end</span></pre>
1269
- </td>
1270
- </tr>
1271
- </table>
1272
- </div>
1273
-
1274
- <div class="method_details ">
1275
- <p class="signature " id="write-instance_method">
1276
-
1277
- - (<tt>Object</tt>) <strong>write</strong>(data)
1278
-
1279
-
1280
-
1281
- </p><table class="source_code">
1282
- <tr>
1283
- <td>
1284
- <pre class="lines">
1285
-
1286
-
1287
- 213
1288
- 214
1289
- 215
1290
- 216
1291
- 217
1292
- 218</pre>
1293
- </td>
1294
- <td>
1295
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 213</span>
1296
-
1297
- <span class='kw'>def</span> <span class='id write'>write</span><span class='lparen'>(</span><span class='id data'>data</span><span class='rparen'>)</span>
1298
- <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
1299
- <span class='ivar'>@io</span><span class='period'>.</span><span class='id write'>write</span><span class='lparen'>(</span><span class='id data'>data</span><span class='rparen'>)</span>
1300
- <span class='ivar'>@io</span><span class='period'>.</span><span class='id flush'>flush</span>
1301
- <span class='kw'>end</span>
1302
- <span class='kw'>end</span></pre>
1303
- </td>
1304
- </tr>
1305
- </table>
1306
- </div>
1307
-
1308
- <div class="method_details ">
1309
- <p class="signature " id="writelock-instance_method">
1310
-
1311
- - (<tt>Object</tt>) <strong>writelock</strong>
1312
-
1313
-
1314
-
1315
- </p><table class="source_code">
1316
- <tr>
1317
- <td>
1318
- <pre class="lines">
1319
-
1320
-
1321
- 220
1322
- 221
1323
- 222
1324
- 223
1325
- 224
1326
- 225</pre>
1327
- </td>
1328
- <td>
1329
- <pre class="code"><span class="info file"># File 'lib/ldap/server/connection.rb', line 220</span>
1330
-
1331
- <span class='kw'>def</span> <span class='id writelock'>writelock</span>
1332
- <span class='ivar'>@mutex</span><span class='period'>.</span><span class='id synchronize'>synchronize</span> <span class='kw'>do</span>
1333
- <span class='kw'>yield</span> <span class='ivar'>@io</span>
1334
- <span class='ivar'>@io</span><span class='period'>.</span><span class='id flush'>flush</span>
1335
- <span class='kw'>end</span>
1336
- <span class='kw'>end</span></pre>
1337
- </td>
1338
- </tr>
1339
- </table>
1340
- </div>
1341
-
1342
- </div>
1343
-
1344
- </div>
1345
-
1346
- <div id="footer">
1347
- Generated on Mon Sep 13 13:27:18 2010 by
1348
- <a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
1349
- 0.6.0 (ruby-1.9.2).
1350
- </div>
1351
-
1352
- </body>
1353
- </html>