[BACK]Return to sectok.1 CVS log [TXT][DIR] Up to [local] / src / usr.bin / sectok

Annotation of src/usr.bin/sectok/sectok.1, Revision 1.10

1.10    ! jmc         1: .\"    $OpenBSD: sectok.1,v 1.9 2002/03/14 22:25:29 rees Exp $
1.1       rees        2: .\"
1.2       jakob       3: .\" Copyright (C) 2001, Jakob Schlyter. All rights reserved.
                      4: .\"
                      5: .\" Redistribution and use in source and binary forms, with or without
                      6: .\" modification, are permitted provided that the following conditions
                      7: .\" are met:
                      8: .\" 1. Redistributions of source code must retain the above copyright
                      9: .\"    notice, this list of conditions and the following disclaimer.
                     10: .\" 2. Redistributions in binary form must reproduce the above copyright
                     11: .\"    notice, this list of conditions and the following disclaimer in the
                     12: .\"    documentation and/or other materials provided with the distribution.
                     13: .\" 3. Neither the name of the project nor the names of its contributors
                     14: .\"    may be used to endorse or promote products derived from this software
                     15: .\"    without specific prior written permission.
                     16: .\"
                     17: .\" THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND
                     18: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     19: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     20: .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE PROJECT OR CONTRIBUTORS BE LIABLE
                     21: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     22: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     23: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     24: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     25: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     26: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     27: .\" SUCH DAMAGE.
                     28: .\"
                     29: .Dd July 17, 2001
                     30: .Dt SECTOK 1
1.1       rees       31: .Os
1.5       jakob      32: .\"
1.1       rees       33: .Sh NAME
1.2       jakob      34: .Nm sectok
1.1       rees       35: .Nd communicate with smartcards using iso7816
1.5       jakob      36: .\"
1.1       rees       37: .Sh SYNOPSIS
1.2       jakob      38: .Nm sectok
                     39: .Op Fl 0123
                     40: .Op Fl f Ar scriptfile
                     41: .Op Fl s Ar sleeptime
1.5       jakob      42: .\"
1.1       rees       43: .Sh DESCRIPTION
                     44: .Nm
1.2       jakob      45: is a command-line-like interface for communicating with smartcards.
                     46: APDUs can be sent to the card, and results are displayed. Some
                     47: commands are card-specific, and focus on the Schlumberger Cyberflex
                     48: Access Javacards.
1.6       mpech      49: .Pp
                     50: The options are as follows:
1.2       jakob      51: .Bl -tag -width Ds
                     52: .It Fl 0123
                     53: Select port.
                     54: .Pp
                     55: .It Fl f Ar scriptfile
                     56: Run commands from scriptfile.
                     57: .Pp
                     58: .It Fl s Ar sleeptime
1.4       rees       59: Set sleep (in milliseconds) between commands in the script.
1.3       jakob      60: .El
1.2       jakob      61: .Sh COMMANDS
                     62: .Ss Non-card commands
                     63: .Pp
                     64: .Bl -tag -width Ds
                     65: .It Xo
                     66: .Cm help
1.4       rees       67: .Xc
                     68: List all commands.
                     69: .It Xo
                     70: .Cm help
1.2       jakob      71: .Op command
                     72: .Xc
                     73: Show help for
                     74: .Ar command .
                     75: .It Xo
                     76: .Cm ?
                     77: .Op command
                     78: .Xc
                     79: Show help for
                     80: .Ar command .
                     81: .It Xo
                     82: .Cm reset
                     83: .Op Fl 0123ivf
                     84: .Xc
                     85: Reset smartcard.
                     86: .Bl -tag -width Ds
                     87: .It Fl 0123
                     88: select port
                     89: .It Fl i
                     90: don't wait for card insertion
                     91: .It Fl v
                     92: verbose
                     93: .It Fl f
                     94: open connection even if atr is bad
                     95: .El
                     96: .It Xo
                     97: .Cm open
                     98: .Op Fl 0123ivf
                     99: .Xc
                    100: Synonym for reset.
                    101: .It Xo
                    102: .Cm close
                    103: .Xc
                    104: Close smartcard connection.
                    105: .It Xo
                    106: .Cm quit
                    107: .Xc
                    108: Quit
                    109: .Nm Li .
                    110: .El
                    111: .Ss ISO 7816-4 commands
                    112: .Pp
                    113: .Bl -tag -width Ds
                    114: .It Xo
                    115: .Cm apdu
                    116: .Op Fl c Ar class
                    117: .Ar "ins p1 p2 p3 data ..."
                    118: .Xc
                    119: Send APDU to smartcard.
                    120: .It Xo
                    121: .Cm fid
                    122: .Op Fl v
1.4       rees      123: .Ar fid/aid
1.2       jakob     124: .Xc
1.4       rees      125: Select file or aid identified by
                    126: .Ar fid/aid .
                    127: .Ar fid/aid
1.10    ! jmc       128: can be a numeric fid such as 3f00, a two character name, or an aid in hex or
        !           129: ASCII.
