当前位置: 首页>>代码示例>>Java>>正文


Java CertUtil.isGsi4Proxy方法代码示例

本文整理汇总了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");
}
 
开发者ID:NCIP,项目名称:cagrid-core,代码行数:26,代码来源:ProxyPathValidator.java

示例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");
   }
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:35,代码来源:ProxyPathValidator.java

示例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);
}
 
开发者ID:NCIP,项目名称:cagrid-general,代码行数:50,代码来源:GlobusGSSContextImpl.java


注:本文中的org.globus.gsi.CertUtil.isGsi4Proxy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。