1fbc400a6SNik Clayton.\" 21b51e5d0SRuslan Ermilov.Dd October 6, 1987 31b51e5d0SRuslan Ermilov.Dt PUBLICKEY 3 41b51e5d0SRuslan Ermilov.Os 51b51e5d0SRuslan Ermilov.Sh NAME 61b51e5d0SRuslan Ermilov.Nm publickey , getpublickey , getsecretkey 71b51e5d0SRuslan Ermilov.Nd "get public or secret key" 81b51e5d0SRuslan Ermilov.Sh LIBRARY 91b51e5d0SRuslan Ermilov.Lb librpcsvc 101b51e5d0SRuslan Ermilov.Sh SYNOPSIS 1132eef9aeSRuslan Ermilov.In rpc/rpc.h 1232eef9aeSRuslan Ermilov.In rpc/key_prot.h 131b51e5d0SRuslan Ermilov.Ft int 141b51e5d0SRuslan Ermilov.Fo getpublickey 1579be508cSRuslan Ermilov.Fa "const char netname[MAXNETNAMELEN+1]" 161b51e5d0SRuslan Ermilov.Fa "char publickey[HEXKEYBYTES+1]" 171b51e5d0SRuslan Ermilov.Fc 181b51e5d0SRuslan Ermilov.Ft int 191b51e5d0SRuslan Ermilov.Fo getsecretkey 201b51e5d0SRuslan Ermilov.Fa "char netname[MAXNETNAMELEN+1]" 211b51e5d0SRuslan Ermilov.Fa "char secretkey[HEXKEYBYTES+1]" 221b51e5d0SRuslan Ermilov.Fa "char *passwd" 231b51e5d0SRuslan Ermilov.Fc 241b51e5d0SRuslan Ermilov.Sh DESCRIPTION 25e8636dfdSBill PaulThese routines are used to get public and secret keys from the 261b51e5d0SRuslan Ermilov.Tn YP 27e8636dfdSBill Pauldatabase. 281fae73b1SRuslan ErmilovThe 291b51e5d0SRuslan Ermilov.Fn getsecretkey 301fae73b1SRuslan Ermilovfunction 31e8636dfdSBill Paulhas an extra argument, 321b51e5d0SRuslan Ermilov.Fa passwd , 33e8636dfdSBill Paulwhich is used to decrypt the encrypted secret key stored in the database. 34e8636dfdSBill PaulBoth routines return 1 if they are successful in finding the key, 0 otherwise. 35e8636dfdSBill PaulThe keys are returned as 36*a3fb6da9SGlen Barber.Dv NUL Ns \-terminated , 37c6ff3a1bSSheldon Hearnhexadecimal strings. 38c6ff3a1bSSheldon HearnIf the password supplied to 391b51e5d0SRuslan Ermilov.Fn getsecretkey 40e8636dfdSBill Paulfails to decrypt the secret key, the routine will return 1 but the 411b51e5d0SRuslan Ermilov.Fa secretkey 42e8636dfdSBill Paulargument will be a 43*a3fb6da9SGlen Barber.Dv NUL 441b51e5d0SRuslan Ermilovstring 4520a95cd6SUlrich Spörlein.Pq Dq . 461b51e5d0SRuslan Ermilov.Sh SEE ALSO 471b51e5d0SRuslan Ermilov.Xr publickey 5 481b51e5d0SRuslan Ermilov.Pp 491b51e5d0SRuslan Ermilov.%T "RPC Programmer's Manual" 50e8636dfdSBill Paulin 511b51e5d0SRuslan Ermilov.Pa /usr/share/doc/psd/23.rpc . 52