Lines Matching defs:pThis

40 RTDECL(int) RTAsn1BitString_DecodeAsn1Ex(PRTASN1CURSOR pCursor, uint32_t fFlags, uint32_t cMaxBits, PRTASN1BITSTRING pThis,
43 pThis->cBits = 0;
44 pThis->cMaxBits = cMaxBits;
45 pThis->uBits.pv = NULL;
46 pThis->pEncapsulated = NULL;
47 RTAsn1CursorInitAllocation(pCursor, &pThis->EncapsulatedAllocation);
49 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
52 rc = RTAsn1CursorMatchTagClassFlagsString(pCursor, &pThis->Asn1Core, ASN1_TAG_BIT_STRING,
57 if (!(pThis->Asn1Core.fClass & ASN1_TAGFLAG_CONSTRUCTED))
60 || RT_ALIGN(cMaxBits, 8) / 8 + 1 >= pThis->Asn1Core.cb)
61 && pThis->Asn1Core.cb > 0)
63 uint8_t cUnusedBits = pThis->Asn1Core.cb > 0 ? *pThis->Asn1Core.uData.pu8 : 0;
64 if (pThis->Asn1Core.cb < 2)
69 pThis->cBits = 0;
70 pThis->uBits.pv = NULL;
71 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
72 pThis->Asn1Core.pOps = &g_RTAsn1BitString_Vtable;
73 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
78 pszErrorTag, cUnusedBits, pThis->Asn1Core.cb);
82 pThis->cBits = (pThis->Asn1Core.cb - 1) * 8;
83 pThis->cBits -= cUnusedBits;
84 pThis->uBits.pu8 = pThis->Asn1Core.uData.pu8 + 1;
87 || !( pThis->uBits.pu8[pThis->Asn1Core.cb - 2] & (((uint8_t)1 << cUnusedBits) - (uint8_t)1) ) )
89 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
90 pThis->Asn1Core.pOps = &g_RTAsn1BitString_Vtable;
91 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
96 pszErrorTag, pThis->uBits.pu8[pThis->cBits / 8], cUnusedBits);
101 pszErrorTag, cUnusedBits, pThis->Asn1Core.cb);
106 pszErrorTag, pThis->Asn1Core.cb, RT_ALIGN(cMaxBits, 8) / 8 + 1, cMaxBits);
113 RT_ZERO(*pThis);
118 RTDECL(int) RTAsn1BitString_DecodeAsn1(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1BITSTRING pThis, const char *pszErrorTag)
120 return RTAsn1BitString_DecodeAsn1Ex(pCursor, fFlags, UINT32_MAX, pThis, pszErrorTag);