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/libc/rpc/publickey.3,v 1.3 2005/08/05 22:35:10 swildner Exp $ 4.\" 5.Dd November 14, 2009 6.Dt PUBLICKEY 3 7.Os 8.Sh NAME 9.Nm publickey , 10.Nm getpublickey , 11.Nm getsecretkey 12.Nd "get public or secret key" 13.Sh LIBRARY 14.Lb librpcsvc 15.Sh SYNOPSIS 16.In rpc/rpc.h 17.In rpc/key_prot.h 18.Ft int 19.Fo getpublickey 20.Fa "char netname[MAXNETNAMELEN+1]" 21.Fa "char publickey[HEXKEYBYTES+1]" 22.Fc 23.Ft int 24.Fo getsecretkey 25.Fa "char netname[MAXNETNAMELEN+1]" 26.Fa "char secretkey[HEXKEYBYTES+1]" 27.Fa "char *passwd" 28.Fc 29.Sh DESCRIPTION 30These routines are used to get public and secret keys from the 31.Tn YP 32database. 33.Fn getsecretkey 34has an extra argument, 35.Fa passwd , 36which is used to decrypt the encrypted secret key stored in the database. 37Both routines return 1 if they are successful in finding the key, 0 otherwise. 38The keys are returned as 39.Dv NULL Ns \-terminated , 40hexadecimal strings. 41If the password supplied to 42.Fn getsecretkey 43fails to decrypt the secret key, the routine will return 1 but the 44.Fa secretkey 45argument will be a 46.Dv NULL 47string 48.Pq Dq . 49.Sh SEE ALSO 50.Xr publickey 5 51.Rs 52.%B "4.4BSD Programmer's Supplementary Documents (PSD)" 53.%T "Remote Procedure Call Programming Guide" 54.Re 55.\" in 56.\" .Pa /usr/share/doc/psd/23.rpc . 57