本文整理汇总了Java中org.globus.gsi.CertificateRevocationLists类的典型用法代码示例。如果您正苦于以下问题:Java CertificateRevocationLists类的具体用法?Java CertificateRevocationLists怎么用?Java CertificateRevocationLists使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
CertificateRevocationLists类属于org.globus.gsi包,在下文中一共展示了CertificateRevocationLists类的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: validate
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
public boolean validate(GlobusCredential globusCredential)
throws AuthenticationConfigurationException {
verifyCredentials(globusCredential);
X509Certificate[] proxyChain = globusCredential.getCertificateChain();
X509Certificate[] trustedCerts = loadTrustedCerts();
CertificateRevocationLists crls = loadCertificateRevocationLists();
validaeProxy(proxyChain, trustedCerts, crls);
return true;
}
开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:11,
代码来源:ProxyValidatorImpl.java
示例2: validaeProxy
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
private void validaeProxy(X509Certificate[] proxyChain,
X509Certificate[] trustedCerts, CertificateRevocationLists crls)
throws AuthenticationConfigurationException {
ProxyPathValidator proxyPathValidator = new ProxyPathValidator();
try {
proxyPathValidator.validate(proxyChain, trustedCerts, crls);
} catch (ProxyPathValidatorException e) {
log.error(FaultUtil.printFaultToString(e));
throw new AuthenticationConfigurationException(
"Error validating the Proxy Certificate : "
+ e.getMessage(), e);
}
}
开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:14,
代码来源:ProxyValidatorImpl.java
示例3: loadCertificateRevocationLists
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
private CertificateRevocationLists loadCertificateRevocationLists() {
CertificateRevocationLists crls;
String certificateRevocationListLocation = getCertificateRevocationListPath();
if (certificateRevocationListLocation != null
&& certificateRevocationListLocation.length() != 0) {
crls = CertificateRevocationLists
.getCertificateRevocationLists(certificateRevocationListLocation);
} else {
crls = CertificateRevocationLists
.getDefaultCertificateRevocationLists();
}
return crls;
}
开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:14,
代码来源:ProxyValidatorImpl.java
示例4: getDelegatedCredentialAndValidate
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
private GlobusCredential getDelegatedCredentialAndValidate(
DelegatedCredentialManager dcm, String gridIdentity,
DelegationIdentifier id, CertificateChain chain) throws Exception {
X509Certificate[] signingChain = org.cagrid.gaards.cds.common.Utils
.toCertificateArray(chain);
KeyPair pair = KeyUtil.generateRSAKeyPair1024();
org.cagrid.gaards.cds.common.PublicKey pKey = new org.cagrid.gaards.cds.common.PublicKey();
pKey.setKeyAsString(KeyUtil.writePublicKey(pair.getPublic()));
X509Certificate[] delegatedProxy = org.cagrid.gaards.cds.common.Utils
.toCertificateArray(dcm.getDelegatedCredential(GRID_IDENTITY,
id, pKey));
assertNotNull(delegatedProxy);
assertEquals(delegatedProxy.length, (signingChain.length + 1));
for (int i = 0; i < signingChain.length; i++) {
assertEquals(signingChain[i], delegatedProxy[i + 1]);
}
ProxyPathValidator validator = new ProxyPathValidator();
validator.validate(delegatedProxy, TrustedCertificates
.getDefaultTrustedCertificates().getCertificates(),
CertificateRevocationLists
.getDefaultCertificateRevocationLists());
DelegatedCredentialAuditRecord[] ar = dcm.searchAuditLog(Utils
.getIssuedAuditFilter(id));
assertEquals(1, ar.length);
assertEquals(id, ar[0].getDelegationIdentifier());
assertEquals(GRID_IDENTITY, ar[0].getSourceGridIdentity());
assertEquals(DelegatedCredentialEvent.DelegatedCredentialIssued, ar[0]
.getEvent());
return new GlobusCredential(pair.getPrivate(), delegatedProxy);
}
开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:34,
代码来源:DelegatedCredentialManagerTest.java
示例5: getDelegatedCredentialAndValidate
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
private GlobusCredential getDelegatedCredentialAndValidate(
DelegatedCredentialManager dcm, String gridIdentity,
DelegationIdentifier id, CertificateChain chain) throws Exception {
X509Certificate[] signingChain = org.cagrid.cds.service.impl.util.Utils
.toCertificateArray(chain);
KeyPair pair = KeyUtil.generateRSAKeyPair1024();
org.cagrid.cds.model.PublicKey pKey = new org.cagrid.cds.model.PublicKey();
pKey.setKeyAsString(KeyUtil.writePublicKey(pair.getPublic()));
X509Certificate[] delegatedProxy = org.cagrid.cds.service.impl.util.Utils
.toCertificateArray(dcm.getDelegatedCredential(GRID_IDENTITY,
id, pKey));
assertNotNull(delegatedProxy);
assertEquals(delegatedProxy.length, (signingChain.length + 1));
for (int i = 0; i < signingChain.length; i++) {
assertEquals(signingChain[i], delegatedProxy[i + 1]);
}
ProxyPathValidator validator = new ProxyPathValidator();
validator.validate(delegatedProxy, TrustedCertificates
.getDefaultTrustedCertificates().getCertificates(),
CertificateRevocationLists
.getDefaultCertificateRevocationLists());
List<DelegatedCredentialAuditRecord> ar = dcm.searchAuditLog(Utils
.getIssuedAuditFilter(id));
assertEquals(1, ar.size());
assertEquals(id, ar.get(0).getDelegationIdentifier());
assertEquals(GRID_IDENTITY, ar.get(0).getSourceGridIdentity());
assertEquals(DelegatedCredentialEvent.DELEGATED_CREDENTIAL_ISSUED, ar.get(0)
.getEvent());
return new GlobusCredential(pair.getPrivate(), delegatedProxy);
}
开发者ID:NCIP,
项目名称:cagrid2,
代码行数:34,
代码来源:DelegatedCredentialManagerTest.java
示例6: validateCertificateChain
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
public static void validateCertificateChain(X509Certificate[] chain)
throws ProxyPathValidatorException {
ProxyPathValidator validator = new ProxyPathValidator();
validator.validate(chain, TrustedCertificates
.getDefaultTrustedCertificates().getCertificates(),
CertificateRevocationLists
.getDefaultCertificateRevocationLists());
}
开发者ID:NCIP,
项目名称:cagrid2,
代码行数:10,
代码来源:Utils.java
示例7: validate
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
public void validate(X509Certificate [] certPath,
TrustedCertificates trustedCerts,
CertificateRevocationLists crlsList)
throws ProxyPathValidatorException {
super.validate(certPath, trustedCerts, crlsList);
}
开发者ID:NCIP,
项目名称:cagrid-general,
代码行数:7,
代码来源:GlobusGSSContextImpl.java
示例8: checkCRL
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
protected void checkCRL(X509Certificate cert,
CertificateRevocationLists crlsList,
TrustedCertificates trustedCerts)
throws ProxyPathValidatorException {
if (crlsList == null) {
return;
}
logger.debug("checkCRLs: enter");
// Should not happen, just a sanity check.
if (trustedCerts == null) {
String err = "Trusted certificates are null, cannot verify CRLs";
logger.error(err);
throw new ProxyPathValidatorException(
ProxyPathValidatorException.FAILURE, null, err);
}
String issuerName = cert.getIssuerDN().getName();
X509CRL crl = crlsList.getCrl(issuerName);
if (crl == null) {
logger.debug("No CRL for certificate");
return;
}
// get CA cert for the CRL
X509Certificate x509Cert =
trustedCerts.getCertificate(issuerName);
if (x509Cert == null) {
// if there is no trusted certs from that CA, then
// the chain cannot contain a cert from that CA,
// which implies not checking this CRL should be fine.
logger.debug("No trusted cert with this CA signature");
return;
}
// validate CRL
try {
crl.verify(x509Cert.getPublicKey());
} catch (Exception exp) {
logger.error("CRL verification failed");
throw new ProxyPathValidatorException(
ProxyPathValidatorException.FAILURE, exp);
}
Date now = new Date();
//check date validity of CRL
if ((crl.getThisUpdate().before(now)) ||
((crl.getNextUpdate()!=null) &&
(crl.getNextUpdate().after(now)))) {
if (crl.isRevoked(cert)) {
throw new ProxyPathValidatorException(
ProxyPathValidatorException.REVOKED,
cert, "This cert "
+ cert.getSubjectDN().getName()
+ " is on a CRL");
}
}
logger.debug("checkCRLs: exit");
}
开发者ID:NCIP,
项目名称:cagrid-general,
代码行数:61,
代码来源:ProxyPathValidator.java
示例9: validateCertificateChain
点赞 2
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
public static void validateCertificateChain(X509Certificate[] chain) throws ProxyPathValidatorException {
ProxyPathValidator validator = new ProxyPathValidator();
validator.validate(chain, TrustedCertificates.getDefaultTrustedCertificates().getCertificates(),
CertificateRevocationLists.getDefaultCertificateRevocationLists());
}
开发者ID:NCIP,
项目名称:cagrid-core,
代码行数:7,
代码来源:Utils.java
示例10: validate
点赞 1
import org.globus.gsi.CertificateRevocationLists; //导入依赖的package包/类
/**
* Performs certificate path validation. Does <B>not</B> check
* the cert signatures but it performs all other checks like
* the extension checking, validity checking, restricted policy
* checking, CRL checking, etc.
*
* @param certPath the certificate path to validate.
* @exception ProxyPathValidatorException if certificate
* path validation fails.
*/
protected void validate(X509Certificate [] certPath)
throws ProxyPathValidatorException {
validate(certPath,
(TrustedCertificates)null,
(CertificateRevocationLists)null);
}
开发者ID:NCIP,
项目名称:cagrid-general,
代码行数:17,
代码来源:ProxyPathValidator.java