summaryrefslogtreecommitdiff
path: root/lib/libsectok
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2001-08-03 19:23:39 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2001-08-03 19:23:39 +0000
commit7ef28876cec4ea7fde66df6282ff350a0a8e0d55 (patch)
treee24ba4db1a3518d8cffeca39c93ae30138a5ffb6 /lib/libsectok
parent8b4d0d07c34c057317be9ac3431c01ec9480f41d (diff)
o Fix sectok_apdu() proto
o s/sectok_scopen/sectok_open/ o Change the block of sectok_apdu options to a tagged list ress@ OK
Diffstat (limited to 'lib/libsectok')
-rw-r--r--lib/libsectok/sectok.357
1 files changed, 33 insertions, 24 deletions
diff --git a/lib/libsectok/sectok.3 b/lib/libsectok/sectok.3
index f12279542b7..a6e22c2c592 100644
--- a/lib/libsectok/sectok.3
+++ b/lib/libsectok/sectok.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: sectok.3,v 1.1 2001/08/03 18:29:14 rees Exp $
+.\" $OpenBSD: sectok.3,v 1.2 2001/08/03 19:23:38 millert Exp $
.\"
.\" Jim Rees <rees@umich.edu>
.\" CITI Smartcard development <smartcards@umich.edu>
@@ -21,16 +21,16 @@
.Fn sectok_reset "int fd" "int flags" "unsigned char *atr" "int *swp"
.Ft int
.Fo sectok_apdu
-.Fa int fd
-.Fa int cla
-.Fa int ins
-.Fa int p1
-.Fa int p2
-.Fa int ilen
-.Fa unsigned char *ibuf
-.Fa int olen
-.Fa unsigned char *obuf
-.Fa int *swp
+.Fa "int fd"
+.Fa "int cla"
+.Fa "int ins"
+.Fa "int p1"
+.Fa "int p2"
+.Fa "int ilen"
+.Fa "unsigned char *ibuf"
+.Fa "int olen"
+.Fa "unsigned char *obuf"
+.Fa "int *swp"
.Fc
.Ft int
.Fn sectok_cardpresent "int fd"
@@ -61,20 +61,20 @@
.Ft int
.Fn sectok_swOK "int sw"
.Sh DESCRIPTION
-.Nm
+.Nm sectok
provides initialization, input, output, and other basic routines for ISO
7816 smart cards.
Many of the routines return a status word.
This will either be an error code as given in the include file,
or a SW1/SW2 pair as specified in ISO 7816.
.Pp
-.Fn sectok_scopen
+.Fn sectok_open
opens a connection to a smart card via serial port number
.Fa ttyn .
Ports are
numbered from 0, which corresponds to /dev/tty00 on UNIX.
If there is no card in the reader,
-.Fn sectok_scopen
+.Fn sectok_open
will either wait for card insertion, or if flag
.Dv STONOWAIT
is given, it will return immediately with error
@@ -94,16 +94,25 @@ using default protocol parameters even if the card ATR is illegal.
.Pp
.Fn sectok_apdu
sends an APDU to the card with optional IN and OUT data.
-.Bd -literal -offset xx
-cla - application class
-ins - instruction code
-p1, p2 - per ISO 7816-3 or application dependent
-ilen - length of IN data
-ibuf - pointer to IN data
-olen - length of OUT data
-obuf - pointer to OUT data
-swp - pointer to return status word
-.Ed
+.Pp
+.Bl -tag -literal -width Ds
+.It Fa cla
+application class
+.It Fa ins
+instruction code
+.It Fa p1 , Fa p2
+per ISO 7816-3 or application dependent
+.It Fa ilen
+length of IN data
+.It Fa ibuf
+pointer to IN data
+.It Fa olen
+length of OUT data
+.It Fa obuf
+pointer to OUT data
+.It Fa swp
+pointer to return status word
+.El
.Pp
.Fn sectok_cardpresent
returns whether a card is present in the reader.