From 4dd9552d015d097d63aac6f12cc339173d521761 Mon Sep 17 00:00:00 2001 From: tknall Date: Tue, 20 Mar 2007 10:07:54 +0000 Subject: prevent NPE git-svn-id: https://joinup.ec.europa.eu/svn/pdf-as/trunk@59 7b5415b0-85f9-ee4d-85bd-d5d0c3b42d1c --- src/main/java/at/knowcenter/wag/egov/egiz/ldap/api/LDAPAPIImpl.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/main/java/at/knowcenter/wag/egov') diff --git a/src/main/java/at/knowcenter/wag/egov/egiz/ldap/api/LDAPAPIImpl.java b/src/main/java/at/knowcenter/wag/egov/egiz/ldap/api/LDAPAPIImpl.java index 6f4ca72..d6f3e7c 100644 --- a/src/main/java/at/knowcenter/wag/egov/egiz/ldap/api/LDAPAPIImpl.java +++ b/src/main/java/at/knowcenter/wag/egov/egiz/ldap/api/LDAPAPIImpl.java @@ -109,7 +109,9 @@ public class LDAPAPIImpl implements LDAPAPI { try { LDAPClient client = this.ldapClientFactory.createClient(issuer); X509Certificate x509certificate = client.retrieveCertificate(new BigInteger(serialNumber)); - base64CertData = Util.Base64Encode(x509certificate.toByteArray()); + if (x509certificate != null) { + base64CertData = Util.Base64Encode(x509certificate.toByteArray()); + } } catch (LDAPException e) { this.log.error(e); } -- cgit v1.2.3