133 |
char type_check[2]; |
char type_check[2]; |
134 |
Shishi_tkt *tkt; |
Shishi_tkt *tkt; |
135 |
Shishi_tkts_hint hint; |
Shishi_tkts_hint hint; |
136 |
|
Shishi_key *subkey; |
137 |
int rc; |
int rc; |
138 |
char *tmp; |
char *tmp; |
139 |
char *apreq; |
char *apreq; |
171 |
|
|
172 |
if (tkt) |
if (tkt) |
173 |
{ |
{ |
174 |
rc = shishi_ap_tktoptionsdata (shishi_handle, &auth_handle, tkt, |
rc = shishi_ap_nosubkey (shishi_handle, &auth_handle); |
175 |
ap_opts, (char *) &type_check, 2); |
if (rc != SHISHI_OK) |
176 |
|
{ |
177 |
|
DEBUG (("telnet: Kerberos V5: Could not make AP-REQ (%s)\r\n", |
178 |
|
shishi_strerror (rc))); |
179 |
|
return 0; |
180 |
|
} |
181 |
|
|
182 |
|
rc = shishi_key_random (shishi_handle, SHISHI_DES_CBC_MD5, &subkey); |
183 |
|
if (rc != SHISHI_OK) |
184 |
|
return rc; |
185 |
|
|
186 |
|
rc = shishi_authenticator_set_subkey (shishi_handle, shishi_ap_authenticator (auth_handle), |
187 |
|
shishi_key_type (subkey), |
188 |
|
shishi_key_value (subkey), |
189 |
|
shishi_key_length (subkey)); |
190 |
|
if (rc != SHISHI_OK) |
191 |
|
{ |
192 |
|
DEBUG (("telnet: Kerberos V5: Could not make AP-REQ (%s)\r\n", |
193 |
|
shishi_strerror (rc))); |
194 |
|
return 0; |
195 |
|
} |
196 |
|
|
197 |
|
shishi_key_done (subkey); |
198 |
|
|
199 |
|
rc = shishi_ap_set_tktoptionsdata (auth_handle, tkt, ap_opts, (char *) &type_check, 2); |
200 |
if (rc != SHISHI_OK) |
if (rc != SHISHI_OK) |
201 |
{ |
{ |
202 |
DEBUG (("telnet: Kerberos V5: Could not make AP-REQ (%s)\r\n", |
DEBUG (("telnet: Kerberos V5: Could not make AP-REQ (%s)\r\n", |