winpr: update WinPrAsn1DecReadContextualOctetString to use common code

This commit is contained in:
David Fort 2022-07-21 18:01:36 +02:00 committed by David Fort
parent 5f3bc5842a
commit 48abc64a6d
1 changed files with 2 additions and 6 deletions

View File

@ -1395,13 +1395,10 @@ size_t WinPrAsn1DecReadContextualOctetString(WinPrAsn1Decoder* dec, WinPrAsn1_ta
BOOL allocate)
{
size_t ret, ret2;
WinPrAsn1_tag ftag;
WinPrAsn1Decoder content;
WINPR_ASSERT(error);
ret = WinPrAsn1DecPeekContextualTag(dec, &ftag, &content);
if (!ret || ftag != tagId)
ret = readContextualHeader(dec, tagId, error, &content);
if (!ret)
return 0;
ret2 = WinPrAsn1DecReadOctetString(&content, target, allocate);
@ -1411,7 +1408,6 @@ size_t WinPrAsn1DecReadContextualOctetString(WinPrAsn1Decoder* dec, WinPrAsn1_ta
return 0;
}
*error = FALSE;
Stream_Seek(&dec->source, ret);
return ret;
}