directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From erodrig...@apache.org
Subject svn commit: rev 55085 - in incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io: decoder encoder
Date Tue, 19 Oct 2004 18:51:10 GMT
Author: erodriguez
Date: Tue Oct 19 11:51:09 2004
New Revision: 55085

Modified:
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/decoder/KerberosMessageDecoder.java
   incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/encoder/KerberosMessageEncoder.java
Log:
Clarification of TransitedEncoding type, updates to ASN.1 codecs.

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/decoder/KerberosMessageDecoder.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/decoder/KerberosMessageDecoder.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/decoder/KerberosMessageDecoder.java
Tue Oct 19 11:51:09 2004
@@ -302,7 +302,7 @@
         contents[1]          OCTET STRING
     }*/
 	protected TransitedEncoding decodeTransitedEncoding(DERSequence sequence) {
-		int type = 0;
+		TransitedEncodingType type = TransitedEncodingType.NULL;
 		byte[] contents = null;
 
 		for (Enumeration e = sequence.getObjects(); e.hasMoreElements();) {
@@ -313,7 +313,7 @@
 			switch (tag) {
 				case 0:
 					DERInteger tag0 = (DERInteger) derObject;
-					type = tag0.getValue().intValue();
+					type = TransitedEncodingType.getTypeByOrdinal(tag0.getValue().intValue());
 					break;
 				case 1:
 					DEROctetString tag1 = (DEROctetString) derObject;

Modified: incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/encoder/KerberosMessageEncoder.java
==============================================================================
--- incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/encoder/KerberosMessageEncoder.java
(original)
+++ incubator/directory/kerberos/trunk/source/main/org/apache/kerberos/io/encoder/KerberosMessageEncoder.java
Tue Oct 19 11:51:09 2004
@@ -256,7 +256,7 @@
 		
 		ASN1EncodableVector vector = new ASN1EncodableVector();
 		
-		vector.add(new DERTaggedObject(0, new DERInteger(te.getType())));
+		vector.add(new DERTaggedObject(0, new DERInteger(te.getType().getOrdinal())));
 		vector.add(new DERTaggedObject(1, new DEROctetString(te.getContents())));
 		
 		return new DERSequence(vector);

Mime
View raw message