From c26f9b834e578100417ff1c8a294cec84da8d155 Mon Sep 17 00:00:00 2001 From: rudolf Date: Mon, 17 Jan 2005 10:21:48 +0000 Subject: Fixed encoding for displaying BKU values in SelectBKU Servlet if option HTMLSelect is used git-svn-id: https://joinup.ec.europa.eu/svn/moa-idspss/trunk@207 d688527b-c9ab-4aba-bd8d-4036d912da1d --- .../gv/egovernment/moa/id/auth/AuthenticationServer.java | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'id.server/src') diff --git a/id.server/src/at/gv/egovernment/moa/id/auth/AuthenticationServer.java b/id.server/src/at/gv/egovernment/moa/id/auth/AuthenticationServer.java index a39d60fa4..4c44e807c 100644 --- a/id.server/src/at/gv/egovernment/moa/id/auth/AuthenticationServer.java +++ b/id.server/src/at/gv/egovernment/moa/id/auth/AuthenticationServer.java @@ -50,6 +50,7 @@ import at.gv.egovernment.moa.id.config.ConnectionParameter; import at.gv.egovernment.moa.id.config.auth.AuthConfigurationProvider; import at.gv.egovernment.moa.id.config.auth.OAAuthParameter; import at.gv.egovernment.moa.id.data.AuthenticationData; +import at.gv.egovernment.moa.id.util.HTTPUtils; import at.gv.egovernment.moa.id.util.MOAIDMessageProvider; import at.gv.egovernment.moa.id.util.Random; import at.gv.egovernment.moa.id.util.SSLUtils; @@ -172,10 +173,8 @@ public class AuthenticationServer implements MOAIDAuthConstants { String bkuSelectTag; try { //TODO full Plattform Support, test with different Templates - //bkuSelectionTag is encoded in ISO-8859-1. must be converted to UTF-8 - bkuSelectTag = new String( readBKUSelectTag(AuthConfigurationProvider.getInstance(), bkuConnParam), "ISO-8859-1"); - byte buff [] = bkuSelectTag.getBytes("UTF-8"); - bkuSelectTag = new String(buff); + + bkuSelectTag = readBKUSelectTag(AuthConfigurationProvider.getInstance(), bkuConnParam); } catch (Throwable ex) { throw new AuthenticationException( "auth.03", @@ -202,19 +201,19 @@ public class AuthenticationServer implements MOAIDAuthConstants { * Method readBKUSelectTag. * @param conf the ConfigurationProvider * @param connParam the ConnectionParameter for that connection - * @return byte [] + * @return String * @throws ConfigurationException on config-errors * @throws PKIException on PKI errors * @throws IOException on any data error * @throws GeneralSecurityException on security errors */ - private byte [] readBKUSelectTag(ConfigurationProvider conf, ConnectionParameter connParam) + private String readBKUSelectTag(ConfigurationProvider conf, ConnectionParameter connParam) throws ConfigurationException, PKIException, IOException, GeneralSecurityException { if (connParam.isHTTPSURL()) return SSLUtils.readHttpsURL(conf, connParam); else - return FileUtils.readURL(connParam.getUrl()); + return HTTPUtils.readHttpURL(connParam.getUrl()); } /** * Processes the beginning of an authentication session. @@ -474,7 +473,7 @@ public class AuthenticationServer implements MOAIDAuthConstants { // validates the VerifyXMLSignatureResponseValidator.getInstance().validate( vsresp, - null, + null, VerifyXMLSignatureResponseValidator.CHECK_AUTH_BLOCK); // compares the public keys from the identityLink with the AuthBlock VerifyXMLSignatureResponseValidator.getInstance().validateCertificate( -- cgit v1.2.3