1.2       jakob     130: .It Xo
                    131: .Cm isearch
                    132: .Xc
                    133: Try all 256 possible instructions and print results.
                    134: .It Xo
                    135: .Cm class
                    136: .Op Ar class
                    137: .Xc
1.5       jakob     138: Inquire or set default application
                    139: .Ar class .
1.2       jakob     140: .It Xo
                    141: .Cm read
                    142: .Op Fl x
                    143: .Ar filesize
                    144: .Xc
1.4       rees      145: Read selected fid and write to stdout.
1.2       jakob     146: .It Xo
                    147: .Cm write
                    148: .Ar input-filename
                    149: .Xc
1.5       jakob     150: Read from
                    151: .Ar input-filename
                    152: and write to selected fid.
1.8       rees      153: .It Xo
                    154: .Cm challenge
                    155: .Op Ar length
                    156: .Xc
                    157: Get a random challenge from the card.
1.9       rees      158: .It Xo
                    159: .Cm pin
                    160: .Op Fl k Ar keyno
                    161: .Op Ar PIN
                    162: .Xc
                    163: Verify CHV (PIN).
                    164: .It Xo
                    165: .Cm chpin
                    166: .Op Fl k Ar keyno
                    167: .Xc
                    168: Change CHV (PIN).
1.2       jakob     169: .El
                    170: .Ss Cyberflex commands
                    171: .Pp
                    172: .Bl -tag -width Ds
                    173: .It Xo
                    174: .Cm ls
                    175: .Op Fl l
                    176: .Xc
                    177: List all files in current DF.
                    178: .It Xo
                    179: .Cm acl
                    180: .Ar fid
                    181: .Op Ar principal: "r1 r2 ..."
                    182: .Xc
                    183: .Bl -tag -width Ds
                    184: .It principals
                    185: world, CHV1, CHV2, AUT0, AUT1, AUT2, AUT3, AUT4
                    186: .It f_rights
                    187: r, w, x/a, inval, rehab, dec, inc
                    188: .It d_rights
                    189: l, d, a, i, manage
                    190: .El
                    191: .It Xo
                    192: .Cm create
                    193: .Ar fid
                    194: .Ar size
                    195: .Xc
                    196: .It Xo
                    197: .Cm delete
                    198: .Ar fid
                    199: .Xc
                    200: .It Xo
                    201: .Cm jdefault
                    202: .Op Fl d
                    203: .Xc
                    204: Set default applet.
                    205: .Bl -tag -width Ds
                    206: .It Fl d
                    207: set default applet to default loader
                    208: .El
                    209: .It Xo
                    210: .Cm jatr
                    211: .Xc
                    212: Set java atr.
                    213: .It Xo
                    214: .Cm jdata
                    215: .Xc
                    216: Print useful info about the card
                    217: .It Xo
                    218: .Cm login
                    219: .Op Fl d
                    220: .Op Fl k Ar keyno
                    221: .Op Fl v
                    222: .Op Fl x Ar hex-aut0
                    223: .Xc
1.4       rees      224: "login" (verify AUT0 key)
                    225: .Bl -tag -width Ds
                    226: .It Fl d
                    227: use manufacturer's default AUT0 key
                    228: .El
1.2       jakob     229: .It Xo
                    230: .Cm jload
                    231: .Op Fl p Ar progID
                    232: .Op Fl c Ar contID
                    233: .Op Fl s Ar cont_size
                    234: .Op Fl i Ar inst_size
                    235: .Op Fl v
1.4       rees      236: .Op Fl a Ar aid
                    237: .Ar filename
1.2       jakob     238: .Xc
1.4       rees      239: Load an applet to the card.
1.5       jakob     240: If the first byte of the
                    241: .Ar aid
                    242: is '#' it will be converted to 0xfc.
1.2       jakob     243: .It Xo
                    244: .Cm junload
                    245: .Op Fl p Ar progID
                    246: .Op Fl c Ar contID
                    247: .Xc
                    248: .It Xo
                    249: .Cm jselect
                    250: .Op Fl a Ar aid
                    251: .Op Fl d
                    252: .Xc
                    253: Select applet.
                    254: .Bl -tag -width Ds
                    255: .It Fl d
                    256: select default loader
                    257: .El
                    258: .It Xo
                    259: .Cm setpass
                    260: .Op Fl d
                    261: .Op Fl x Ar hex-aut0
                    262: .Xc
1.5       jakob     263: .Bl -tag -width Ds
                    264: .It Fl d
                    265: use manufacturer's default AUT0 key
                    266: .El
1.2       jakob     267: .El
1.5       jakob     268: .\"
1.2       jakob     269: .Sh AUTHORS
1.1       rees      270: .Nm
1.7       rees      271: was written by Jim Rees and others at University of Michigan
                    272: Center for Information Technology Integration (CITI).
1.5       jakob     273: .\"
1.2       jakob     274: .Sh HISTORY
1.1       rees      275: .Nm
1.2       jakob     276: first appeared in
                    277: .Ox 3.0 .