X509Certificate cert = null;
try {
if (x509Data.containsCertificate()) {
cert = (x509Data.itemCertificate(0)).getX509Certificate();
} else if (x509Data.containsSKI()) {
return secEnv.getPrivateKey(null, x509Data.itemSKI(0).getSKIBytes());
} else if (x509Data.containsIssuerSerial()) {
return secEnv.getPrivateKey(null,
x509Data.itemIssuerSerial(0).getSerialNumber(),
x509Data.itemIssuerSerial(0).getIssuerName());
} else {