]> Dogcows Code - chaz/p5-File-KDBX/blob - t/files/bin/ykinfo
add initial WIP
[chaz/p5-File-KDBX] / t / files / bin / ykinfo
1 #!/bin/sh
2
3 # This is a fake ykinfo program that provides canned responses, for testing.
4
5 device=
6 all=
7
8 while getopts an: arg
9 do
10 case "$arg" in
11 n)
12 device="$OPTARG"
13 ;;
14 a)
15 all=1
16 ;;
17 esac
18 done
19
20 case "$device" in
21 0)
22 printf 'serial: 123
23 version: 2.0.0
24 touch_level: 0
25 vendor_id: 1050
26 product_id: 113
27 '
28 exit 0
29 ;;
30 1)
31 printf 'serial: 456
32 version: 3.0.1
33 touch_level: 10
34 vendor_id: 1050
35 product_id: 401
36 '
37 exit 0
38 ;;
39 *)
40 echo "Yubikey core error: no yubikey present" >&2
41 exit 1
42 esac
43
This page took 0.038255 seconds and 4 git commands to generate.