FreeRTOS-Plus/ThirdParty/WolfSSL-FIPS-Ready/wolfcrypt/src/asn.c
/* Get the DER/BER encoded ASN.1 NULL element.
 * Ensure that the all fields are as expected and move index past the element.
 *
 * input     Buffer holding DER/BER encoded data.
 * inOutIdx  Current index into buffer to parse.
 * maxIdx    Length of data in buffer.
 * returns BUFFER_E when there is not enough data to parse.
 *         ASN_TAG_NULL_E when the NULL tag is not found.
 *         ASN_EXPECT_0_E when the length is not zero.
 *         Otherwise, 0 to indicate success.
 */
Get the DER/BER encoded ASN.1 NULL element.
Ensure that the all fields are as expected and move index past the element.

input     Buffer holding DER/BER encoded data.
inOutIdx  Current index into buffer to parse.
maxIdx    Length of data in buffer.
returns BUFFER_E when there is not enough data to parse.
ASN_TAG_NULL_E when the NULL tag is not found.
ASN_EXPECT_0_E when the length is not zero.
Otherwise, 0 to indicate success.
Get the DER / BER encoded ASN . 1 NULL element . Ensure that the all fields are as expected and move index past the element . input Buffer holding DER / BER encoded data . inOutIdx Current index into buffer to parse . maxIdx Length of data in buffer . returns BUFFER_E when there is not enough data to parse . ASN_TAG_NULL_E when the NULL tag is not found . ASN_EXPECT_0_E when the length is not zero . Otherwise 0 to indicate success .
static int GetASNNull(const byte* input, word32* inOutIdx, word32 maxIdx)
{
    word32 idx = *inOutIdx;
    byte   b;
    if ((idx + 2) > maxIdx)
        return BUFFER_E;
    b = input[idx++];
    if (b != ASN_TAG_NULL)
        return ASN_TAG_NULL_E;
    if (input[idx++] != 0)
        return ASN_EXPECT_0_E;
    *inOutIdx = idx;
    return 0;
}
static int GetASNNull ( const byte * input , word32 * inOutIdx , word32 maxIdx ) { word32 idx = * inOutIdx ; byte b ; if ( ( idx + 2 ) > maxIdx ) return BUFFER_E ; b = input [ idx ++ ] ; if ( b != ASN_TAG_NULL ) return ASN_TAG_NULL_E ; if ( input [ idx ++ ] != 0 ) return ASN_EXPECT_0_E ; * inOutIdx = idx ; return 0 ; }
Get the DER/BER encoded ASN.1 NULL element.
Get the DER / BER encoded ASN . 1 NULL element .