FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* input : buffer to read from
 * inOutIdx : index to start reading from, gets advanced by 1 if successful
 * maxIdx : maximum index value
 * tag : ASN tag value found
 *
 * returns 0 on success
 */
input : buffer to read from
inOutIdx : index to start reading from, gets advanced by 1 if successful
maxIdx : maximum index value
tag : ASN tag value found

returns 0 on success
input : buffer to read from inOutIdx : index to start reading from gets advanced by 1 if successful maxIdx : maximum index value tag : ASN tag value found returns 0 on success
int GetASNTag(const byte* input, word32* inOutIdx, byte* tag, word32 maxIdx)
{
    word32 idx;
    if (tag == NULL || inOutIdx == NULL || input == NULL) {
        return BAD_FUNC_ARG;
    }
    idx = *inOutIdx;
    if (idx + ASN_TAG_SZ > maxIdx) {
        WOLFSSL_MSG("Buffer too small for ASN tag");
        return BUFFER_E;
    }
    *tag = input[idx];
    *inOutIdx = idx + ASN_TAG_SZ;
    return 0;
}
int GetASNTag ( const byte * input , word32 * inOutIdx , byte * tag , word32 maxIdx ) { word32 idx ; if ( tag == NULL || inOutIdx == NULL || input == NULL ) { return BAD_FUNC_ARG ; } idx = * inOutIdx ; if ( idx + ASN_TAG_SZ > maxIdx ) { WOLFSSL_MSG ( " " ) ; return BUFFER_E ; } * tag = input [ idx ] ; * inOutIdx = idx + ASN_TAG_SZ ; return 0 ; }
input : buffer to read from
 inOutIdx : index to start reading from, gets advanced by 1 if successful
 maxIdx : maximum index value
 tag : ASN tag value found
input : buffer to read from inOutIdx : index to start reading from gets advanced by 1 if successful maxIdx : maximum index value tag : ASN tag value found