[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.5

1.5     ! jakob       1: .\"    $OpenBSD: sectok.1,v 1.4 2001/07/26 20:00:16 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.
                     49: .Sh OPTIONS
                     50: .Bl -tag -width Ds
                     51: .It Fl 0123
                     52: Select port.
                     53: .Pp
                     54: .It Fl f Ar scriptfile
                     55: Run commands from scriptfile.
                     56: .Pp
                     57: .It Fl s Ar sleeptime
1.4       rees       58: Set sleep (in milliseconds) between commands in the script.
1.3       jakob      59: .El
1.5     ! jakob      60: .\"
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
                    128: can be a numeric fid such as 3f00, a two character name, or an aid in hex or ascii.
1.2       jakob     129: .It Xo
                    130: .Cm isearch
                    131: .Xc
                    132: Try all 256 possible instructions and print results.
                    133: .It Xo
                    134: .Cm class
                    135: .Op Ar class
                    136: .Xc
1.5     ! jakob     137: Inquire or set default application
        !           138: .Ar class .
1.2       jakob     139: .It Xo
                    140: .Cm read
                    141: .Op Fl x
                    142: .Ar filesize
                    143: .Xc
1.4       rees      144: Read selected fid and write to stdout.
1.2       jakob     145: .It Xo
                    146: .Cm write
                    147: .Ar input-filename
                    148: .Xc
1.5     ! jakob     149: Read from
        !           150: .Ar input-filename
        !           151: and write to selected fid.
1.2       jakob     152: .El
                    153: .Ss Cyberflex commands
                    154: .Pp
                    155: .Bl -tag -width Ds
                    156: .It Xo
                    157: .Cm ls
                    158: .Op Fl l
                    159: .Xc
                    160: List all files in current DF.
                    161: .It Xo
                    162: .Cm acl
                    163: .Ar fid
                    164: .Op Ar principal: "r1 r2 ..."
                    165: .Xc
                    166: .Bl -tag -width Ds
                    167: .It principals
                    168: world, CHV1, CHV2, AUT0, AUT1, AUT2, AUT3, AUT4
                    169: .It f_rights
                    170: r, w, x/a, inval, rehab, dec, inc
                    171: .It d_rights
                    172: l, d, a, i, manage
                    173: .El
                    174: .It Xo
                    175: .Cm create
                    176: .Ar fid
                    177: .Ar size
                    178: .Xc
                    179: .It Xo
                    180: .Cm delete
                    181: .Ar fid
                    182: .Xc
                    183: .It Xo
                    184: .Cm jdefault
                    185: .Op Fl d
                    186: .Xc
                    187: Set default applet.
                    188: .Bl -tag -width Ds
                    189: .It Fl d
                    190: set default applet to default loader
                    191: .El
                    192: .It Xo
                    193: .Cm jatr
                    194: .Xc
                    195: Set java atr.
                    196: .It Xo
                    197: .Cm jdata
                    198: .Xc
                    199: Print useful info about the card
                    200: .It Xo
                    201: .Cm login
                    202: .Op Fl d
                    203: .Op Fl k Ar keyno
                    204: .Op Fl v
                    205: .Op Fl x Ar hex-aut0
                    206: .Xc
1.4       rees      207: "login" (verify AUT0 key)
                    208: .Bl -tag -width Ds
                    209: .It Fl d
                    210: use manufacturer's default AUT0 key
                    211: .El
1.2       jakob     212: .It Xo
                    213: .Cm jload
                    214: .Op Fl p Ar progID
                    215: .Op Fl c Ar contID
                    216: .Op Fl s Ar cont_size
                    217: .Op Fl i Ar inst_size
                    218: .Op Fl v
1.4       rees      219: .Op Fl a Ar aid
                    220: .Ar filename
1.2       jakob     221: .Xc
1.4       rees      222: Load an applet to the card.
1.5     ! jakob     223: If the first byte of the
        !           224: .Ar aid
        !           225: is '#' it will be converted to 0xfc.
1.2       jakob     226: .It Xo
                    227: .Cm junload
                    228: .Op Fl p Ar progID
                    229: .Op Fl c Ar contID
                    230: .Xc
                    231: .It Xo
                    232: .Cm jselect
                    233: .Op Fl a Ar aid
                    234: .Op Fl d
                    235: .Xc
                    236: Select applet.
                    237: .Bl -tag -width Ds
                    238: .It Fl d
                    239: select default loader
                    240: .El
                    241: .It Xo
                    242: .Cm setpass
                    243: .Op Fl d
                    244: .Op Fl x Ar hex-aut0
                    245: .Xc
1.5     ! jakob     246: .Bl -tag -width Ds
        !           247: .It Fl d
        !           248: use manufacturer's default AUT0 key
        !           249: .El
1.2       jakob     250: .El
1.5     ! jakob     251: .\"
1.2       jakob     252: .Sh AUTHORS
1.1       rees      253: .Nm
1.2       jakob     254: was written by Jim Rees and others at University of Michigan.
1.5     ! jakob     255: .\"
1.2       jakob     256: .Sh HISTORY
1.1       rees      257: .Nm
1.2       jakob     258: first appeared in
                    259: .Ox 3.0 .
                    260: .Sh BUGS
                    261: Probably several.