add encode_krb5_kdc_req_body, decode_krb5_kdc_req_body
authorJohn Kohl <jtkohl@mit.edu>
Wed, 10 Oct 1990 16:42:55 +0000 (16:42 +0000)
committerJohn Kohl <jtkohl@mit.edu>
Wed, 10 Oct 1990 16:42:55 +0000 (16:42 +0000)
fix up tgs/kdc/as stuff again

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

src/include/krb5/asn.1/encode.h

index dd6f748245cf27d4e8f7e28a37de4c0f614ce12e..6480cef29c5e9beb798be52950597e2a1a2d6a6b 100644 (file)
@@ -35,6 +35,26 @@ krb5_error_code krb5_decode_generic
                   krb5_pointer (* )PROTOTYPE ((krb5_pointer,int *)),
                   void (* )PROTOTYPE ((krb5_pointer ))));
 
+/* decode_arp.c */
+krb5_error_code decode_krb5_as_rep
+       PROTOTYPE((krb5_data *,
+                  krb5_kdc_rep **));
+
+/* decode_arq.c */
+krb5_error_code decode_krb5_as_req
+       PROTOTYPE((krb5_data *,
+                  krb5_kdc_req **));
+
+/* encode_arp.c */
+krb5_error_code encode_krb5_as_rep
+       PROTOTYPE((const krb5_kdc_rep *,
+                  krb5_data **));
+
+/* encode_arq.c */
+krb5_error_code encode_krb5_as_req
+       PROTOTYPE((const krb5_kdc_req *,
+                  krb5_data **));
+
 #define encode_krb5_authenticator(pauth, output) \
     krb5_encode_generic((krb5_pointer)pauth,  output, \
                   (encoder_func) encode_KRB5_Authenticator, \
@@ -68,28 +88,6 @@ krb5_error_code krb5_decode_generic
                   (translator_func) KRB5_EncTicketPart2krb5_enc_tkt_part, \
                   (free_func) free_KRB5_EncTicketPart)
 
-#define encode_krb5_as_req(req, output) \
-    krb5_encode_generic((krb5_pointer)req, output, \
-                  (encoder_func) encode_KRB5_AS__REQ, \
-                  (translator_func) krb5_kdc_req2KRB5_TGS__REQ, \
-                  (free_func) free_KRB5_AS__REQ)
-#define decode_krb5_as_req(req, output) \
-    krb5_decode_generic(req, (krb5_pointer *) output, \
-                  (decoder_func) decode_KRB5_AS__REQ, \
-                  (translator_func) KRB5_TGS__REQ2krb5_kdc_req, \
-                  (free_func) free_KRB5_AS__REQ)
-
-#define encode_krb5_as_rep(req, output) \
-    krb5_encode_generic((krb5_pointer)req, output, \
-                  (encoder_func) encode_KRB5_KDC__REP, \
-                  (translator_func) krb5_as_rep2KRB5_KDC__REP, \
-                  (free_func) free_KRB5_KDC__REP)
-#define decode_krb5_as_rep(req, output) \
-    krb5_decode_generic(req, (krb5_pointer *) output, \
-                  (decoder_func) decode_KRB5_KDC__REP, \
-                  (translator_func) KRB5_KDC__REP2krb5_as_rep, \
-                  (free_func) free_KRB5_KDC__REP)
-
 #define encode_krb5_enc_kdc_rep_part(req, output) \
     krb5_encode_generic((krb5_pointer)req, output, \
                   (encoder_func) encode_KRB5_EncTGSRepPart, \
@@ -103,14 +101,14 @@ krb5_error_code krb5_decode_generic
 
 #define encode_krb5_tgs_rep(req, output) \
     krb5_encode_generic((krb5_pointer)req, output, \
-                  (encoder_func) encode_KRB5_KDC__REP, \
+                  (encoder_func) encode_KRB5_TGS__REP, \
                   (translator_func) krb5_tgs_rep2KRB5_KDC__REP, \
-                  (free_func) free_KRB5_KDC__REP)
+                  (free_func) free_KRB5_TGS__REP)
 #define decode_krb5_tgs_rep(req, output) \
     krb5_decode_generic(req, (krb5_pointer *) output, \
-                  (decoder_func) decode_KRB5_KDC__REP, \
+                  (decoder_func) decode_KRB5_TGS__REP, \
                   (translator_func) KRB5_KDC__REP2krb5_tgs_rep, \
-                  (free_func) free_KRB5_KDC__REP)
+                  (free_func) free_KRB5_TGS__REP)
 
 #define encode_krb5_ap_req(req, output) \
     krb5_encode_generic((krb5_pointer)req,  output, \
@@ -156,6 +154,17 @@ krb5_error_code krb5_decode_generic
                   (translator_func) KRB5_TGS__REQ2krb5_kdc_req, \
                   (free_func) free_KRB5_TGS__REQ)
 
+#define encode_krb5_kdc_req_body(req, output) \
+    krb5_encode_generic((krb5_pointer)req, output, \
+                  (encoder_func) encode_KRB5_KDC__REQ__BODY, \
+                  (translator_func) krb5_kdc_req2KRB5_KDC__REQ__BODY, \
+                  (free_func) free_KRB5_KDC__REQ__BODY)
+#define decode_krb5_kdc_req_body(req, output) \
+    krb5_decode_generic(req, (krb5_pointer *) output, \
+                  (decoder_func) decode_KRB5_TGS__REQ__BODY, \
+                  (translator_func) KRB5_KDC__REQ__BODY2krb5_kdc_req, \
+                  (free_func) free_KRB5_KDC__REQ__BODY)
+
 #define encode_krb5_safe(req, output) \
     krb5_encode_generic((krb5_pointer)req, output, \
                   (encoder_func) encode_KRB5_KRB__SAFE, \