ReactOS  0.4.14-dev-115-g4576127
key_prot_xdr.c File Reference
#include <rpc/key_prot.h>
Include dependency graph for key_prot_xdr.c:

Go to the source code of this file.

Functions

bool_t xdr_keystatus (register XDR *xdrs, keystatus *objp)
 
bool_t xdr_keybuf (register XDR *xdrs, keybuf objp)
 
bool_t xdr_netnamestr (register XDR *xdrs, netnamestr *objp)
 
bool_t xdr_cryptkeyarg (register XDR *xdrs, cryptkeyarg *objp)
 
bool_t xdr_cryptkeyarg2 (register XDR *xdrs, cryptkeyarg2 *objp)
 
bool_t xdr_cryptkeyres (register XDR *xdrs, cryptkeyres *objp)
 
bool_t xdr_unixcred (register XDR *xdrs, unixcred *objp)
 
bool_t xdr_getcredres (register XDR *xdrs, getcredres *objp)
 
bool_t xdr_key_netstarg (register XDR *xdrs, key_netstarg *objp)
 
bool_t xdr_key_netstres (register XDR *xdrs, key_netstres *objp)
 

Function Documentation

◆ xdr_cryptkeyarg()

bool_t xdr_cryptkeyarg ( register XDR xdrs,
cryptkeyarg *  objp 
)

Definition at line 73 of file key_prot_xdr.c.

74 {
75 
76  if (!xdr_netnamestr(xdrs, &objp->remotename))
77  return (FALSE);
78  if (!xdr_des_block(xdrs, &objp->deskey))
79  return (FALSE);
80  return (TRUE);
81 }
#define TRUE
Definition: types.h:120
bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
Definition: rpc_prot.c:100
bool_t xdr_netnamestr(register XDR *xdrs, netnamestr *objp)
Definition: key_prot_xdr.c:64

Referenced by key_decryptsession(), and key_encryptsession().

◆ xdr_cryptkeyarg2()

bool_t xdr_cryptkeyarg2 ( register XDR xdrs,
cryptkeyarg2 *  objp 
)

Definition at line 84 of file key_prot_xdr.c.

85 {
86 
87  if (!xdr_netnamestr(xdrs, &objp->remotename))
88  return (FALSE);
89  if (!xdr_netobj(xdrs, &objp->remotekey))
90  return (FALSE);
91  if (!xdr_des_block(xdrs, &objp->deskey))
92  return (FALSE);
93  return (TRUE);
94 }
#define TRUE
Definition: types.h:120
bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
Definition: rpc_prot.c:100
bool_t xdr_netobj(XDR *xdrs, struct netobj *np)
Definition: xdr.c:609
bool_t xdr_netnamestr(register XDR *xdrs, netnamestr *objp)
Definition: key_prot_xdr.c:64

Referenced by key_decryptsession_pk(), and key_encryptsession_pk().

◆ xdr_cryptkeyres()

bool_t xdr_cryptkeyres ( register XDR xdrs,
cryptkeyres *  objp 
)

Definition at line 97 of file key_prot_xdr.c.

98 {
99 
100  if (!xdr_keystatus(xdrs, &objp->status))
101  return (FALSE);
102  switch (objp->status) {
103  case KEY_SUCCESS:
104  if (!xdr_des_block(xdrs, &objp->cryptkeyres_u.deskey))
105  return (FALSE);
106  break;
107  default:
108  break;
109  }
110  return (TRUE);
111 }
#define TRUE
Definition: types.h:120
bool_t xdr_des_block(XDR *xdrs, des_block *blkp)
Definition: rpc_prot.c:100
bool_t xdr_keystatus(register XDR *xdrs, keystatus *objp)
Definition: key_prot_xdr.c:46

Referenced by key_decryptsession(), key_decryptsession_pk(), key_encryptsession(), key_encryptsession_pk(), and key_get_conv().

◆ xdr_getcredres()

bool_t xdr_getcredres ( register XDR xdrs,
getcredres *  objp 
)

Definition at line 128 of file key_prot_xdr.c.

129 {
130 
131  if (!xdr_keystatus(xdrs, &objp->status))
132  return (FALSE);
133  switch (objp->status) {
134  case KEY_SUCCESS:
135  if (!xdr_unixcred(xdrs, &objp->getcredres_u.cred))
136  return (FALSE);
137  break;
138  default:
139  break;
140  }
141  return (TRUE);
142 }
#define TRUE
Definition: types.h:120
bool_t xdr_unixcred(register XDR *xdrs, unixcred *objp)
Definition: key_prot_xdr.c:114
bool_t xdr_keystatus(register XDR *xdrs, keystatus *objp)
Definition: key_prot_xdr.c:46

◆ xdr_key_netstarg()

bool_t xdr_key_netstarg ( register XDR xdrs,
key_netstarg *  objp 
)

