xref: /illumos-gate/usr/src/man/man8/ccidadm.8 (revision fc910014e8a32a65612105835a10995f2c13d942)
1.\"
2.\" This file and its contents are supplied under the terms of the
3.\" Common Development and Distribution License ("CDDL"), version 1.0.
4.\" You may only use this file in accordance with the terms of version
5.\" 1.0 of the CDDL.
6.\"
7.\" A full copy of the text of the CDDL should have accompanied this
8.\" source.  A copy of the CDDL is also available via the Internet at
9.\" http://www.illumos.org/license/CDDL.
10.\"
11.\"
12.\" Copyright 2019 Joyent, Inc.
13.\"
14.Dd September 12, 2020
15.Dt CCIDADM 8
16.Os
17.Sh NAME
18.Nm ccidadm
19.Nd CCID administration utility
20.Sh SYNOPSIS
21.Nm
22.Cm list
23.Nm
24.Cm atr
25.Op Fl pvx
26.Op Ar device
27.Nm
28.Cm reader
29.Op Ar device
30.Sh DESCRIPTION
31The
32.Nm
33utility can be used to list the CCID controllers and their slots known to the
34.Xr ccid 4D
35driver, query the features and capabilities of a CCID controller, and print
36the ATR of an ICC (integrated circuit card) that is inserted in a slot on an
37CCID controller.
38.Pp
39The information returned by the hardware is printed by
40.Nm
41in a human-readable form where applicable.
42.Sh ARGUMENTS
43.Nm
44expects the following kinds of arguments:
45.Bl -tag -width "device"
46.It Ar command
47Any command
48.Nm
49understands.
50See section
51.Sx COMMANDS
52for more information.
53.It Ar device
54Specifies a CCID reader or a slot, either as absolute path to the device node
55or in a short-hand form.
56The short-hand form consists of the reader instance, specified by the driver
57name
58.Qq ccid
59followed by the instance number of the reader, and optionally a slot instance
60separated by a
61.Qq / ,
62consisting of the word
63.Qq slot
64followed by the slot number.
65Here's an example for slot 1 on ccid reader 5:
66.Qq ccid5/slot1
67.El
68.Sh COMMANDS
69.Bl -tag -width ""
70.It Xo
71.Nm
72.Cm list
73.Xc
74Lists the CCID controllers and their slots known to the system and prints their
75product name, device node, card state, and the transport protocol in use.
76.It Xo
77.Nm
78.Cm atr
79.Op Fl pvx
80.Op Ar device
81.Xc
82Prints the ATR of an ICC that is inserted in the specified slot.
83If a device is specified it must refer to a certain slot.
84If no device is specified the command will print the ATR of all inserted slots
85in the system.
86A human-readable summary of the ATR data is printed when no flags are given.
87The following options can be used to alter the output of the
88.Cm atr
89command:
90.Bl -tag -width Ds
91.It Fl v
92Verbose output, the individual bytes of the ATR are printed and decoded
93in a human-readable form.
94Additionally the historic data in the ATR is printed as a hexadecimal dump.
95.It Fl x
96The complete ATR is printed as a hexadecimal dump.
97.El
98.It Xo
99.Nm
100.Cm reader
101.Op Ar device
102.Xc
103Print the capabilities of the specified CCID reader.
104Specifying slot number is not required but can optionally be specified.
105If no device is given, the command will print the capabilities of all attached
106CCID readers.
107.El
108.Sh EXIT STATUS
109The
110.Nm
111utility exits 0 on success, 1 on any error opening or accessing the device, and
1122 if no command or an unknown command are given.
113.Sh EXAMPLES
114.Bl -tag -width ""
115.It Sy Example 1: List all CCID devices
116.Bd -literal
117# ccidadm list
118PRODUCT                 DEVICE          CARD STATE  TRANSPORT   SUPPORTED
119Yubikey 4 OTP+U2F+CCID  ccid0/slot0     activated   APDU (T=1)  supported
120Yubikey 4 OTP+U2F+CCID  ccid1/slot0     unactivated APDU        supported
121Smart Card Reader USB   ccid2/slot0     missing     TPDU        unsupported
122Smart Card Reader USB   ccid3/slot0     unactivated TPDU        unsupported
123.Ed
124.It Sy Example 2: Get the ATR of a Yubikey
125.Bd -literal
126# ccidadm atr ccid0/slot0
127ATR for ccid0/slot0 (18 bytes):
128ICC supports protocol(s): T=1
129Card protocol is negotiable; starts with default T=1 parameters
130Reader will run ICC at ICC's Di/Fi values
131T=1 properties that would be negotiated:
132  + Fi/Fmax Index: 1 (Fi 372/Fmax 5 MHz)
133  + Di Index: 3 (Di 4)
134  + Checksum: LRC
135  + Extra Guardtime: 0
136  + BWI: 1
137  + CWI: 5
138  + Clock Stop: 0 (disallowed)
139  + IFSC: 254
140  + CCID Supports NAD: no
141.Ed
142.It Sy Example 2: Get capabilities of a Smart Card Reader
143.Bd -literal
144# ccidadm reader ccid3
145Reader ccid3, CCID class v1.0 device:
146  Product: Smart Card Reader USB
147  Serial: <unknown>
148  Slots Present: 1
149  Maximum Busy Slots: 1
150  Supported Voltages:
151    + 5.0 V
152    + 3.0 V
153    + 1.8 V
154  Supported Protocols:
155    + T=0
156    + T=1
157  Default Clock: 3.69 MHz
158  Maximum Clock: 3.69 MHz
159  Supported Clock Rates: 1
160  Default Data Rate: 9.92 Kbps
161  Maximum Data Rate: 318 Kbps
162  Supported Data Rates: 19
163  Maximum IFSD (T=1 only): 254
164  Synchronous Protocols Supported:
165    + 2-Wire Support
166    + 3-Wire Support
167    + I2C Support
168  Device Features:
169    + Automatic ICC clock frequency change
170    + Automatic baud rate change
171    + Automatic PPS made by CCID
172    + CCID can set ICC in clock stop mode
173    + NAD value other than zero accepted
174    + TPDU support
175  Maximum Message Length: 271 bytes
176.Ed
177.El
178.Sh INTERFACE STABILITY
179The command line interface of
180.Nm
181is
182.Sy Evolving .
183The output of
184.Nm
185is
186.Sy Not-an-Interface
187and may change any time.
188.Sh SEE ALSO
189.Xr ccid 4D ,
190.Xr cfgadm 8
191