DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 

publickey(3N)


publickey: getpublickey, getsecretkey -- retrieve public or secret key

Synopsis

cc [options] file -lnsl
#include <rpc/rpc.h>
#include <rpc/key_prot.h>

int getpublickey(const char netname[MAXNETNAMELEN], char publickey[HEXKEYBYTES]);

int getsecretkey(const char netname[MAXNETNAMELEN], char secretkey[HEXKEYBYTES], const char *passwd);

Description

getpublickey and getsecretkey get public and secret keys for netname from the publickey(4bnu) database.

getsecretkey has an extra argument, passwd, that is used to decrypt the encrypted secret key stored in the database.

Both routines return 1 if they are successful in finding the key, 0 otherwise. The keys are returned as NULL-terminated, hexadecimal strings. If the password supplied to getsecretkey fails to decrypt the secret key, the routine will return 1 but the secretkey argument will be a NULL string.

References

publickey(4bnu)
© 2004 The SCO Group, Inc. All rights reserved.
UnixWare 7 Release 7.1.4 - 25 April 2004