Search in sources :

Example 1 with PKCS11Object

use of iaik.pkcs.pkcs11.objects.PKCS11Object in project xipki by xipki.

the class IaikP11Slot method getAllCertificateObjects.

private List<X509PublicKeyCertificate> getAllCertificateObjects(Session session) throws P11TokenException {
    X509PublicKeyCertificate template = new X509PublicKeyCertificate();
    List<Storage> tmpObjects = getObjects(session, template);
    List<X509PublicKeyCertificate> certs = new ArrayList<>(tmpObjects.size());
    for (PKCS11Object tmpObject : tmpObjects) {
        X509PublicKeyCertificate cert = (X509PublicKeyCertificate) tmpObject;
        certs.add(cert);
    }
    return certs;
}
Also used : Storage(iaik.pkcs.pkcs11.objects.Storage) PKCS11Object(iaik.pkcs.pkcs11.objects.PKCS11Object) ArrayList(java.util.ArrayList) X509PublicKeyCertificate(iaik.pkcs.pkcs11.objects.X509PublicKeyCertificate)

Aggregations

PKCS11Object (iaik.pkcs.pkcs11.objects.PKCS11Object)1 Storage (iaik.pkcs.pkcs11.objects.Storage)1 X509PublicKeyCertificate (iaik.pkcs.pkcs11.objects.X509PublicKeyCertificate)1 ArrayList (java.util.ArrayList)1