Fixed review comments
This commit is contained in:
parent
362ae93a64
commit
36c7c0320b
@ -149,7 +149,7 @@ extern "C"
|
|||||||
WINPR_API size_t WinPrAsn1DecReadContextualSequence(WinPrAsn1Decoder* dec,
|
WINPR_API size_t WinPrAsn1DecReadContextualSequence(WinPrAsn1Decoder* dec,
|
||||||
WinPrAsn1_tagId tagId, BOOL* error,
|
WinPrAsn1_tagId tagId, BOOL* error,
|
||||||
WinPrAsn1Decoder* target);
|
WinPrAsn1Decoder* target);
|
||||||
WINPR_API void WinPrAsn1DecGetStream(WinPrAsn1Decoder* dec, wStream* s);
|
WINPR_API wStream WinPrAsn1DecGetStream(WinPrAsn1Decoder* dec);
|
||||||
|
|
||||||
/* encoder functions */
|
/* encoder functions */
|
||||||
|
|
||||||
|
@ -377,7 +377,6 @@ static BOOL negotiate_read_neg_token(PSecBuffer input, NegToken* token)
|
|||||||
WinPrAsn1_tag tag;
|
WinPrAsn1_tag tag;
|
||||||
size_t len;
|
size_t len;
|
||||||
WinPrAsn1_OctetString octet_string;
|
WinPrAsn1_OctetString octet_string;
|
||||||
wStream s;
|
|
||||||
BOOL err;
|
BOOL err;
|
||||||
|
|
||||||
WINPR_ASSERT(input);
|
WINPR_ASSERT(input);
|
||||||
@ -427,7 +426,7 @@ static BOOL negotiate_read_neg_token(PSecBuffer input, NegToken* token)
|
|||||||
if (token->init)
|
if (token->init)
|
||||||
{
|
{
|
||||||
/* mechTypes [0] MechTypeList */
|
/* mechTypes [0] MechTypeList */
|
||||||
WinPrAsn1DecGetStream(&dec2, &s);
|
wStream s = WinPrAsn1DecGetStream(&dec2);
|
||||||
token->mechTypes.BufferType = SECBUFFER_TOKEN;
|
token->mechTypes.BufferType = SECBUFFER_TOKEN;
|
||||||
token->mechTypes.cbBuffer = Stream_Length(&s);
|
token->mechTypes.cbBuffer = Stream_Length(&s);
|
||||||
token->mechTypes.pvBuffer = Stream_Buffer(&s);
|
token->mechTypes.pvBuffer = Stream_Buffer(&s);
|
||||||
@ -782,8 +781,7 @@ static SECURITY_STATUS SEC_ENTRY negotiate_InitializeSecurityContextW(
|
|||||||
status = SEC_E_INTERNAL_ERROR;
|
status = SEC_E_INTERNAL_ERROR;
|
||||||
|
|
||||||
cleanup:
|
cleanup:
|
||||||
if (enc)
|
WinPrAsn1Encoder_Free(&enc);
|
||||||
WinPrAsn1Encoder_Free(&enc);
|
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1402,11 +1402,11 @@ size_t WinPrAsn1DecReadContextualSequence(WinPrAsn1Decoder* dec, WinPrAsn1_tagId
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void WinPrAsn1DecGetStream(WinPrAsn1Decoder* dec, wStream* s)
|
wStream WinPrAsn1DecGetStream(WinPrAsn1Decoder* dec)
|
||||||
{
|
{
|
||||||
|
wStream s = { 0 };
|
||||||
WINPR_ASSERT(dec);
|
WINPR_ASSERT(dec);
|
||||||
WINPR_ASSERT(s);
|
|
||||||
|
|
||||||
Stream_StaticConstInit(s, Stream_Pointer(&dec->source),
|
Stream_StaticConstInit(&s, Stream_Pointer(&dec->source),
|
||||||
Stream_GetRemainingLength(&dec->source));
|
Stream_GetRemainingLength(&dec->source));
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user