gss: fix import/export of accumulating contexts
gss_{import,export}_sec_context did not work with partially accumulating contexts, where the initial context token had not been completely accumulated, Further, in gss_import_sec_context(), ctx->gc_input.value was not allocated to a buffer sufficiently large to accumulate the target length.
This commit is contained in:
@@ -279,10 +279,13 @@ loop(gss_OID mechoid,
|
||||
gsskrb5_get_time_offset(&client_time_offset);
|
||||
gsskrb5_set_time_offset(server_time_offset);
|
||||
|
||||
tmp.length = output_token.length - offset;
|
||||
if (token_split && tmp.length > token_split)
|
||||
tmp.length = token_split;
|
||||
tmp.value = (char *)output_token.value + offset;
|
||||
if (output_token.length && ((uint8_t *)output_token.value)[0] == 0x60) {
|
||||
tmp.length = output_token.length - offset;
|
||||
if (token_split && tmp.length > token_split)
|
||||
tmp.length = token_split;
|
||||
tmp.value = (char *)output_token.value + offset;
|
||||
} else
|
||||
tmp = output_token;
|
||||
|
||||
if (verbose_flag)
|
||||
printf("loop #%d: accept offset=%zu len=%zu\n", num_loops,
|
||||
|
Reference in New Issue
Block a user