Searched refs:Asn1Core (Results 1 - 25 of 47) sorted by relevance

12

/vbox/src/VBox/Runtime/common/asn1/
H A Dasn1-ut-integer-decode.cpp42 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
45 rc = RTAsn1CursorMatchTagClassFlags(pCursor, &pThis->Asn1Core, ASN1_TAG_INTEGER,
50 uint32_t offLast = pThis->Asn1Core.cb - 1;
51 switch (pThis->Asn1Core.cb)
54 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56;
55 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48;
56 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40;
57 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32;
58 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24;
59 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core
[all...]
H A Dasn1-ut-bitstring-decode.cpp49 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)
71 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
72 pThis->Asn1Core
[all...]
H A Dasn1-ut-boolean-decode.cpp43 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
46 rc = RTAsn1CursorMatchTagClassFlags(pCursor, &pThis->Asn1Core, ASN1_TAG_BOOLEAN,
50 if (pThis->Asn1Core.cb == 1)
52 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
53 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
54 pThis->Asn1Core.pOps = &g_RTAsn1Boolean_Vtable;
56 pThis->fValue = *pThis->Asn1Core.uData.pu8 != 0;
57 if ( *pThis->Asn1Core.uData.pu8 == 0
58 || *pThis->Asn1Core.uData.pu8 == 0xff
64 pszErrorTag, *pThis->Asn1Core
[all...]
H A Dasn1-ut-boolean.cpp55 RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_BOOLEAN, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
58 pThis->Asn1Core.uData.pv = (void *)(fValue ? &g_bTrue : &g_bFalse);
69 RTAsn1ContentFree(&pThis->Asn1Core);
71 pThis->Asn1Core.uData.pv = (void *)(fValue ? &g_bTrue : &g_bFalse);
72 pThis->Asn1Core.cb = 1;
73 pThis->Asn1Core.fFlags &= ~RTASN1CORE_F_DEFAULT;
74 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRESENT;
103 RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_BOOLEAN, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
106 pThis->Asn1Core.cb = 1;
107 pThis->Asn1Core
[all...]
H A Dasn1-ut-null-decode.cpp41 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
44 rc = RTAsn1CursorMatchTagClassFlags(pCursor, &pThis->Asn1Core, ASN1_TAG_NULL,
48 if (pThis->Asn1Core.cb == 0)
50 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
51 pThis->Asn1Core.pOps = &g_RTAsn1Null_Vtable;
56 "%s: Expected NULL object to have zero length: %#x", pszErrorTag, pThis->Asn1Core.cb);
H A Dasn1-ut-string-decode.cpp46 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
52 switch (pThis->Asn1Core.uTag)
71 pszErrorTag, pThis->Asn1Core.fClass, pThis->Asn1Core.uTag);
78 if (pThis->Asn1Core.fClass == (ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE))
83 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
84 pThis->Asn1Core.pOps = &g_RTAsn1String_Vtable;
85 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
92 if (pThis->Asn1Core.fClass == (ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_CONSTRUCTED))
100 pszErrorTag, pThis->Asn1Core
[all...]
H A Dasn1-ut-octetstring-decode.cpp45 int rc = RTAsn1CursorReadHdr(pCursor, &pThis->Asn1Core, pszErrorTag);
48 rc = RTAsn1CursorMatchTagClassFlagsString(pCursor, &pThis->Asn1Core, ASN1_TAG_OCTET_STRING,
53 if ( !(pThis->Asn1Core.fClass & ASN1_TAGFLAG_CONSTRUCTED)
56 RTAsn1CursorSkip(pCursor, pThis->Asn1Core.cb);
57 pThis->Asn1Core.pOps = &g_RTAsn1OctetString_Vtable;
58 pThis->Asn1Core.fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
66 pszErrorTag, pThis->Asn1Core.fClass, pThis->Asn1Core.uTag);
H A Dasn1-ut-time-decode.cpp73 pszErrorTag, pszType, pThis->Asn1Core.cb, pThis->Asn1Core.uData.pch);
78 pszErrorTag, pszType, pThis->Asn1Core.cb, pThis->Asn1Core.uData.pch);
83 pszErrorTag, pszType, pThis->Asn1Core.cb, pThis->Asn1Core.uData.pch,
105 bool fHaveSeconds = pThis->Asn1Core.cb == sizeof("YYMMDDHHMMSSZ") - 1;
106 if (fHaveSeconds || pThis->Asn1Core.cb == sizeof("YYMMDDHHMMZ") - 1)
108 const char *pachTime = pThis->Asn1Core.uData.pch;
151 pszErrorTag, pThis->Asn1Core
[all...]
H A Dasn1-ut-integer.cpp65 uint32_t offLast = pThis->Asn1Core.cb - 1;
66 switch (pThis->Asn1Core.cb)
69 case 8: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 7] << 56;
70 case 7: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 6] << 48;
71 case 6: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 5] << 40;
72 case 5: pThis->uValue.u |= (uint64_t)pThis->Asn1Core.uData.pu8[offLast - 4] << 32;
73 case 4: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 3] << 24;
74 case 3: pThis->uValue.u |= (uint32_t)pThis->Asn1Core.uData.pu8[offLast - 2] << 16;
75 case 2: pThis->uValue.u |= (uint16_t)pThis->Asn1Core.uData.pu8[offLast - 1] << 8;
76 case 1: pThis->uValue.u |= pThis->Asn1Core
[all...]
H A Dasn1-ut-null.cpp68 return RTAsn1Core_InitEx(&pThis->Asn1Core, ASN1_TAG_NULL, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_PRIMITIVE,
79 AssertReturn(pSrc->Asn1Core.pOps == &g_RTAsn1Null_Vtable, VERR_INTERNAL_ERROR_3);
80 AssertReturn(pSrc->Asn1Core.cb == 0, VERR_INTERNAL_ERROR_4);
82 int rc = RTAsn1Core_CloneNoContent(&pThis->Asn1Core, &pSrc->Asn1Core);
95 Assert(pThis->Asn1Core.pOps == &g_RTAsn1Null_Vtable);
103 Assert(pThis && (!RTAsn1Null_IsPresent(pThis) || pThis->Asn1Core.pOps == &g_RTAsn1Null_Vtable));
112 Assert(pLeft && (!RTAsn1Null_IsPresent(pLeft) || pLeft->Asn1Core.pOps == &g_RTAsn1Null_Vtable));
113 Assert(pRight && (!RTAsn1Null_IsPresent(pRight) || pRight->Asn1Core.pOps == &g_RTAsn1Null_Vtable));
H A Dasn1-ut-time.cpp57 RTAsn1Core_InitEx(&pThis->Asn1Core,
64 pThis->Asn1Core.cb = sizeof(g_szEpochUtc) - 1;
65 pThis->Asn1Core.uData.pv = &g_szEpochUtc[0];
69 pThis->Asn1Core.cb = sizeof(g_szEpochGeneralized) - 1;
70 pThis->Asn1Core.uData.pv = &g_szEpochGeneralized[0];
126 AssertReturn(pSrc->Asn1Core.pOps == &g_RTAsn1Time_Vtable, VERR_INTERNAL_ERROR_3);
128 int rc = RTAsn1Core_CloneContent(&pThis->Asn1Core, &pSrc->Asn1Core, pAllocator);
145 Assert(pThis->Asn1Core.pOps == &g_RTAsn1Time_Vtable);
147 RTAsn1ContentFree(&pThis->Asn1Core);
[all...]
H A Dasn1-ut-bitstring.cpp138 pThis->Asn1Core.cb = 1 + cbEncoded;
142 rc = RTAsn1ContentReallocZ(&pThis->Asn1Core, cbEncoded + 1, pAllocator);
145 pThis->uBits.pu8 = pThis->Asn1Core.uData.pu8 + 1;
149 Ctx.pbBuf = (uint8_t *)pThis->Asn1Core.uData.pu8;
182 if (pThis->Asn1Core.cb != 1 + cbEncoded)
188 if (!pThis->Asn1Core.uData.pv)
192 if (*pThis->Asn1Core.uData.pu8 != 0)
197 Ctx.pbBuf = (uint8_t *)pThis->Asn1Core.uData.pu8;
221 Assert(pThis->cBits == 0 || pThis->Asn1Core.uData.pv);
231 if (pThis->Asn1Core
[all...]
H A Dasn1-ut-octetstring.cpp100 pThis->Asn1Core.cb = cbEncoded;
102 rc = RTAsn1ContentReallocZ(&pThis->Asn1Core, cbEncoded, pAllocator);
107 Ctx.pbBuf = (uint8_t *)pThis->Asn1Core.uData.pu8;
136 if (pThis->Asn1Core.cb != cbEncoded)
142 if (!pThis->Asn1Core.uData.pv)
147 Ctx.pbBuf = (uint8_t *)pThis->Asn1Core.uData.pu8;
169 Assert(pThis->Asn1Core.cb == 0 || pThis->Asn1Core.uData.pv);
179 if (pThis->Asn1Core.uData.pv)
181 bool fMustFree = pThis->Asn1Core
[all...]
H A Dasn1-ut-objid.cpp289 RTAsn1Core_InitEx(&pThis->Asn1Core,
300 pThis->Asn1Core.cb = (uint32_t)cbObjId;
302 (uint8_t *)&pThis->szObjId[0], &pThis->Asn1Core.cb);
310 if (pThis->Asn1Core.cb >= cbLeft)
311 pThis->Asn1Core.uData.pv = memmove(&pThis->szObjId[cbObjId], &pThis->szObjId[0], pThis->Asn1Core.cb);
314 rc = RTAsn1ContentDup(&pThis->Asn1Core, pThis->szObjId, pThis->Asn1Core.cb, pAllocator);
396 RTAsn1Core_InitEx(&pThis->Asn1Core,
401 pThis->Asn1Core
[all...]
H A Dasn1-basics.cpp481 return RTAsn1Core_InitEx(&pThis->Asn1Core,
495 return RTAsn1Core_InitEx(&pThis->Asn1Core,
505 AssertReturn(pSrc->Asn1Core.pOps == pVtable, VERR_ASN1_INTERNAL_ERROR_5);
506 return RTAsn1Core_CloneNoContent(&pThis->Asn1Core, &pSrc->Asn1Core);
516 return RTAsn1Core_InitEx(&pThis->Asn1Core,
526 AssertReturn(pSrc->Asn1Core.pOps == pVtable, VERR_ASN1_INTERNAL_ERROR_5);
527 return RTAsn1Core_CloneNoContent(&pThis->Asn1Core, &pSrc->Asn1Core);
537 return RTAsn1Core_InitEx(&pThis->Asn1Core,
[all...]
/vbox/include/iprt/crypto/
H A Drsa.h59 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRRSAPUBLICKEY, RTDECL, RTCrRsaPublicKey, SeqCore.Asn1Core);
80 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRRSAOTHERPRIMEINFO, RTDECL, RTCrRsaOtherPrimeInfo, SeqCore.Asn1Core);
115 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRRSAPRIVATEKEY, RTDECL, RTCrRsaPrivateKey, SeqCore.Asn1Core);
140 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRRSADIGESTINFO, RTDECL, RTCrRsaDigestInfo, SeqCore.Asn1Core);
H A Dspc.h116 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSERIALIZEDPAGEHASHES, RTDECL, RTCrSpcSerializedPageHashes, SetCore.Asn1Core);
169 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSERIALIZEDOBJECTATTRIBUTE, RTDECL, RTCrSpcSerializedObjectAttribute, SeqCore.Asn1Core);
233 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSERIALIZEDOBJECT, RTDECL, RTCrSpcSerializedObject, SeqCore.Asn1Core);
279 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCSTRING, RTDECL, RTCrSpcString, Dummy.Asn1Core);
336 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCLINK, RTDECL, RTCrSpcLink, Dummy.Asn1Core);
375 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCPEIMAGEDATA, RTDECL, RTCrSpcPeImageData, SeqCore.Asn1Core);
431 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCATTRIBUTETYPEANDOPTIONALVALUE, RTDECL, RTCrSpcAttributeTypeAndOptionalValue, SeqCore.Asn1Core);
450 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRSPCINDIRECTDATACONTENT, RTDECL, RTCrSpcIndirectDataContent, SeqCore.Asn1Core);
H A Dtaf.h67 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTAFCERTPATHCONTROLS, RTDECL, RTCrTafCertPathControls, SeqCore.Asn1Core);
110 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTAFTRUSTANCHORINFO, RTDECL, RTCrTafTrustAnchorInfo, SeqCore.Asn1Core);
177 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTAFTRUSTANCHORCHOICE, RTDECL, RTCrTafTrustAnchorChoice, Dummy.Asn1Core);
H A Dtsp.h57 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTSPMESSAGEIMPRINT, RTDECL, RTCrTspMessageImprint, SeqCore.Asn1Core);
81 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTSPACCURACY, RTDECL, RTCrTspAccuracy, SeqCore.Asn1Core);
123 RTASN1TYPE_STANDARD_PROTOTYPES(RTCRTSPTSTINFO, RTDECL, RTCrTspTstInfo, SeqCore.Asn1Core);
/vbox/src/VBox/Runtime/common/crypto/
H A Dx509-asn1-decoder.cpp52 int rc = RTAsn1CursorInitSubFromCore(pCursor, &pThis->ExtnValue.Asn1Core, &ValueCursor, "ExtnValue");
64 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
76 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
88 pThis->ExtnValue.pEncapsulated = &pThat->Asn1Core;
100 pThis->ExtnValue.pEncapsulated = &pThat->Asn1Core;
112 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
124 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
137 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
149 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
161 pThis->ExtnValue.pEncapsulated = &pThat->SeqCore.Asn1Core;
[all...]
H A Dspc-sanity.cpp81 if ( pIndData->DigestInfo.Digest.Asn1Core.cb != cbDigest
85 pIndData->DigestInfo.Digest.Asn1Core.cb, cbDigest,
108 if (pObj->Uuid.Asn1Core.cb != sizeof(RTUUID))
111 pObj->Uuid.Asn1Core.cb, sizeof(RTUUID));
112 if (RTUuidCompareStr(pObj->Uuid.Asn1Core.uData.pUuid, RTCRSPCSERIALIZEDOBJECT_UUID_STR) != 0)
115 pObj->Uuid.Asn1Core.uData.pUuid, RTCRSPCSERIALIZEDOBJECT_UUID_STR);
H A Dx509-sanity.cpp67 if (pThis->paItems[i].paItems[j].Value.u.String.Asn1Core.cb == 0)
70 switch (pThis->paItems[i].paItems[j].Value.u.String.Asn1Core.uTag)
84 pThis->paItems[i].paItems[j].Value.u.String.Asn1Core.uTag);
114 if ( pThis->SerialNumber.Asn1Core.cb < 1
115 || pThis->SerialNumber.Asn1Core.cb > 1024)
117 "%s: Bad SerialNumber length: %u", pszErrorTag, pThis->SerialNumber.Asn1Core.cb);
H A DRTCrStoreCertAddFromFile.cpp83 RTASN1CORE_GET_RAW_ASN1_PTR(&Certs.paCerts[i].SeqCore.Asn1Core),
84 RTASN1CORE_GET_RAW_ASN1_SIZE(&Certs.paCerts[i].SeqCore.Asn1Core),
90 RTAsn1Destroy(&Certs.SetCore.Asn1Core);
H A Diprt-openssl.cpp69 const unsigned char *pabEncoded = (const unsigned char *)RTASN1CORE_GET_RAW_ASN1_PTR(&pCert->SeqCore.Asn1Core);
70 uint32_t cbEncoded = RTASN1CORE_GET_RAW_ASN1_SIZE(&pCert->SeqCore.Asn1Core);
/vbox/include/iprt/
H A Dasn1.h584 RTASN1CORE Asn1Core; member in struct:RTASN1DUMMY
617 RTASN1CORE Asn1Core; member in struct:RTASN1SEQUENCECORE
634 RTASN1CORE Asn1Core;
664 RTASN1TYPE_STANDARD_PROTOTYPES(a_SeqOfType, a_DeclMacro, a_ImplExtNm, SeqCore.Asn1Core)
673 RTASN1CORE Asn1Core; member in struct:RTASN1SETCORE
690 RTASN1CORE Asn1Core;
720 RTASN1TYPE_STANDARD_PROTOTYPES(a_SetOfType, a_DeclMacro, a_ImplExtNm, SetCore.Asn1Core)
736 RTASN1CORE Asn1Core; member in struct:RTASN1NULL
745 RTASN1TYPE_STANDARD_PROTOTYPES(RTASN1NULL, RTDECL, RTAsn1Null, Asn1Core);
754 RTASN1CORE Asn1Core; member in struct:RTASN1INTEGER
843 RTASN1CORE Asn1Core; member in struct:RTASN1BOOLEAN
881 RTASN1CORE Asn1Core; member in struct:RTASN1TIME
925 RTASN1CORE Asn1Core; member in struct:RTASN1OBJID
991 RTASN1CORE Asn1Core; member in struct:RTASN1BITSTRING
1045 RTASN1CORE Asn1Core; member in struct:RTASN1OCTETSTRING
1076 RTASN1CORE Asn1Core; member in struct:RTASN1STRING
1199 RTASN1CORE Asn1Core; member in struct:RTASN1CONTEXTTAG
[all...]

Completed in 917 milliseconds

12