@Override
    public int getBasicConstraints() {
        if ((NativeCrypto.get_X509_ex_flags(mContext, this) & NativeConstants.EXFLAG_CA) == 0) {
            return -1;
        }

        final int pathLen = NativeCrypto.get_X509_ex_pathlen(mContext, this);
        if (pathLen == -1) {
            return Integer.MAX_VALUE;
        }

        return pathLen;
    }
An implementation of {@link X509Certificate} based on BoringSSL.
common/src/main/java/org/conscrypt/OpenSSLX509Certificate.java