]> CyberLeo.Net >> Repos - FreeBSD/releng/10.0.git/blob - lib/libc/rpc/publickey.3
- Copy stable/10 (r259064) to releng/10.0 as part of the
[FreeBSD/releng/10.0.git] / lib / libc / rpc / publickey.3
1 .\" @(#)publickey.3r    2.1 88/08/07 4.0 RPCSRC
2 .\" $FreeBSD$
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 "const 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 The
31 .Fn getsecretkey
32 function
33 has an extra argument,
34 .Fa passwd ,
35 which is used to decrypt the encrypted secret key stored in the database.
36 Both routines return 1 if they are successful in finding the key, 0 otherwise.
37 The keys are returned as
38 .Dv NUL Ns \-terminated ,
39 hexadecimal strings.
40 If the password supplied to
41 .Fn getsecretkey
42 fails to decrypt the secret key, the routine will return 1 but the
43 .Fa secretkey
44 argument will be a
45 .Dv NUL
46 string
47 .Pq Dq .
48 .Sh SEE ALSO
49 .Xr publickey 5
50 .Pp
51 .%T "RPC Programmer's Manual"
52 in
53 .Pa /usr/share/doc/psd/23.rpc .