This file is indexed.

/usr/share/gtk-doc/html/u2f-host/u2f-host-u2f-host.html is in libu2f-host-dev 1.0.0-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>u2f-host: Yubico Universal 2nd Factor C Library</title>
<meta name="generator" content="DocBook XSL Stylesheets V1.78.1">
<link rel="home" href="index.html" title="Yubico Universal 2nd Factor C Library">
<link rel="up" href="intro.html" title="Yubico Universal 2nd Factor C Library">
<link rel="prev" href="intro.html" title="Yubico Universal 2nd Factor C Library">
<link rel="next" href="u2f-host-u2f-host-types.html" title="u2f-host-types">
<meta name="generator" content="GTK-Doc V1.24 (XML mode)">
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF">
<table class="navigation" id="top" width="100%" summary="Navigation header" cellpadding="2" cellspacing="5"><tr valign="middle">
<td width="100%" align="left" class="shortcuts">
<a href="#" class="shortcut">Top</a><span id="nav_description">  <span class="dim">|</span> 
                  <a href="#u2f-host-u2f-host.description" class="shortcut">Description</a></span>
</td>
<td><a accesskey="h" href="index.html"><img src="home.png" width="16" height="16" border="0" alt="Home"></a></td>
<td><a accesskey="u" href="intro.html"><img src="up.png" width="16" height="16" border="0" alt="Up"></a></td>
<td><a accesskey="p" href="intro.html"><img src="left.png" width="16" height="16" border="0" alt="Prev"></a></td>
<td><a accesskey="n" href="u2f-host-u2f-host-types.html"><img src="right.png" width="16" height="16" border="0" alt="Next"></a></td>
</tr></table>
<div class="refentry">
<a name="u2f-host-u2f-host"></a><div class="titlepage"></div>
<div class="refnamediv"><table width="100%"><tr>
<td valign="top">
<h2><span class="refentrytitle"><a name="u2f-host-u2f-host.top_of_page"></a>u2f-host</span></h2>
<p>u2f-host</p>
</td>
<td class="gallery_image" valign="top" align="right"></td>
</tr></table></div>
<div class="refsect1">
<a name="u2f-host-u2f-host.functions"></a><h2>Functions</h2>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="functions_return">
<col class="functions_name">
</colgroup>
<tbody>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-global-init" title="u2fh_global_init ()">u2fh_global_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-global-done" title="u2fh_global_done ()">u2fh_global_done</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-strerror" title="u2fh_strerror ()">u2fh_strerror</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">const <span class="returnvalue">char</span> *
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-strerror-name" title="u2fh_strerror_name ()">u2fh_strerror_name</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()">u2fh_devs_init</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-devs-discover" title="u2fh_devs_discover ()">u2fh_devs_discover</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">void</span>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-devs-done" title="u2fh_devs_done ()">u2fh_devs_done</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-register" title="u2fh_register ()">u2fh_register</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-authenticate" title="u2fh_authenticate ()">u2fh_authenticate</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-sendrecv" title="u2fh_sendrecv ()">u2fh_sendrecv</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-get-device-description" title="u2fh_get_device_description ()">u2fh_get_device_description</a> <span class="c_punctuation">()</span>
</td>
</tr>
<tr>
<td class="function_type">
<span class="returnvalue">int</span>
</td>
<td class="function_name">
<a class="link" href="u2f-host-u2f-host.html#u2fh-is-alive" title="u2fh_is_alive ()">u2fh_is_alive</a> <span class="c_punctuation">()</span>
</td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect1">
<a name="u2f-host-u2f-host.description"></a><h2>Description</h2>
<p>
</p>
</div>
<div class="refsect1">
<a name="u2f-host-u2f-host.functions_details"></a><h2>Functions</h2>
<div class="refsect2">
<a name="u2fh-global-init"></a><h3>u2fh_global_init ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_global_init (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-initflags" title="enum u2fh_initflags"><span class="type">u2fh_initflags</span></a> flags</code></em>);</pre>
<p>Initialize the library.  This function is not guaranteed to be
thread safe and must be invoked on application startup.</p>
<div class="refsect3">
<a name="id-1.2.3.5.2.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>initialization flags, ORed <a class="link" href="u2f-host-u2f-host-types.html#u2fh-initflags" title="enum u2fh_initflags"><span class="type">u2fh_initflags</span></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.2.6"></a><h4>Returns</h4>
<p> On success <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> (integer 0) is returned, and on errors
an <a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-global-done"></a><h3>u2fh_global_done ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
u2fh_global_done (<em class="parameter"><code><span class="type">void</span></code></em>);</pre>
<p>Release all resources from the library.  Call this function when no
further use of the library is needed.</p>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-strerror"></a><h3>u2fh_strerror ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
u2fh_strerror (<em class="parameter"><code><span class="type">int</span> err</code></em>);</pre>
<p>Convert return code to human readable string explanation of the
reason for the particular error code.</p>
<p>This string can be used to output a diagnostic message to the user.</p>
<p>This function is one of few in the library that can be used without
a successful call to <a class="link" href="u2f-host-u2f-host.html#u2fh-global-init" title="u2fh_global_init ()"><code class="function">u2fh_global_init()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.3.5.4.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>error code</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.4.8"></a><h4>Returns</h4>
<p> Returns a pointer to a statically allocated string
containing an explanation of the error code <em class="parameter"><code>err</code></em>
.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-strerror-name"></a><h3>u2fh_strerror_name ()</h3>
<pre class="programlisting">const <span class="returnvalue">char</span> *
u2fh_strerror_name (<em class="parameter"><code><span class="type">int</span> err</code></em>);</pre>
<p>Convert return code to human readable string representing the error
code symbol itself.  For example, u2fh_strerror_name(<a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a>)
returns the string "U2FH_OK".</p>
<p>This string can be used to output a diagnostic message to the user.</p>
<p>This function is one of few in the library that can be used without
a successful call to <a class="link" href="u2f-host-u2f-host.html#u2fh-global-init" title="u2fh_global_init ()"><code class="function">u2fh_global_init()</code></a>.</p>
<div class="refsect3">
<a name="id-1.2.3.5.5.7"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>err</p></td>
<td class="parameter_description"><p>error code</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.5.8"></a><h4>Returns</h4>
<p> Returns a pointer to a statically allocated string
containing a string version of the error code <em class="parameter"><code>err</code></em>
, or NULL if
the error code is not known.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-devs-init"></a><h3>u2fh_devs_init ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_devs_init (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> **devs</code></em>);</pre>
<p>Initialize device handle.</p>
<div class="refsect3">
<a name="id-1.2.3.5.6.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>pointer to <a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> type to initialize.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.6.6"></a><h4>Returns</h4>
<p> On success <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> (integer 0) is returned, on memory
allocation errors <a class="link" href="u2f-host-u2f-host-types.html#U2FH-MEMORY-ERROR:CAPS"><code class="literal">U2FH_MEMORY_ERROR</code></a> is returned, or another
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code is returned.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-devs-discover"></a><h3>u2fh_devs_discover ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_devs_discover (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
                    <em class="parameter"><code><span class="type">unsigned</span> *max_index</code></em>);</pre>
