mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Merge branch 'master' of https://github.com/wso2/carbon-device-mgt
This commit is contained in:
commit
f200f37c80
@ -60,7 +60,7 @@ public class CertificateAuthenticator implements WebappAuthenticator {
|
||||
if (request.getHeader(MUTUAL_AUTH_HEADER) != null) {
|
||||
X509Certificate[] clientCertificate = (X509Certificate[]) request.
|
||||
getAttribute(CLIENT_CERTIFICATE_ATTRIBUTE);
|
||||
if (clientCertificate[0] != null) {
|
||||
if (clientCertificate != null && clientCertificate[0] != null) {
|
||||
CertificateResponse certificateResponse = AuthenticatorFrameworkDataHolder.getInstance().
|
||||
getCertificateManagementService().verifyPEMSignature(clientCertificate[0]);
|
||||
if (certificateResponse == null) {
|
||||
@ -86,6 +86,9 @@ public class CertificateAuthenticator implements WebappAuthenticator {
|
||||
"but the serial number is missing in the database.");
|
||||
}
|
||||
|
||||
} else {
|
||||
authenticationInfo.setStatus(Status.FAILURE);
|
||||
authenticationInfo.setMessage("No client certificate is present");
|
||||
}
|
||||
} else if (request.getHeader(CERTIFICATE_VERIFICATION_HEADER) != null) {
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user