xref: /freebsd/lib/libc/rpc/publickey.3 (revision fcb560670601b2a4d87bb31d7531c8dcc37ee71b)
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
27These routines are used to get public and secret keys from the
28.Tn YP
29database.
30The
31.Fn getsecretkey
32function
33has an extra argument,
34.Fa passwd ,
35which is used to decrypt the encrypted secret key stored in the database.
36Both routines return 1 if they are successful in finding the key, 0 otherwise.
37The keys are returned as
38.Dv NUL Ns \-terminated ,
39hexadecimal strings.
40If the password supplied to
41.Fn getsecretkey
42fails to decrypt the secret key, the routine will return 1 but the
43.Fa secretkey
44argument will be a
45.Dv NUL
46string
47.Pq Dq .
48.Sh SEE ALSO
49.Xr publickey 5
50.Pp
51.%T "RPC Programmer's Manual"
52in
53.Pa /usr/share/doc/psd/23.rpc .
54