Pass down the use-dce-style flag instead of the while gssapi krb5 context
This commit is contained in:
@@ -41,9 +41,9 @@
|
|||||||
#define CFXAcceptorSubkey (1 << 2)
|
#define CFXAcceptorSubkey (1 << 2)
|
||||||
|
|
||||||
krb5_error_code
|
krb5_error_code
|
||||||
_gsskrb5cfx_wrap_length_cfx(const gsskrb5_ctx context_handle,
|
_gsskrb5cfx_wrap_length_cfx(krb5_context context,
|
||||||
krb5_context context,
|
|
||||||
krb5_crypto crypto,
|
krb5_crypto crypto,
|
||||||
|
int dce_style,
|
||||||
int conf_req_flag,
|
int conf_req_flag,
|
||||||
size_t input_length,
|
size_t input_length,
|
||||||
size_t *output_length,
|
size_t *output_length,
|
||||||
@@ -71,7 +71,7 @@ _gsskrb5cfx_wrap_length_cfx(const gsskrb5_ctx context_handle,
|
|||||||
/* Header is concatenated with data before encryption */
|
/* Header is concatenated with data before encryption */
|
||||||
input_length += sizeof(gss_cfx_wrap_token_desc);
|
input_length += sizeof(gss_cfx_wrap_token_desc);
|
||||||
|
|
||||||
if (IS_DCE_STYLE(context_handle)) {
|
if (dce_style) {
|
||||||
ret = krb5_crypto_getblocksize(context, crypto, &padsize);
|
ret = krb5_crypto_getblocksize(context, crypto, &padsize);
|
||||||
} else {
|
} else {
|
||||||
ret = krb5_crypto_getpadsize(context, crypto, &padsize);
|
ret = krb5_crypto_getpadsize(context, crypto, &padsize);
|
||||||
@@ -972,8 +972,9 @@ OM_uint32 _gssapi_wrap_cfx(OM_uint32 *minor_status,
|
|||||||
int32_t seq_number;
|
int32_t seq_number;
|
||||||
u_char *p;
|
u_char *p;
|
||||||
|
|
||||||
ret = _gsskrb5cfx_wrap_length_cfx(ctx, context,
|
ret = _gsskrb5cfx_wrap_length_cfx(context,
|
||||||
ctx->crypto, conf_req_flag,
|
ctx->crypto, conf_req_flag,
|
||||||
|
IS_DCE_STYLE(ctx),
|
||||||
input_message_buffer->length,
|
input_message_buffer->length,
|
||||||
&wrapped_len, &cksumsize, &padlength);
|
&wrapped_len, &cksumsize, &padlength);
|
||||||
if (ret != 0) {
|
if (ret != 0) {
|
||||||
|
@@ -77,6 +77,7 @@ test_range(const struct range *r, int integ,
|
|||||||
ret = _gsskrb5cfx_wrap_length_cfx(context,
|
ret = _gsskrb5cfx_wrap_length_cfx(context,
|
||||||
crypto,
|
crypto,
|
||||||
integ,
|
integ,
|
||||||
|
0,
|
||||||
max_wrap_size,
|
max_wrap_size,
|
||||||
&rsize, &cksumsize, &padsize);
|
&rsize, &cksumsize, &padsize);
|
||||||
if (ret)
|
if (ret)
|
||||||
@@ -118,6 +119,7 @@ test_special(krb5_context context, krb5_crypto crypto,
|
|||||||
ret = _gsskrb5cfx_wrap_length_cfx(context,
|
ret = _gsskrb5cfx_wrap_length_cfx(context,
|
||||||
crypto,
|
crypto,
|
||||||
integ,
|
integ,
|
||||||
|
0,
|
||||||
max_wrap_size,
|
max_wrap_size,
|
||||||
&rsize, &cksumsize, &padsize);
|
&rsize, &cksumsize, &padsize);
|
||||||
if (ret)
|
if (ret)
|
||||||
|
Reference in New Issue
Block a user