* krb5_decode.c (decode_krb5_pa_enc_ts, decode_krb5_enc_data): Added
authorTheodore Tso <tytso@mit.edu>
Wed, 8 Nov 1995 07:45:12 +0000 (07:45 +0000)
committerTheodore Tso <tytso@mit.edu>
Wed, 8 Nov 1995 07:45:12 +0000 (07:45 +0000)
new functions.

* krb5_encode.c (encode_krb5_pa_enc_ts, encode_krb5_enc_data): Added
new functions.

KRB5-asn.py (PA-ENC-TS-ENC): Added new definition for the krb5_pa_enc_ts
structure.

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@7053 dc483132-0cff-0310-8789-dd5450dbe970

src/lib/krb5/asn.1/ChangeLog
src/lib/krb5/asn.1/KRB5-asn.py
src/lib/krb5/asn.1/krb5_decode.c
src/lib/krb5/asn.1/krb5_encode.c

index af163884f2d64aff0fc7375e004e622a23208707..8ddcdbe179fb97232871400593ce52ecf49052c1 100644 (file)
@@ -1,3 +1,14 @@
+Tue Oct 31 20:06:49 1995  Theodore Y. Ts'o  <tytso@dcl>
+
+       * krb5_decode.c (decode_krb5_pa_enc_ts, decode_krb5_enc_data):
+               Added new functions.
+
+       * krb5_encode.c (encode_krb5_pa_enc_ts, encode_krb5_enc_data):
+               Added new functions.
+
+       * KRB5-asn.py (PA-ENC-TS-ENC): Added new definition for the
+               krb5_pa_enc_ts structure.
+
 Fri Oct  6 22:03:01 1995  Theodore Y. Ts'o  <tytso@dcl>
 
        * Makefile.in: Remove ##DOS!include of config/windows.in.
index 989a214fef607d38be3187847698f90086da27ac..036d10deeca6e57fb36129235f8df0087b57c42a 100644 (file)
@@ -329,6 +329,11 @@ ETYPE-INFO-ENTRY ::= SEQUENCE {
 
 ETYPE-INFO ::= SEQUENCE OF ETYPE-INFO-ENTRY
 
+PA-ENC-TS-ENC   ::= SEQUENCE {
+       patimestamp[0]               KerberosTime, -- client's time
+       pausec[1]                    INTEGER OPTIONAL
+}
+
 -- These ASN.1 definitions are NOT part of the official Kerberos protocol... 
 
 -- New ASN.1 definitions for the kadmin protocol.
index 63d4bd9415b62d8c01c7ecc08cfa2aeed133f6b6..71d8c60aed04c57d41bb32ab63b311508528f38a 100644 (file)
@@ -727,6 +727,32 @@ krb5_error_code decode_krb5_etype_info(code, rep)
   cleanup_none();              /* we're not allocating anything here */
 }
 
-  
-    
-       
+krb5_error_code decode_krb5_enc_data(code, rep)
+     const krb5_data * code;
+     krb5_enc_data ** rep;
+{
+  setup_buf_only();
+  alloc_field(*rep,krb5_enc_data);
+
+  retval = asn1_decode_encrypted_data(&buf,*rep);
+  if(retval) clean_return(retval);
+
+  cleanup(free);
+}
+
+krb5_error_code decode_krb5_pa_enc_ts(code, rep)
+     const krb5_data * code;
+     krb5_pa_enc_ts ** rep;
+{
+  setup();
+  alloc_field(*rep,krb5_pa_enc_ts);
+  { begin_structure();
+    get_field((*rep)->patimestamp,0,asn1_decode_kerberos_time);
+    if (tagnum == 1) {
+       get_field((*rep)->pausec,1,asn1_decode_int);
+    } else
+       (*rep)->pausec = 0;
+    end_structure (); }
+  cleanup(free);
+}
+
index 3411c898d3f9cf3e6d51809fe45951cda198ae98..2a9d7a923759b0c09c194e1dc025c72126923604 100644 (file)
@@ -725,6 +725,37 @@ krb5_error_code encode_krb5_etype_info( rep, code)
   krb5_cleanup();
 }
 
+krb5_error_code encode_krb5_enc_data(rep, code)
+     const krb5_enc_data * rep;
+     krb5_data ** code;
+{
+  krb5_setup();
+
+  retval = asn1_encode_encrypted_data(buf,rep,&length);
+  if(retval) return retval;
+  sum += length;
+
+  krb5_cleanup();
+}
+
+krb5_error_code encode_krb5_pa_enc_ts(rep, code)
+     const krb5_pa_enc_ts * rep;
+     krb5_data ** code;
+{
+  krb5_setup();
+
+  /* pausec[1]                    INTEGER OPTIONAL */
+  if (rep->pausec)
+         krb5_addfield(rep->pausec,1,asn1_encode_integer);
+
+  /* patimestamp[0]               KerberosTime, -- client's time */
+  krb5_addfield(rep->patimestamp,0,asn1_encode_kerberos_time);
+
+  krb5_makeseq();
+
+  krb5_cleanup();
+}
+
 /* Sandia Additions */
 krb5_error_code encode_krb5_pwd_sequence( rep, code)
      const passwd_phrase_element * rep;