directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject [22/27] directory-kerby git commit: DIRKRB-465 Avoid setting an invalid kvno (-1) when not available while encrypting authenticator
Date Tue, 24 Nov 2015 07:59:51 GMT
DIRKRB-465 Avoid setting an invalid kvno (-1) when not available while encrypting authenticator


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

Branch: refs/heads/pkinit-support
Commit: f7cff5922f321bbe39518af1ab5023a3d669b23d
Parents: f883b55
Author: Kai Zheng <kai.zheng@intel.com>
Authored: Sat Nov 21 08:57:05 2015 +0800
Committer: Kai Zheng <kai.zheng@intel.com>
Committed: Sat Nov 21 08:57:05 2015 +0800

----------------------------------------------------------------------
 .../org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/f7cff592/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
index 7c811ef..a5e18df 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/EncryptionHandler.java
@@ -204,7 +204,9 @@ public class EncryptionHandler {
         EncryptedData ed = new EncryptedData();
         ed.setCipher(cipher);
         ed.setEType(key.getKeyType());
-        ed.setKvno(key.getKvno());
+        if (key.getKvno() > 0) {
+            ed.setKvno(key.getKvno());
+        }
 
         return ed;
     }


Mime
View raw message