Definition at line 145 of file key_prot_xdr.c.

146 {
147 
148  if (!xdr_keybuf(xdrs, objp->st_priv_key))
149  return (FALSE);
150  if (!xdr_keybuf(xdrs, objp->st_pub_key))
151  return (FALSE);
152  if (!xdr_netnamestr(xdrs, &objp->st_netname))
153  return (FALSE);
154  return (TRUE);
155 }
#define TRUE
Definition: types.h:120
bool_t xdr_netnamestr(register XDR *xdrs, netnamestr *objp)
Definition: key_prot_xdr.c:64
bool_t xdr_keybuf(register XDR *xdrs, keybuf objp)
Definition: key_prot_xdr.c:55

Referenced by key_setnet(), and xdr_key_netstres().

◆ xdr_key_netstres()

bool_t xdr_key_netstres ( register XDR xdrs,
key_netstres *  objp 
)

Definition at line 158 of file key_prot_xdr.c.

159 {
160 
161  if (!xdr_keystatus(xdrs, &objp->status))
162  return (FALSE);
163  switch (objp->status) {
164  case KEY_SUCCESS:
165  if (!xdr_key_netstarg(xdrs, &objp->key_netstres_u.knet))
166  return (FALSE);
167  break;
168  default:
169  break;
170  }
171  return (TRUE);
172 }
#define TRUE
Definition: types.h:120
bool_t xdr_key_netstarg(register XDR *xdrs, key_netstarg *objp)
Definition: key_prot_xdr.c:145
bool_t xdr_keystatus(register XDR *xdrs, keystatus *objp)
Definition: key_prot_xdr.c:46

Referenced by key_secretkey_is_set().

◆ xdr_keybuf()

bool_t xdr_keybuf ( register XDR xdrs,
keybuf  objp 
)

Definition at line 55 of file key_prot_xdr.c.

56 {
57 
58  if (!xdr_opaque(xdrs, objp, HEXKEYBYTES))
59  return (FALSE);
60  return (TRUE);
61 }
#define TRUE
Definition: types.h:120
bool_t xdr_opaque(XDR *xdrs, caddr_t cp, u_int cnt)
Definition: xdr.c:484

Referenced by key_get_conv(), key_setsecret(), and xdr_key_netstarg().

◆ xdr_keystatus()

bool_t xdr_keystatus ( register XDR xdrs,
keystatus *  objp 
)

Definition at line 46 of file key_prot_xdr.c.

47 {
48 
49  if (!xdr_enum(xdrs, (enum_t *)objp))
50  return (FALSE);
51  return (TRUE);
52 }
#define TRUE
Definition: types.h:120
bool_t xdr_enum(XDR *xdrs, enum_t *ep)
Definition: xdr.c:458
int32_t enum_t
Definition: types.h:102

Referenced by key_setnet(), key_setsecret(), xdr_cryptkeyres(), xdr_getcredres(), and xdr_key_netstres().

◆ xdr_netnamestr()

bool_t xdr_netnamestr ( register XDR xdrs,
netnamestr *  objp 
)

Definition at line 64 of file key_prot_xdr.c.

65 {
66 
67  if (!xdr_string(xdrs, objp, MAXNETNAMELEN))
68  return (FALSE);
69  return (TRUE);
70 }
#define TRUE
Definition: types.h:120
bool_t xdr_string(XDR *xdrs, char **cpp, u_int maxsize)
Definition: xdr.c:678
#define MAXNETNAMELEN
Definition: auth.h:78

Referenced by xdr_cryptkeyarg(), xdr_cryptkeyarg2(), and xdr_key_netstarg().

◆ xdr_unixcred()

bool_t xdr_unixcred ( register XDR xdrs,
unixcred *  objp 
)

Definition at line 114 of file key_prot_xdr.c.

115 {
116 
117  if (!xdr_u_int(xdrs, &objp->uid))
118  return (FALSE);
119  if (!xdr_u_int(xdrs, &objp->gid))
120  return (FALSE);
121  if (!xdr_array(xdrs, (char **)&objp->gids.gids_val, (u_int *) &objp->gids.gids_len, MAXGIDS,
123  return (FALSE);
124  return (TRUE);
125 }
bool_t xdr_array(XDR *xdrs, caddr_t *addrp, u_int *sizep, u_int maxsize, u_int elsize, xdrproc_t elproc)
Definition: xdr_array.c:61
#define TRUE
Definition: types.h:120
ActualNumberDriverObjects * sizeof(PDRIVER_OBJECT)) PDRIVER_OBJECT *DriverObjectList
bool_t(* xdrproc_t)(XDR *,...)
Definition: xdr.h:144
bool_t xdr_u_int(XDR *xdrs, u_int *up)
Definition: xdr.c:133
UINT32 u_int
Definition: types.h:82

Referenced by xdr_getcredres().