本文整理汇总了Java中org.bouncycastle.asn1.x509.X509Extension.isCritical方法的典型用法代码示例。如果您正苦于以下问题:Java X509Extension.isCritical方法的具体用法?Java X509Extension.isCritical怎么用?Java X509Extension.isCritical使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.bouncycastle.asn1.x509.X509Extension
的用法示例。
在下文中一共展示了X509Extension.isCritical方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
Set set = new HashSet();
X509Extensions extensions = this.getResponseExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
}
return set;
}
示例2: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
Set set = new HashSet();
X509Extensions extensions = this.getRequestExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
ASN1ObjectIdentifier oid = (ASN1ObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
}
return set;
}
示例3: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
Set set = new HashSet();
X509Extensions extensions = this.getSingleRequestExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
}
return set;
}
示例4: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
Set set = new HashSet();
X509Extensions extensions = this.getSingleExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
}
return set;
}
示例5: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(
boolean critical)
{
X509Extensions extensions = cert.getAcinfo().getExtensions();
if (extensions != null)
{
Set set = new HashSet();
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical() == critical)
{
set.add(oid.getId());
}
}
return set;
}
return null;
}
示例6: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
if (this.getVersion() == 2)
{
HashSet set = new HashSet();
X509Extensions extensions = c.getTBSCertList().getExtensions();
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
return set;
}
return null;
}
示例7: getExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
private Set getExtensionOIDs(boolean critical)
{
X509Extensions extensions = c.getExtensions();
if ( extensions != null )
{
HashSet set = new HashSet();
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (critical == ext.isCritical())
{
set.add(oid.getId());
}
}
return set;
}
return null;
}
示例8: checkUnsupportedCriticalExtensions
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
protected void checkUnsupportedCriticalExtensions(TBSCertificateStructure crt, int certType,
X509Certificate checkedProxy) throws ProxyPathValidatorException {
logger.debug("enter: checkUnsupportedCriticalExtensions");
X509Extensions extensions = crt.getExtensions();
if (extensions != null) {
Enumeration e = extensions.oids();
while (e.hasMoreElements()) {
DERObjectIdentifier oid = (DERObjectIdentifier) e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical()) {
if (oid.equals(X509Extensions.BasicConstraints) || oid.equals(X509Extensions.KeyUsage)
|| (oid.equals(ProxyCertInfo.OID) && CertUtil.isGsi4Proxy(certType))
|| (oid.equals(ProxyCertInfo.OLD_OID) && CertUtil.isGsi3Proxy(certType))) {
} else {
throw new ProxyPathValidatorException(ProxyPathValidatorException.UNSUPPORTED_EXTENSION,
checkedProxy, "Unsuppored critical exception : " + oid.getId());
}
}
}
}
logger.debug("exit: checkUnsupportedCriticalExtensions");
}
示例9: getCriticalExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
public Set getCriticalExtensionOIDs()
{
if (this.getVersion() == 3)
{
HashSet set = new HashSet();
X509Extensions extensions = c.getTBSCertificate().getExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical())
{
set.add(oid.getId());
}
}
return set;
}
}
return null;
}
示例10: getNonCriticalExtensionOIDs
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
public Set getNonCriticalExtensionOIDs()
{
if (this.getVersion() == 3)
{
HashSet set = new HashSet();
X509Extensions extensions = c.getTBSCertificate().getExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (!ext.isCritical())
{
set.add(oid.getId());
}
}
return set;
}
}
return null;
}
示例11: hasUnsupportedCriticalExtension
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
public boolean hasUnsupportedCriticalExtension()
{
if (this.getVersion() == 3)
{
X509Extensions extensions = c.getTBSCertificate().getExtensions();
if (extensions != null)
{
Enumeration e = extensions.oids();
while (e.hasMoreElements())
{
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
if (oid.getId().equals("2.5.29.15")
|| oid.getId().equals("2.5.29.19"))
{
continue;
}
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical())
{
return true;
}
}
}
}
return false;
}
示例12: checkUnsupportedCriticalExtensions
import org.bouncycastle.asn1.x509.X509Extension; //导入方法依赖的package包/类
protected void checkUnsupportedCriticalExtensions(TBSCertificateStructure crt,
int certType,
X509Certificate checkedProxy)
throws ProxyPathValidatorException {
logger.debug("enter: checkUnsupportedCriticalExtensions");
X509Extensions extensions = crt.getExtensions();
if (extensions != null) {
Enumeration e = extensions.oids();
while (e.hasMoreElements()) {
DERObjectIdentifier oid = (DERObjectIdentifier)e.nextElement();
X509Extension ext = extensions.getExtension(oid);
if (ext.isCritical()) {
if (oid.equals(X509Extensions.BasicConstraints) ||
oid.equals(X509Extensions.KeyUsage) ||
(oid.equals(ProxyCertInfo.OID) &&
CertUtil.isGsi4Proxy(certType)) ||
(oid.equals(ProxyCertInfo.OLD_OID) &&
CertUtil.isGsi3Proxy(certType))) {
} else {
throw new ProxyPathValidatorException(
ProxyPathValidatorException
.UNSUPPORTED_EXTENSION,
checkedProxy,
"Unsuppored critical exception : "
+ oid.getId());
}
}
}
}
logger.debug("exit: checkUnsupportedCriticalExtensions");
}