From d79de070f17a3aaee91819a973a86629859b9b25 Mon Sep 17 00:00:00 2001 From: madhawap Date: Fri, 22 Jul 2016 10:58:50 +0530 Subject: [PATCH] fix to iOS device enrolment --- .../framework/authenticator/CertificateAuthenticator.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java index 067405622d..a402f18e7c 100644 --- a/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java +++ b/components/webapp-authenticator-framework/org.wso2.carbon.webapp.authenticator.framework/src/main/java/org/wso2/carbon/webapp/authenticator/framework/authenticator/CertificateAuthenticator.java @@ -29,7 +29,7 @@ public class CertificateAuthenticator implements WebappAuthenticator { private static final String CERTIFICATE_AUTHENTICATOR = "CertificateAuth"; private static final String MUTUAL_AUTH_HEADER = "mutual-auth-header"; private static final String PROXY_MUTUAL_AUTH_HEADER = "proxy-mutual-auth-header"; - private static final String CERTIFICATE_VERIFICATION_HEADER = "certificate-verification-header"; + private static final String CERTIFICATE_VERIFICATION_HEADER = "Mdm-Signature"; private static final String CLIENT_CERTIFICATE_ATTRIBUTE = "javax.servlet.request.X509Certificate"; @Override @@ -55,7 +55,6 @@ public class CertificateAuthenticator implements WebappAuthenticator { authenticationInfo.setStatus(Status.CONTINUE); } - String certVerificationHeader = request.getContext().findParameter(CERTIFICATE_VERIFICATION_HEADER); try { // When there is a load balancer terminating mutual SSL, it should pass this header along and // as the value of this header, the client certificate subject dn should be passed. @@ -78,7 +77,7 @@ public class CertificateAuthenticator implements WebappAuthenticator { } } else if (request.getHeader(CERTIFICATE_VERIFICATION_HEADER) != null) { - String certHeader = request.getHeader(certVerificationHeader); + String certHeader = request.getHeader(CERTIFICATE_VERIFICATION_HEADER); if (certHeader != null && AuthenticatorFrameworkDataHolder.getInstance().getCertificateManagementService(). verifySignature(certHeader)) {