VirtualBox

Changeset 95634 in vbox for trunk/src/VBox/Runtime/common


Ignore:
Timestamp:
Jul 14, 2022 2:09:59 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
152278
Message:

IPRT/RTAsn1OctetString: Added RTAsn1OctetString_AllocContent and RTAsn1OctetString_SetContent. bugref:8691

File:
1 edited

Legend:

Unmodified
Added
Removed
  • TabularUnified trunk/src/VBox/Runtime/common/asn1/asn1-ut-octetstring.cpp

    r93115 r95634  
    127127
    128128
     129RTDECL(int) RTAsn1OctetString_AllocContent(PRTASN1OCTETSTRING pThis, void const *pvSrc, size_t cb,
     130                                           PCRTASN1ALLOCATORVTABLE pAllocator)
     131{
     132    AssertReturn(!pThis->pEncapsulated, VERR_INVALID_STATE);
     133    int rc;
     134    if (pvSrc)
     135        rc = RTAsn1ContentDup(&pThis->Asn1Core, pvSrc, cb, pAllocator);
     136    else
     137        rc = RTAsn1ContentAllocZ(&pThis->Asn1Core, cb, pAllocator);
     138    return rc;
     139}
     140
     141
     142RTDECL(int) RTAsn1OctetString_SetContent(PRTASN1OCTETSTRING pThis, void const *pvSrc, size_t cbSrc,
     143                                         PCRTASN1ALLOCATORVTABLE pAllocator)
     144{
     145    AssertPtrReturn(pvSrc, VERR_INVALID_POINTER);
     146    return RTAsn1OctetString_AllocContent(pThis, pvSrc, cbSrc, pAllocator);
     147}
     148
     149
    129150RTDECL(bool) RTAsn1OctetString_AreContentBytesValid(PCRTASN1OCTETSTRING pThis, uint32_t fFlags)
    130151{
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette