55 #include <rpc/key_prot.h> 58 #include <sys/utsname.h> 69 #define debug(msg) (void) fprintf(stderr, "%s\n", msg); 83 cryptkeyres *(*__key_encryptsession_pk_LOCAL)() = 0;
84 cryptkeyres *(*__key_decryptsession_pk_LOCAL)() = 0;
91 const char *secretkey;
100 if (
status != KEY_SUCCESS) {
101 debug(
"set status is nonzero");
118 struct key_netstres kres;
120 memset((
void*)&kres, 0,
sizeof (kres));
123 (kres.status == KEY_SUCCESS) &&
124 (kres.key_netstres_u.knet.st_priv_key[0] != 0)) {
126 memset(kres.key_netstres_u.knet.st_priv_key, 0, HEXKEYBYTES);
141 arg.remotename = remotename;
142 arg.remotekey = *remotekey;
148 if (
res.status != KEY_SUCCESS) {
149 debug(
"encrypt status is nonzero");
165 arg.remotename = remotename;
166 arg.remotekey = *remotekey;
172 if (
res.status != KEY_SUCCESS) {
173 debug(
"decrypt status is nonzero");
182 const char *remotename;
188 arg.remotename = (
char *) remotename;
194 if (
res.status != KEY_SUCCESS) {
195 debug(
"encrypt status is nonzero");
204 const char *remotename;
210 arg.remotename = (
char *) remotename;
216 if (
res.status != KEY_SUCCESS) {
217 debug(
"decrypt status is nonzero");
237 struct key_netstarg *
arg;
247 if (
status != KEY_SUCCESS) {
248 debug(
"key_setnet status is nonzero");
266 if (
res.status != KEY_SUCCESS) {
267 debug(
"get_conv status is nonzero");
310 #define TOTAL_TIMEOUT 30 311 #define TOTAL_TRIES 5 313 if (key_call_key == -1) {
315 if (key_call_key == -1)
356 #if defined(__FreeBSD__) 364 #error Unknown architecture! 379 KEY_PROG, vers, nconf);
390 KEY_PROG, vers, tpconf);
410 fcntl(
fd, F_SETFD, 1);
431 *(cryptkeyres*)rslt = *
res;
436 *(cryptkeyres*)rslt = *
res;
445 if ((
proc == KEY_ENCRYPT_PK) || (
proc == KEY_DECRYPT_PK) ||
446 (
proc == KEY_NET_GET) || (
proc == KEY_NET_PUT) ||
447 (
proc == KEY_GET_CONV))
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
struct png_info_def **typedef void(__cdecl typeof(png_destroy_read_struct))(struct png_struct_def **
bool_t xdr_key_netstarg(register XDR *xdrs, key_netstarg *objp)
static void deskey(const unsigned char *key, short edf, ulong32 *keyout)
cryptkeyres *(* __key_decryptsession_pk_LOCAL)()=0
#define CLSET_RETRY_TIMEOUT
#define thr_keycreate(k, d)
static void key_call_destroy(void *vp)
#define thr_setspecific(k, p)
int key_get_conv(char *pkey, des_block *deskey)
static CLIENT * getkeyserv_handle(int vers)
int key_gendes(des_block *key)
des_block *(* __key_gendes_LOCAL)()=0
int key_encryptsession(char *remotename, des_block *deskey) const
static int key_call(u_long, xdrproc_t, void *, xdrproc_t, void *)
int key_setnet(struct key_netstarg *arg)
struct netconfig * getnetconfig(void *handlep)
bool_t(* xdrproc_t)(XDR *,...)
int key_encryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
int key_decryptsession(char *remotename, des_block *deskey) const
_CRTIMP int __cdecl getpid(void)
int key_setsecret(char *secretkey) const
cryptkeyres *(* __key_encryptsession_pk_LOCAL)()=0
#define thr_getspecific(k)
bool_t xdr_cryptkeyarg2(register XDR *xdrs, cryptkeyarg2 *objp)
bool_t xdr_keystatus(register XDR *xdrs, keystatus *objp)
int endnetconfig(void *handlep)
#define clnt_control(cl, rq, in)
int key_secretkey_is_set(void)
#define clnt_call(rh, proc, xargs, argsp, xres, resp, secs)
bool_t xdr_cryptkeyres(register XDR *xdrs, cryptkeyres *objp)
#define authsys_create(c, i1, i2, i3, ip)
int strcmp(const char *String1, const char *String2)
CLIENT * clnt_tp_create(const char *hostname, const rpcprog_t prog, const rpcvers_t vers, const struct netconfig *nconf)
bool_t xdr_cryptkeyarg(register XDR *xdrs, cryptkeyarg *objp)
unsigned long nc_semantics
int key_decryptsession_pk(char *remotename, netobj *remotekey, des_block *deskey)
static struct key_call_private * key_call_private_main
static SERVICE_STATUS status
#define auth_destroy(auth)
bool_t xdr_key_netstres(register XDR *xdrs, key_netstres *objp)
bool_t xdr_keybuf(register XDR *xdrs, keybuf objp)