grrr...fix reverse chronological order
[dragonfly.git] / lib / libcr / rpc / publickey.3
1 .\" @(#)publickey.3r    2.1 88/08/07 4.0 RPCSRC
2 .\" $FreeBSD: src/lib/libc/rpc/publickey.3,v 1.4.2.2 2001/12/14 18:33:56 ru Exp $
3 .\" $DragonFly: src/lib/libcr/rpc/Attic/publickey.3,v 1.2 2003/06/17 04:26:45 dillon Exp $
4 .\"
5 .Dd October 6, 1987
6 .Dt PUBLICKEY 3
7 .Os
8 .Sh NAME
9 .Nm publickey , getpublickey , getsecretkey
10 .Nd "get public or secret key"
11 .Sh LIBRARY
12 .Lb librpcsvc
13 .Sh SYNOPSIS
14 .In rpc/rpc.h
15 .In rpc/key_prot.h
16 .Ft int
17 .Fo getpublickey
18 .Fa "char netname[MAXNETNAMELEN+1]"
19 .Fa "char publickey[HEXKEYBYTES+1]"
20 .Fc
21 .Ft int
22 .Fo getsecretkey
23 .Fa "char netname[MAXNETNAMELEN+1]"
24 .Fa "char secretkey[HEXKEYBYTES+1]"
25 .Fa "char *passwd"
26 .Fc
27 .Sh DESCRIPTION
28 These routines are used to get public and secret keys from the
29 .Tn YP
30 database.
31 .Fn getsecretkey
32 has an extra argument,
33 .Fa passwd ,
34 which is used to decrypt the encrypted secret key stored in the database.
35 Both routines return 1 if they are successful in finding the key, 0 otherwise.
36 The keys are returned as
37 .Dv NULL Ns \-terminated ,
38 hexadecimal strings.
39 If the password supplied to
40 .Fn getsecretkey
41 fails to decrypt the secret key, the routine will return 1 but the
42 .Fa secretkey
43 argument will be a
44 .Dv NULL
45 string
46 .Pq Dq .
47 .Sh SEE ALSO
48 .Xr publickey 5
49 .Pp
50 .%T "RPC Programmer's Manual"
51 in
52 .Pa /usr/share/doc/psd/23.rpc .