diff options
Diffstat (limited to 'id.server')
-rw-r--r-- | id.server/src/at/gv/egovernment/moa/id/auth/AuthenticationServer.java | 15 |
1 files changed, 7 insertions, 8 deletions
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 <VerifyXMLSignatureResponse> VerifyXMLSignatureResponseValidator.getInstance().validate( vsresp, - null, + null, VerifyXMLSignatureResponseValidator.CHECK_AUTH_BLOCK); // compares the public keys from the identityLink with the AuthBlock VerifyXMLSignatureResponseValidator.getInstance().validateCertificate( |