directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [1/4] directory-kerby git commit: Fix the KrbFlag issue.
Date Wed, 25 Nov 2015 01:50:06 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/pkinit-support 40c3b1a8b -> 8ba54fcf4


Fix the KrbFlag issue.


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

Branch: refs/heads/pkinit-support
Commit: 486567955990f9541a9480059a8639cba822b657
Parents: c7b42ba
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Tue Nov 24 17:56:57 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Tue Nov 24 17:56:57 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java    | 3 +--
 .../org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java   | 5 ++---
 .../java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java | 2 ++
 3 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/48656795/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
index ff45e6a..21317a9 100644
--- a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
+++ b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestAsReqCodec.java
@@ -70,8 +70,7 @@ public class TestAsReqCodec {
 
         KdcReqBody body = asReq.getReqBody();
         assertThat(body.getKdcOptions().getPadding()).isEqualTo(0);
-        //TODO
-//        assertThat(body.getKdcOptions().getValue()).isEqualTo(Arrays.copyOfRange(bytes,
126, 130));
+        assertThat(body.getKdcOptions().getValue()).isEqualTo(Arrays.copyOfRange(bytes, 126,
130));
         PrincipalName cName = body.getCname();
         assertThat(cName.getNameType()).isEqualTo(NameType.NT_PRINCIPAL);
         assertThat(cName.getName()).isEqualTo("des");

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/48656795/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java
b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java
index 14b74e8..de75355 100644
--- a/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java
+++ b/kerby-kerb/kerb-core-test/src/test/java/org/apache/kerby/kerberos/kerb/codec/TestTgsReqCodec.java
@@ -62,9 +62,8 @@ public class TestTgsReqCodec {
         //request body
         KdcReqBody body = tgsReq.getReqBody();
         assertThat(body.getKdcOptions().getPadding()).isEqualTo(0);
-        //TODO
-//        byte[] kdcOptionsValue = {64, (byte) 128, 0, 0};
-//        assertThat(body.getKdcOptions().getValue()).isEqualTo(kdcOptionsValue);
+        byte[] kdcOptionsValue = {64, (byte) 128, 0, 0};
+        assertThat(body.getKdcOptions().getValue()).isEqualTo(kdcOptionsValue);
 
         assertThat(body.getRealm()).isEqualTo("DENYDC.COM");
 

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/48656795/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
index 60db052..4dfd807 100644
--- a/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
+++ b/kerby-kerb/kerb-core/src/main/java/org/apache/kerby/kerberos/kerb/spec/base/KrbFlags.java
@@ -111,6 +111,8 @@ public class KrbFlags extends Asn1BitString {
     @Override
     protected void toValue() throws IOException {
 
+        super.toValue();
+
         if (getPadding() != 0 || getValue().length != 4) {
             throw new IOException("Bad bitstring decoded as invalid krb flags");
         }


Mime
View raw message