本文整理汇总了Java中org.globus.gsi.CertUtil.isGsi4Proxy方法的典型用法代码示例。如果您正苦于以下问题:Java CertUtil.isGsi4Proxy方法的具体用法?Java CertUtil.isGsi4Proxy怎么用?Java CertUtil.isGsi4Proxy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.globus.gsi.CertUtil
的用法示例。
在下文中一共展示了CertUtil.isGsi4Proxy方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: checkUnsupportedCriticalExtensions
import org.globus.gsi.CertUtil; //导入方法依赖的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");
}
示例2: checkUnsupportedCriticalExtensions
import org.globus.gsi.CertUtil; //导入方法依赖的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");
}
示例3: getDelegationType
import org.globus.gsi.CertUtil; //导入方法依赖的package包/类
protected int getDelegationType(X509Certificate issuer)
throws GeneralSecurityException, GSSException {
int certType = BouncyCastleUtil.getCertificateType(issuer, this.tc);
int dType = this.delegationType.intValue();
if (logger.isDebugEnabled()) {
logger.debug("Issuer type: " + certType + " delg. type requested: " + dType);
}
if (certType == GSIConstants.EEC) {
if (dType == GSIConstants.DELEGATION_LIMITED) {
return (CertUtil.isGsi3Enabled()) ?
GSIConstants.GSI_3_LIMITED_PROXY :
GSIConstants.GSI_2_LIMITED_PROXY;
} else if (dType == GSIConstants.DELEGATION_FULL) {
return (CertUtil.isGsi3Enabled()) ?
GSIConstants.GSI_3_IMPERSONATION_PROXY :
GSIConstants.GSI_2_PROXY;
} else if (CertUtil.isProxy(dType)) {
return dType;
}
} else if (CertUtil.isGsi2Proxy(certType)) {
if (dType == GSIConstants.DELEGATION_LIMITED) {
return GSIConstants.GSI_2_LIMITED_PROXY;
} else if (dType == GSIConstants.DELEGATION_FULL) {
return GSIConstants.GSI_2_PROXY;
} else if (CertUtil.isGsi2Proxy(dType)) {
return dType;
}
} else if (CertUtil.isGsi3Proxy(certType)) {
if (dType == GSIConstants.DELEGATION_LIMITED) {
return GSIConstants.GSI_3_LIMITED_PROXY;
} else if (dType == GSIConstants.DELEGATION_FULL) {
return GSIConstants.GSI_3_IMPERSONATION_PROXY;
} else if (CertUtil.isGsi3Proxy(dType)) {
return dType;
}
} else if (CertUtil.isGsi4Proxy(certType)) {
if (dType == GSIConstants.DELEGATION_LIMITED) {
return GSIConstants.GSI_4_LIMITED_PROXY;
} else if (dType == GSIConstants.DELEGATION_FULL) {
return GSIConstants.GSI_4_IMPERSONATION_PROXY;
} else if (CertUtil.isGsi4Proxy(dType)) {
return dType;
}
}
throw new GSSException(GSSException.FAILURE);
}