Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [geclipse-dev] CA certificates download

Hi Romain,

Nice to see you again on the list :) Hope your move went well!

> Obviously,things have changed. May you point me at some code that
download > the authority certificates in the new way of doing it?

Sure, here we go. Assuming you are only interested in the accredited
certs of the EUGridPMA the easiest way of doing this is:

URI uri = new URI(
"http://dist.eugridpma.info/distribution/igtf/current/accredited/tgz/";
);
ICertificateLoader loader = new GridPMACertificateLoader();
CertificateID[] certificateIDs = loader.listAvailableCertificates( uri,
null );
ICertificateManager manager = Security.getCertificateManager();
for ( CertificateID id : certificateIDs ) {
  X509Certificate certificate = loader.fetchCertificate( id, null );
  if ( certificate != null ) {
    manager.addCertificate( certificate, CertTrust.AlwaysTrusted );
  }
}

There is in principle an even easier way but this is still experimental:

URI uri = new URI(
"http://dist.eugridpma.info/distribution/igtf/current/accredited/tgz/";
);
Configurator configurator = new Configurator();
configurator.addCertificateLoader(
  new GridPMACertificateLoader(),
  new URI[] { uri }
);
configurator.configure( null );

Note that with the configurator you can also set up VOs and projects in
one step!

Sorry for the inconvenience these changes caused on your side. Hope that
mail helps to circumnavigate your problems.

> PS: Congratulation for your slashdoting on wednesday: 

Yeah, our web page traffic was quite high yesterday ;-)

Cheers, Mathias


Back to the top