/* Skip over an ASN.1 object type completely. Get ready to read the next object.  */
int ICACHE_FLASH_ATTR asn1_skip_obj(const uint8_t *buf, int *offset, int obj_type)
/* Skip over an ASN.1 object type completely. Get ready to read the next object.  */
int ICACHE_FLASH_ATTR asn1_skip_obj(const uint8_t *buf, int *offset, int obj_type)
{
    int len;
    if (buf[*offset] != obj_type)
        return X509_NOT_OK;
    (*offset)++;
    len = get_asn1_length(buf, offset);
    *offset += len;
    return 0;
}