| 1 |
.\" @(#)publickey.3r 2.1 88/08/07 4.0 RPCSRC |
| 2 |
.\" |
| 3 |
.Dd October 6, 1987 |
| 4 |
.Dt PUBLICKEY 3 |
| 5 |
.Os |
| 6 |
.Sh NAME |
| 7 |
.Nm publickey , getpublickey , getsecretkey |
| 8 |
.Nd "get public or secret key" |
| 9 |
.Sh LIBRARY |
| 10 |
.Lb librpcsvc |
| 11 |
.Sh SYNOPSIS |
| 12 |
.In rpc/rpc.h |
| 13 |
.In rpc/key_prot.h |
| 14 |
.Ft int |
| 15 |
.Fo getpublickey |
| 16 |
.Fa "char netname[MAXNETNAMELEN+1]" |
| 17 |
.Fa "char publickey[HEXKEYBYTES+1]" |
| 18 |
.Fc |
| 19 |
.Ft int |
| 20 |
.Fo getsecretkey |
| 21 |
.Fa "char netname[MAXNETNAMELEN+1]" |
| 22 |
.Fa "char secretkey[HEXKEYBYTES+1]" |
| 23 |
.Fa "char *passwd" |
| 24 |
.Fc |
| 25 |
.Sh DESCRIPTION |
| 26 |
These routines are used to get public and secret keys from the |
| 27 |
.Tn YP |
| 28 |
database. |
| 29 |
The |
| 30 |
.Fn getsecretkey |
| 31 |
function |
| 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 . |