Managing CRL and ARL cache archives

See below for how to handle CRL and ARL cache archive files.

When working offline, make sure there is a CRL cache archive available because CRLs are not available offline.

Logging the user

Log in the user.

User user = new User();
FilenameProfileReader reader = new FilenameProfileReader(epf);
user.login(reader, new SecureStringBuffer(pw));

Creating the CRL and the ARL

Create an empty CRL and ARL cache archive file.

ArchiveCRLCache cache = new
ArchiveCRLCache(user.getCertVerifier());

Add the CRL and ARL cache file specified by the InputStream argument.

cache.parse(new FileInputStream(crl));
cache.parse(new FileInputStream(arl));

Writing the cache archives to file

Write the cache archive files to a specified output stream.

cache.write(new FileOutputStream(crl),ArchiveCRLCache.CRL_ONLY);
cache.write(new FileOutputStream(arl),ArchiveCRLCache.ARL_ONLY);
write(OutputStream os, int writeMode)