<p>Discover and open new devices.  This function can safely be called
several times and will free resources associated with unplugged
devices and open new.</p>
<div class="refsect3">
<a name="id-1.2.3.5.7.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>device handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>max_index</p></td>
<td class="parameter_description"><p>will on return be set to the maximum index, may be NULL; if
there is 1 device this will be 0, if there are 2 devices this
will be 1, and so on.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.7.6"></a><h4>Returns</h4>
<p> On success, <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> (integer 0) is returned, when no U2F
device could be found <a class="link" href="u2f-host-u2f-host-types.html#U2FH-NO-U2F-DEVICE:CAPS"><code class="literal">U2FH_NO_U2F_DEVICE</code></a> is returned, or another
<a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-devs-done"></a><h3>u2fh_devs_done ()</h3>
<pre class="programlisting"><span class="returnvalue">void</span>
u2fh_devs_done (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>);</pre>
<p>Release all resources associated with <em class="parameter"><code>devs</code></em>
.  This function must be
called when you are finished with a device handle.</p>
<div class="refsect3">
<a name="id-1.2.3.5.8.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody><tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>device handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr></tbody>
</table></div>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-register"></a><h3>u2fh_register ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_register (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
               <em class="parameter"><code>const <span class="type">char</span> *challenge</code></em>,
               <em class="parameter"><code>const <span class="type">char</span> *origin</code></em>,
               <em class="parameter"><code><span class="type">char</span> **response</code></em>,
               <em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-cmdflags" title="enum u2fh_cmdflags"><span class="type">u2fh_cmdflags</span></a> flags</code></em>);</pre>
<p>Perform the U2F Register operation.</p>
<div class="refsect3">
<a name="id-1.2.3.5.9.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>a device set handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a> and <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-discover" title="u2fh_devs_discover ()"><code class="function">u2fh_devs_discover()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>challenge</p></td>
<td class="parameter_description"><p>string with JSON data containing the challenge.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>origin</p></td>
<td class="parameter_description"><p>U2F origin URL.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response</p></td>
<td class="parameter_description"><p>pointer to output string with JSON data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>set of ORed <a class="link" href="u2f-host-u2f-host-types.html#u2fh-cmdflags" title="enum u2fh_cmdflags"><span class="type">u2fh_cmdflags</span></a> values.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.9.6"></a><h4>Returns</h4>
<p> On success <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> (integer 0) is returned, and on errors
an <a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-authenticate"></a><h3>u2fh_authenticate ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_authenticate (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
                   <em class="parameter"><code>const <span class="type">char</span> *challenge</code></em>,
                   <em class="parameter"><code>const <span class="type">char</span> *origin</code></em>,
                   <em class="parameter"><code><span class="type">char</span> **response</code></em>,
                   <em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-cmdflags" title="enum u2fh_cmdflags"><span class="type">u2fh_cmdflags</span></a> flags</code></em>);</pre>
