From f3da8c40410e3bc2a1f567d2f01e497ca3e4f38d Mon Sep 17 00:00:00 2001 From: mcentner Date: Mon, 30 Aug 2010 12:24:33 +0000 Subject: Fixed Issue MOCCA-751 (http://jira.egovlabs.gv.at/browse/MOCCA-751). git-svn-id: https://joinup.ec.europa.eu/svn/mocca/trunk@806 8a26b1a7-26f0-462f-b9ef-d0e30c41f5a4 --- .../at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'bkucommon/src/main') diff --git a/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java b/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java index 204513e0..78fb8ed5 100644 --- a/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java +++ b/bkucommon/src/main/java/at/gv/egiz/bku/accesscontroller/AuthenticationClassifier.java @@ -34,6 +34,8 @@ public class AuthenticationClassifier { private static AuthenticationClassifier instance = new AuthenticationClassifier(); private final static String GOV_DOMAIN = ".gv.at"; + private final Logger log = LoggerFactory.getLogger(AuthenticationClassifier.class); + private AuthenticationClassifier() { } @@ -80,6 +82,11 @@ public class AuthenticationClassifier { URL url, X509Certificate cert) { if (isDataUrl) { if (url.getProtocol().equalsIgnoreCase("https")) { + if (cert == null) { + log.warn("HTTPS connection does not provide certificate. " + + "Therefore, assuming authentication class '" + PSEUDO_ANONYMOUS + "'."); + return PSEUDO_ANONYMOUS; + } if (isGovAgency(cert)) { return CERTIFIED_GOV_AGENCY; } -- cgit v1.2.3