directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From elecha...@apache.org
Subject svn commit: r1447783 - in /directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption: AesCtsSha1Encryption.java CipherTextHandler.java DesCbcMd5Encryption.java
Date Tue, 19 Feb 2013 16:07:15 GMT
Author: elecharny
Date: Tue Feb 19 16:07:14 2013
New Revision: 1447783

URL: http://svn.apache.org/r1447783
Log:
Adding some logs

Modified:
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/AesCtsSha1Encryption.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
    directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/DesCbcMd5Encryption.java

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/AesCtsSha1Encryption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/AesCtsSha1Encryption.java?rev=1447783&r1=1447782&r2=1447783&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/AesCtsSha1Encryption.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/AesCtsSha1Encryption.java
Tue Feb 19 16:07:14 2013
@@ -31,10 +31,10 @@ import javax.crypto.spec.IvParameterSpec
 import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.directory.server.kerberos.shared.crypto.checksum.ChecksumEngine;
-import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
+import org.apache.directory.shared.kerberos.exceptions.KerberosException;
 
 
 /**

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java?rev=1447783&r1=1447782&r2=1447783&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/CipherTextHandler.java
Tue Feb 19 16:07:14 2013
@@ -28,11 +28,14 @@ import java.util.Map;
 
 import org.apache.directory.api.asn1.AbstractAsn1Object;
 import org.apache.directory.api.asn1.EncoderException;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
 import org.apache.directory.shared.kerberos.exceptions.KerberosException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -43,6 +46,9 @@ import org.apache.directory.shared.kerbe
  */
 public class CipherTextHandler
 {
+    /** The loggers for this class */
+    private static final Logger LOG_KRB = LoggerFactory.getLogger( Loggers.KERBEROS_LOG.getName()
);
+
     /** a map of the default encryption types to the encryption engine class names */
     private static final Map<EncryptionType, Class<? extends EncryptionEngine>>
DEFAULT_CIPHERS;
 
@@ -109,6 +115,7 @@ public class CipherTextHandler
      */
     public byte[] decrypt( EncryptionKey key, EncryptedData data, KeyUsage usage ) throws
KerberosException
     {
+        LOG_KRB.debug( "Decrypting data using key {} and usage {}", key.getKeyType(), usage
);
         EncryptionEngine engine = getEngine( key );
 
         return engine.getDecryptedData( key, data, usage );

Modified: directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/DesCbcMd5Encryption.java
URL: http://svn.apache.org/viewvc/directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/DesCbcMd5Encryption.java?rev=1447783&r1=1447782&r2=1447783&view=diff
==============================================================================
--- directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/DesCbcMd5Encryption.java
(original)
+++ directory/apacheds/trunk/kerberos-codec/src/main/java/org/apache/directory/server/kerberos/shared/crypto/encryption/DesCbcMd5Encryption.java
Tue Feb 19 16:07:14 2013
@@ -32,11 +32,14 @@ import javax.crypto.spec.IvParameterSpec
 import javax.crypto.spec.SecretKeySpec;
 
 import org.apache.directory.api.ldap.model.constants.LdapSecurityConstants;
-import org.apache.directory.shared.kerberos.exceptions.KerberosException;
+import org.apache.directory.api.ldap.model.constants.Loggers;
 import org.apache.directory.shared.kerberos.codec.types.EncryptionType;
 import org.apache.directory.shared.kerberos.components.EncryptedData;
 import org.apache.directory.shared.kerberos.components.EncryptionKey;
 import org.apache.directory.shared.kerberos.exceptions.ErrorType;
+import org.apache.directory.shared.kerberos.exceptions.KerberosException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 
 /**
@@ -44,6 +47,9 @@ import org.apache.directory.shared.kerbe
  */
 class DesCbcMd5Encryption extends EncryptionEngine
 {
+    /** The loggers for this class */
+    private static final Logger LOG_KRB = LoggerFactory.getLogger( Loggers.KERBEROS_LOG.getName()
);
+
     private static final byte[] iv = new byte[]
         { ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte ) 0x00, ( byte
) 0x00, ( byte ) 0x00,
             ( byte ) 0x00 };
@@ -83,6 +89,8 @@ class DesCbcMd5Encryption extends Encryp
 
     public byte[] getDecryptedData( EncryptionKey key, EncryptedData data, KeyUsage usage
) throws KerberosException
     {
+        LOG_KRB.debug( "Decrypting data using {}", key );
+
         // decrypt the data
         byte[] decryptedData = decrypt( data.getCipher(), key.getKeyValue() );
 



Mime
View raw message