<p>Perform the U2F Authenticate operation.</p>
<div class="refsect3">
<a name="id-1.2.3.5.10.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>a device handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a> and <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-discover" title="u2fh_devs_discover ()"><code class="function">u2fh_devs_discover()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>challenge</p></td>
<td class="parameter_description"><p>string with JSON data containing the challenge.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>origin</p></td>
<td class="parameter_description"><p>U2F origin URL.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>response</p></td>
<td class="parameter_description"><p>pointer to output string with JSON data.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>flags</p></td>
<td class="parameter_description"><p>set of ORed <a class="link" href="u2f-host-u2f-host-types.html#u2fh-cmdflags" title="enum u2fh_cmdflags"><span class="type">u2fh_cmdflags</span></a> values.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.10.6"></a><h4>Returns</h4>
<p> On success <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> (integer 0) is returned, and on errors
an <a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-sendrecv"></a><h3>u2fh_sendrecv ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_sendrecv (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
               <em class="parameter"><code><span class="type">unsigned </span> index</code></em>,
               <em class="parameter"><code><span class="type">uint8_t</span> cmd</code></em>,
               <em class="parameter"><code>const unsigned <span class="type">char</span> *send</code></em>,
               <em class="parameter"><code><span class="type">uint16_t</span> sendlen</code></em>,
               <em class="parameter"><code>unsigned <span class="type">char</span> *recv</code></em>,
               <em class="parameter"><code><span class="type">size_t</span> *recvlen</code></em>);</pre>
<p>Send a command with data to the device at <em class="parameter"><code>index</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.3.5.11.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>device handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index</p></td>
<td class="parameter_description"><p>index of device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>cmd</p></td>
<td class="parameter_description"><p>command to run</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>send</p></td>
<td class="parameter_description"><p>buffer of data to send</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>sendlen</p></td>
<td class="parameter_description"><p>length of data to send</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>recv</p></td>
<td class="parameter_description"><p>buffer of data to receive</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>recvlen</p></td>
<td class="parameter_description"><p>length of data to receive</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.11.6"></a><h4>Returns</h4>
<p> <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> on success, another <a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="type">u2fh_rc</span></a> error code
otherwise.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-get-device-description"></a><h3>u2fh_get_device_description ()</h3>
<pre class="programlisting"><a class="link" href="u2f-host-u2f-host-types.html#u2fh-rc" title="enum u2fh_rc"><span class="returnvalue">u2fh_rc</span></a>
u2fh_get_device_description (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
                             <em class="parameter"><code><span class="type">unsigned </span> index</code></em>,
                             <em class="parameter"><code><span class="type">char</span> *out</code></em>,
                             <em class="parameter"><code><span class="type">size_t</span> *len</code></em>);</pre>
<p>Get the device description of the device at <em class="parameter"><code>index</code></em>
. Stores the
string in <em class="parameter"><code>out</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.3.5.12.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>device_handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index</p></td>
<td class="parameter_description"><p>index of device</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>out</p></td>
<td class="parameter_description"><p>buffer for storing device description</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>len</p></td>
<td class="parameter_description"><p>maximum amount of data to store in <em class="parameter"><code>out</code></em>
. Will be updated.</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.12.6"></a><h4>Returns</h4>
<p> <a class="link" href="u2f-host-u2f-host-types.html#U2FH-OK:CAPS"><code class="literal">U2FH_OK</code></a> on success.</p>
</div>
</div>
<hr>
<div class="refsect2">
<a name="u2fh-is-alive"></a><h3>u2fh_is_alive ()</h3>
<pre class="programlisting"><span class="returnvalue">int</span>
u2fh_is_alive (<em class="parameter"><code><a class="link" href="u2f-host-u2f-host-types.html#u2fh-devs" title="u2fh_devs"><span class="type">u2fh_devs</span></a> *devs</code></em>,
               <em class="parameter"><code><span class="type">unsigned </span> index</code></em>);</pre>
<p>Get the liveliness of the device <em class="parameter"><code>index</code></em>
.</p>
<div class="refsect3">
<a name="id-1.2.3.5.13.5"></a><h4>Parameters</h4>
<div class="informaltable"><table width="100%" border="0">
<colgroup>
<col width="150px" class="parameters_name">
<col class="parameters_description">
<col width="200px" class="parameters_annotations">
</colgroup>
<tbody>
<tr>
<td class="parameter_name"><p>devs</p></td>
<td class="parameter_description"><p>device_handle, from <a class="link" href="u2f-host-u2f-host.html#u2fh-devs-init" title="u2fh_devs_init ()"><code class="function">u2fh_devs_init()</code></a>.</p></td>
<td class="parameter_annotations"> </td>
</tr>
<tr>
<td class="parameter_name"><p>index</p></td>
<td class="parameter_description"><p>index of device</p></td>
<td class="parameter_annotations"> </td>
</tr>
</tbody>
</table></div>
</div>
<div class="refsect3">
<a name="id-1.2.3.5.13.6"></a><h4>Returns</h4>
<p> 1 if the device is considered alive, 0 otherwise.</p>
</div>
</div>
</div>
<div class="refsect1">
<a name="u2f-host-u2f-host.other_details"></a><h2>Types and Values</h2>
</div>
</div>
<div class="footer">
<hr>Generated by GTK-Doc V1.24</div>
</body>
</html>