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