#ifndef __KEYSERV_H__
#define __KEYSERV_H__

#include <rpc/key_prot.h>

extern des_block masterkey;

extern int openstore __P ((void));
extern void readkeys __P ((void));
extern void setmodulus __P ((const char *));
extern void pk_nodefaultkeys __P ((void));
extern keystatus pk_setkey __P ((uid_t, keybuf));
extern keystatus pk_decrypt __P ((uid_t, char *, netobj *, des_block *));
extern keystatus pk_encrypt __P ((uid_t, char *, netobj *, des_block *));
extern keystatus pk_netput __P ((uid_t, key_netstarg *));
extern keystatus pk_netget __P ((uid_t, key_netstarg *));
extern bool_t key_set_svc __P ((opaque *, keystatus *, uid_t));
extern bool_t key_encrypt_svc __P ((cryptkeyarg *, cryptkeyres *, uid_t));
extern bool_t key_decrypt_svc __P ((cryptkeyarg *, cryptkeyres *, uid_t));
extern bool_t key_gen_svc __P ((void *, des_block *, uid_t));
extern bool_t key_getcred_svc __P ((netnamestr *, getcredres *, uid_t));
extern bool_t key_encrypt_pk_svc __P ((cryptkeyarg2 *, cryptkeyres *, uid_t));
extern bool_t key_decrypt_pk_svc __P ((cryptkeyarg2 *, cryptkeyres *, uid_t));
extern bool_t key_net_put_svc __P ((key_netstarg *, keystatus *, uid_t));
extern bool_t key_net_get_svc __P ((void *, key_netstres *, uid_t));
extern bool_t key_get_conv_svc __P ((opaque *, cryptkeyres *, uid_t));

#endif
