/* Get the version type of a certificate (which we don't actually care about)  */
int ICACHE_FLASH_ATTR asn1_version(const uint8_t *cert, int *offset, X509_CTX *x509_ctx)
/* Get the version type of a certificate (which we don't actually care about)  */
int ICACHE_FLASH_ATTR asn1_version(const uint8_t *cert, int *offset, X509_CTX *x509_ctx)
{
    int ret = X509_NOT_OK;
    (*offset) += 2;
    if (asn1_skip_obj(cert, offset, ASN1_INTEGER))
        goto end_version;
    ret = X509_OK;
end_version:
    return ret;
}