Skip to content
Snippets Groups Projects
Commit 8c427e96 authored by William Enright's avatar William Enright
Browse files

Fixed incorrect condition for user revocation status

Change-Id: Ib0b84399cebdd3af2d5a7ffc56e8398235769d4e
parent 941c868b
No related branches found
No related tags found
No related merge requests found
......@@ -58,7 +58,7 @@ public class UserServlet extends HttpServlet {
statementList.addStatement(st1);
User user = dataStore.getUserDao().getObjects(statementList).get(0);
if(certificateAuthority.getLatestCRL().get() != null) {
user.setRevoked(certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) == null);
user.setRevoked(certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) != null);
}
else user.setRevoked(false);
resp.getOutputStream().write(JsonStream.serialize(user).getBytes());
......
......@@ -77,7 +77,7 @@ public class UserServlet extends HttpServlet {
statementList.addStatement(st);
User user = dataStore.getUserDao().getObjects(statementList).get(0);
if(certificateAuthority.getLatestCRL().get() != null) {
user.setRevoked(certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) == null);
user.setRevoked(certificateAuthority.getLatestCRL().get().getRevokedCertificate(user.getCertificate().getSerialNumber()) != null);
}
else user.setRevoked(false);
resp.getOutputStream().write(JsonStream.serialize(user).getBytes());
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment