asn1-cursor.cpp revision 4ee2f4fc8e99dc69ba5d63fd7dd3f52a38d0501e
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * IPRT - ASN.1, Basic Operations.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Copyright (C) 2006-2014 Oracle Corporation
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * This file is part of VirtualBox Open Source Edition (OSE), as
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * available from http://www.virtualbox.org. This file is free software;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * you can redistribute it and/or modify it under the terms of the GNU
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * General Public License (GPL) as published by the Free Software
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Foundation, in version 2 as it comes in the "COPYING" file of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * The contents of this file may alternatively be used under the terms
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * of the Common Development and Distribution License Version 1.0
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * VirtualBox OSE distribution, in which case the provisions of the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * CDDL are applicable instead of those of the GPL.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * You may elect to license modified versions of this file under the
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * terms and conditions of either the GPL or the CDDL or both.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/*******************************************************************************
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync* Header Files *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync*******************************************************************************/
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync/*******************************************************************************
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync* Defined Constants And Macros *
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync*******************************************************************************/
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync/** @def RTASN1_MAX_NESTING
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync * The maximum nesting depth we allow. This limit is enforced to avoid running
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync * out of stack due to malformed ASN.1 input.
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync * For reference, 'RTSignTool verify-exe RTSignTool.exe', requires a value of 15
4ee2f4fc8e99dc69ba5d63fd7dd3f52a38d0501evboxsync * to work without hitting the limit for signatures with simple timestamps, and
4ee2f4fc8e99dc69ba5d63fd7dd3f52a38d0501evboxsync * 23 (amd64/rel = ~3KB) for the new microsoft timestamp counter signatures.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/*******************************************************************************
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync* Global Variables *
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync*******************************************************************************/
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(PRTASN1CURSOR) RTAsn1CursorInitPrimary(PRTASN1CURSORPRIMARY pPrimaryCursor, void const *pvFirst, uint32_t cb,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync PRTERRINFO pErrInfo, PCRTASN1ALLOCATORVTABLE pAllocator, uint32_t fFlags,
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync pPrimaryCursor->Cursor.pbCur = (uint8_t const *)pvFirst;
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsyncRTDECL(int) RTAsn1CursorInitSub(PRTASN1CURSOR pParent, uint32_t cb, PRTASN1CURSOR pChild, const char *pszErrorTag)
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pParent->pPrimary, VERR_ASN1_INTERNAL_ERROR_1);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pParent->pbCur, VERR_ASN1_INTERNAL_ERROR_2);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pChild->cDepth < RTASN1_MAX_NESTING, VERR_ASN1_TOO_DEEPLY_NESTED);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pParent->cbLeft >= cb, VERR_ASN1_INTERNAL_ERROR_3);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsyncRTDECL(int) RTAsn1CursorInitSubFromCore(PRTASN1CURSOR pParent, PRTASN1CORE pAsn1Core,
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pParent->pPrimary, VERR_ASN1_INTERNAL_ERROR_1);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pParent->pbCur, VERR_ASN1_INTERNAL_ERROR_2);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync AssertReturn(pChild->cDepth < RTASN1_MAX_NESTING, VERR_ASN1_TOO_DEEPLY_NESTED);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorSetInfoV(PRTASN1CURSOR pCursor, int rc, const char *pszMsg, va_list va)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Format the message. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Add the prefixes. This isn't the fastest way, but it's the one
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync which eats the least stack. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Make sure there is a ': '. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync bool fFirst = false;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if (pszMsg[0] != '%' || pszMsg[1] != 's' || pszMsg[2] != ':')
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Add the prefixes from the cursor chain. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync memmove(pszBuf + cchErrorTag + !fFirst, pszBuf, cbMove);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorSetInfo(PRTASN1CURSOR pCursor, int rc, const char *pszMsg, ...)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync rc = RTAsn1CursorSetInfoV(pCursor, rc, pszMsg, va);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorCheckEnd(PRTASN1CURSOR pCursor)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_NOT_AT_END,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%u (%#x) bytes left over", pCursor->cbLeft, pCursor->cbLeft);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(PRTASN1ALLOCATION) RTAsn1CursorInitAllocation(PRTASN1CURSOR pCursor, PRTASN1ALLOCATION pAllocation)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pAllocation->pAllocator = pCursor->pPrimary->pAllocator;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorReadHdr(PRTASN1CURSOR pCursor, PRTASN1CORE pAsn1Core, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * Initialize the return structure in case of failure.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync * The header has at least two bytes: Type & length.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pAsn1Core->uRealTag = pAsn1Core->uTag = uTag & ASN1_TAG_MASK;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pAsn1Core->fRealClass = pAsn1Core->fClass = uTag & ~ASN1_TAG_MASK;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if ((uTag & ASN1_TAG_MASK) == ASN1_TAG_USE_LONG_FORM)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_LONG_TAG,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Implement parsing of tags > 30: %#x (length=%#x)", pszErrorTag, uTag, cb);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Extended length field? */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Definite form. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_BAD_LENGTH_ENCODING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Extended BER length field longer than available data: %#x vs %#x (uTag=%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync cb = RT_MAKE_U16(pCursor->pbCur[1], pCursor->pbCur[0]);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync cb = RT_MAKE_U32_FROM_U8(pCursor->pbCur[2], pCursor->pbCur[1], pCursor->pbCur[0], 0);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync cb = RT_MAKE_U32_FROM_U8(pCursor->pbCur[3], pCursor->pbCur[2], pCursor->pbCur[1], pCursor->pbCur[0]);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_BAD_LENGTH_ENCODING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Too long/short extended BER length field: %#x (uTag=%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Check the length encoding efficiency (T-REC-X.690-200811 10.1, 9.1). */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if (pCursor->fFlags & (RTASN1CURSOR_FLAGS_DER | RTASN1CURSOR_FLAGS_CER))
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_BAD_LENGTH_ENCODING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Invalid DER/CER length encoding: cbEnc=%u cb=%#x uTag=%#x",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_BAD_LENGTH_ENCODING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Invalid DER/CER length encoding: cb=%#x uTag=%#x cbEnc=%u cbNeeded=%u",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Indefinite form. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_ILLEGAL_IDEFINITE_LENGTH,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Indefinite length form not allowed in DER mode (uTag=%#x).", pszErrorTag, uTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_IDEFINITE_LENGTH_NOT_SUP,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Indefinite BER/CER length not supported (uTag=%#x)", pszErrorTag, uTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync /* Check if the length makes sense. */
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_BAD_LENGTH,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: BER value length out of bounds: %#x (max=%#x uTag=%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pAsn1Core->fFlags |= RTASN1CORE_F_PRESENT | RTASN1CORE_F_DECODED_CONTENT;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_TOO_LITTLE_DATA_LEFT,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Too little data left to form a valid BER header", pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_NO_MORE_DATA,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: No more data reading BER header", pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorMatchTagClassFlagsEx(PRTASN1CURSOR pCursor, PRTASN1CORE pAsn1Core, uint32_t uTag, uint32_t fClass,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync bool fString, uint32_t fFlags, const char *pszErrorTag, const char *pszWhat)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync && pAsn1Core->fClass == (fClass | ASN1_TAGFLAG_CONSTRUCTED))
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync if (!(pCursor->fFlags & (RTASN1CURSOR_FLAGS_DER | RTASN1CURSOR_FLAGS_CER)))
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_ILLEGAL_CONSTRUCTED_STRING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Constructed %s only allowed for >1000 byte in CER encoding: cb=%#x uTag=%#x fClass=%#x",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pszErrorTag, pszWhat, pAsn1Core->cb, pAsn1Core->uTag, pAsn1Core->fClass);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_ILLEGAL_CONSTRUCTED_STRING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: DER encoding does not allow constructed %s (cb=%#x uTag=%#x fClass=%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pszErrorTag, pszWhat, pAsn1Core->cb, pAsn1Core->uTag, pAsn1Core->fClass);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, pAsn1Core->uTag != uTag ? VERR_ASN1_CURSOR_TAG_MISMATCH : VERR_ASN1_CURSOR_TAG_FLAG_CLASS_MISMATCH,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Unexpected %s type/flags: %#x/%#x (expected %#x/%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pszErrorTag, pszWhat, pAsn1Core->uTag, pAsn1Core->fClass, uTag, fClass);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncstatic int rtAsn1CursorGetXxxxCursor(PRTASN1CURSOR pCursor, uint32_t fFlags, uint32_t uTag, uint8_t fClass,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync int rc = RTAsn1CursorReadHdr(pCursor, pAsn1Core, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1CursorSetInfo(pCursor, VERR_ASN1_CURSOR_ILLEGAL_CONSTRUCTED_STRING,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync "%s: Unexpected %s type/flags: %#x/%#x (expected %#x/%#x)",
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync pszErrorTag, pszWhat, pAsn1Core->uTag, pAsn1Core->fClass, uTag, fClass);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync rc = RTAsn1CursorInitSub(pCursor, pAsn1Core->cb, pRetCursor, pszErrorTag);
b1f3a2dc94cfa582803b349a7ce9c7b2f94e58f1vboxsync pAsn1Core->fFlags |= RTASN1CORE_F_PRIMITE_TAG_STRUCT;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetSequenceCursor(PRTASN1CURSOR pCursor, uint32_t fFlags,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync PRTASN1SEQUENCECORE pSeqCore, PRTASN1CURSOR pSeqCursor, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return rtAsn1CursorGetXxxxCursor(pCursor, fFlags, ASN1_TAG_SEQUENCE, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_CONSTRUCTED,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync &pSeqCore->Asn1Core, pSeqCursor, pszErrorTag, "sequence");
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetSetCursor(PRTASN1CURSOR pCursor, uint32_t fFlags,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync PRTASN1SETCORE pSetCore, PRTASN1CURSOR pSetCursor, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return rtAsn1CursorGetXxxxCursor(pCursor, fFlags, ASN1_TAG_SET, ASN1_TAGCLASS_UNIVERSAL | ASN1_TAGFLAG_CONSTRUCTED,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync &pSetCore->Asn1Core, pSetCursor, pszErrorTag, "set");
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetContextTagNCursor(PRTASN1CURSOR pCursor, uint32_t fFlags, uint32_t uExpectedTag,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync PRTASN1CONTEXTTAG pCtxTag, PRTASN1CURSOR pCtxTagCursor, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return rtAsn1CursorGetXxxxCursor(pCursor, fFlags, uExpectedTag, ASN1_TAGCLASS_CONTEXT | ASN1_TAGFLAG_CONSTRUCTED,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync &pCtxTag->Asn1Core, pCtxTagCursor, pszErrorTag, "ctx tag");
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorPeek(PRTASN1CURSOR pCursor, PRTASN1CORE pAsn1Core)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync int rc = RTAsn1CursorReadHdr(pCursor, pAsn1Core, "peek");
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(bool) RTAsn1CursorIsNextEx(PRTASN1CURSOR pCursor, uint32_t uTag, uint8_t fClass)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return false;
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync/** @name Legacy Interfaces.
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetCore(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1CORE pAsn1Core, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Core_DecodeAsn1(pCursor, fFlags, pAsn1Core, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetNull(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1NULL pNull, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Null_DecodeAsn1(pCursor, fFlags, pNull, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetInteger(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1INTEGER pInteger, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Integer_DecodeAsn1(pCursor, fFlags, pInteger, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetBoolean(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1BOOLEAN pBoolean, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Boolean_DecodeAsn1(pCursor, fFlags, pBoolean, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetObjId(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1OBJID pObjId, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1ObjId_DecodeAsn1(pCursor, fFlags, pObjId, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetTime(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1TIME pTime, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Time_DecodeAsn1(pCursor, fFlags, pTime, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetBitStringEx(PRTASN1CURSOR pCursor, uint32_t fFlags, uint32_t cMaxBits, PRTASN1BITSTRING pBitString,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1BitString_DecodeAsn1Ex(pCursor, fFlags, cMaxBits, pBitString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetBitString(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1BITSTRING pBitString, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1BitString_DecodeAsn1(pCursor, fFlags, pBitString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetOctetString(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1OCTETSTRING pOctetString,
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1OctetString_DecodeAsn1(pCursor, fFlags, pOctetString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetString(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1STRING pString, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1String_DecodeAsn1(pCursor, fFlags, pString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetIa5String(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1STRING pString, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Ia5String_DecodeAsn1(pCursor, fFlags, pString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetUtf8String(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1STRING pString, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1Utf8String_DecodeAsn1(pCursor, fFlags, pString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetBmpString(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1STRING pString, const char *pszErrorTag)
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsync return RTAsn1BmpString_DecodeAsn1(pCursor, fFlags, pString, pszErrorTag);
13493ab7596e827b8d0caab2c89e635dd65f78f9vboxsyncRTDECL(int) RTAsn1CursorGetDynType(PRTASN1CURSOR pCursor, uint32_t fFlags, PRTASN1DYNTYPE pDynType, const char *pszErrorTag)