directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [1/6] directory-kerby git commit: NPE fix for pkinit if the client principal is not known
Date Tue, 05 Jul 2016 14:07:24 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/trunk 054db32c9 -> 708456f04


NPE fix for pkinit if the client principal is not known


Project: http://git-wip-us.apache.org/repos/asf/directory-kerby/repo
Commit: http://git-wip-us.apache.org/repos/asf/directory-kerby/commit/4600ee35
Tree: http://git-wip-us.apache.org/repos/asf/directory-kerby/tree/4600ee35
Diff: http://git-wip-us.apache.org/repos/asf/directory-kerby/diff/4600ee35

Branch: refs/heads/trunk
Commit: 4600ee351ff44bb90e58710e5441a423e4a6bf71
Parents: 054db32
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Tue Jul 5 12:16:03 2016 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Tue Jul 5 12:16:03 2016 +0100

----------------------------------------------------------------------
 .../apache/kerby/kerberos/kerb/server/request/AsRequest.java | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/4600ee35/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
index 7cb7dbb..37e89bb 100644
--- a/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
+++ b/kerby-kerb/kerb-server/src/main/java/org/apache/kerby/kerberos/kerb/server/request/AsRequest.java
@@ -82,15 +82,15 @@ public class AsRequest extends KdcRequest {
         } else {
             clientEntry = getEntry(clientPrincipal.getName());
         }
-        if (isAnonymous()) {
-            clientEntry.setPrincipal(new PrincipalName(clientPrincipal.getName(), NameType.NT_WELLKNOWN));
-        }
-
         if (clientEntry == null) {
             LOG.warn("Can't get the client entry.");
             throw new KrbException(KrbErrorCode.KDC_ERR_C_PRINCIPAL_UNKNOWN);
         }
 
+        if (isAnonymous()) {
+            clientEntry.setPrincipal(new PrincipalName(clientPrincipal.getName(), NameType.NT_WELLKNOWN));
+        }
+
         setClientEntry(clientEntry);
 
         for (EncryptionType encType : request.getReqBody().getEtypes()) {


Mime
View raw message