directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From plusplusjia...@apache.org
Subject directory-kerby git commit: Fix some issues.
Date Mon, 30 Nov 2015 03:00:12 GMT
Repository: directory-kerby
Updated Branches:
  refs/heads/pkinit-support 800e02fd5 -> ae595fb87


Fix some issues.


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

Branch: refs/heads/pkinit-support
Commit: ae595fb87609b2285c09e6fe5418f06092208aaa
Parents: 800e02f
Author: plusplusjiajia <jiajia.li@intel.com>
Authored: Mon Nov 30 11:06:45 2015 +0800
Committer: plusplusjiajia <jiajia.li@intel.com>
Committed: Mon Nov 30 11:06:45 2015 +0800

----------------------------------------------------------------------
 .../java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java    | 2 +-
 .../main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/ae595fb8/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java
----------------------------------------------------------------------
diff --git a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java
b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java
index d863780..a876b5d 100644
--- a/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java
+++ b/kerby-kerb/kerb-crypto/src/main/java/org/apache/kerby/kerberos/kerb/crypto/dh/DhServer.java
@@ -107,7 +107,7 @@ public class DhServer {
     public byte[] encrypt(byte[] clearText, KeyUsage usage) throws Exception {
         // Use the secret key to encrypt/decrypt data.
         EncTypeHandler encType = EncryptionHandler.getEncHandler(serverKey.getKeyType());
-        return encType.decrypt(clearText, serverKey.getKeyData(), usage.getValue());
+        return encType.encrypt(clearText, serverKey.getKeyData(), usage.getValue());
     }
 
     private byte[] concatenateBytes(byte[] array1, byte[] array2) {

http://git-wip-us.apache.org/repos/asf/directory-kerby/blob/ae595fb8/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
----------------------------------------------------------------------
diff --git a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
index 3b1eda2..15fd9de 100644
--- a/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
+++ b/kerby-pkix/src/main/java/org/apache/kerby/x509/type/SubjectPublicKeyInfo.java
@@ -51,7 +51,7 @@ public class SubjectPublicKeyInfo extends Asn1SequenceType {
     }
 
     public byte[] getSubjectPubKey() {
-        return getFieldAsOctets(SUBJECT_PUBLIC_KEY);
+        return getFieldAs(SUBJECT_PUBLIC_KEY, Asn1BitString.class).getValue();
     }
 
     public void setSubjectPubKey(byte[] subjectPubKey) {


Mime
View raw message