@Override public int getBasicConstraints() { return mDelegate.getBasicConstraints(); }
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }
int p_len = cert.getBasicConstraints(); if ((pathLen < 0) && (p_len >= 0)) {
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }
/** * Returns the PathLength value of Certificate BasicConstraint.<br> * * <b>0</b> - if CA.<br> * * <b>1</b> - for End User Certificate.<br> * * @return int */ public int getPathLength() { return certificate.getBasicConstraints(); }
/** * Two ways to tell if a certificate is a CA: * 1) getBasicConstraints() > -1 means it's a CA and the value is the max certificate path length * 2) getKeyUsage() != null && getKeyUsage()[5] == true means it has the "CA" key usage flag set * Currently we only check the basic constraints * @param certificate * @return */ public static boolean isCA(X509Certificate certificate) { return certificate.getBasicConstraints() > -1; // -1 indicates not a CA cert, 0 and above indicates CA cert }
/** * Two ways to tell if a certificate is a CA: * 1) getBasicConstraints() > -1 means it's a CA and the value is the max certificate path length * 2) getKeyUsage() != null && getKeyUsage()[5] == true means it has the "CA" key usage flag set * Currently we only check the basic constraints * @param certificate * @return */ public static boolean isCA(X509Certificate certificate) { return certificate.getBasicConstraints() > -1; // -1 indicates not a CA cert, 0 and above indicates CA cert }
/** * Checks whether given {@link X509Certificate} is CA certificate. * @param cert * @return true if {@link X509Certificate} is CA certificate */ protected boolean isCACertificate(X509Certificate cert) { if (cert!=null) { return (cert.getBasicConstraints()>=0); } else { return false; } }
/** * Returns the PathLength value of Certificate BasicConstraint.<br> * * <b>0</b> - if CA.<br> * * <b>1</b> - for End User Certificate.<br> * * @return int path length */ public int getPathLength() { return certificate.getBasicConstraints(); }
/** * Check if is a Certificate Authority Certificate (ICP-BRASIL = AC).<br> * * <b>true</b> - If CA.<br> * * <b>false</b> -for End User Certificate.<br> * * @return boolean true if CA certificate */ public boolean isCACertificate() { return certificate.getBasicConstraints() >= 0; }
/** * Returns the PathLength value of Certificate BasicConstraint.<br> * * <b>0</b> - if CA.<br> * * <b>1</b> - for End User Certificate.<br> * * @return int */ public int getPathLength() { return certificate.getBasicConstraints(); }
@Override /** * {@inheritDoc} */ public int getBasicConstraints() { return internalCert.getBasicConstraints(); }
/** * Check if is a Certificate Authority Certificate (ICP-BRASIL = AC).<br> * * <b>true</b> - If CA.<br> * * <b>false</b> -for End User Certificate.<br> * * @return boolean */ public boolean isCertificadoAc() { return certificate.getBasicConstraints() >= 0; }
/** * Check if is a Certificate Authority Certificate (ICP-BRASIL = AC).<br> * * <b>true</b> - If CA.<br> * * <b>false</b> -for End User Certificate.<br> * * @return boolean */ public boolean isCertificadoAc() { return certificate.getBasicConstraints() >= 0; }
/** * Check if certificate have basic constraints exception. * * @param certificate given by server * @throws CertificateException */ private void checkBasicConstraints(X509Certificate cert) throws CertificateException { if (cert.getBasicConstraints() != -1) { throw new CertificateException("Certificate have no basic constraints"); } }
public String getPathLimit() { int pathLimit = certificate.getBasicConstraints(); if (pathLimit != -1) { return pathLimit == Integer.MAX_VALUE ? "No Limit" : String.valueOf(pathLimit); } else { return ""; } }
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }
@Override public int getBasicConstraints() { return unwrap().getBasicConstraints(); }