Make FAST changes build when pkinit is disabled
authorTom Yu <tlyu@mit.edu>
Tue, 31 Mar 2009 23:51:48 +0000 (23:51 +0000)
committerTom Yu <tlyu@mit.edu>
Tue, 31 Mar 2009 23:51:48 +0000 (23:51 +0000)
ticket: 6436

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

src/lib/krb5/asn.1/asn1_k_decode.c
src/lib/krb5/asn.1/asn1_k_encode.c
src/lib/krb5/asn.1/krb5_decode.c
src/lib/krb5/asn.1/krb5_encode.c

index c6857fe6024f8def3c31ed9674b14fc25abeae44..38fa1a22932bdf1829f7bbe2b56fc5fad89766bc 100644 (file)
@@ -2321,6 +2321,8 @@ error_out:
     return retval;
 }
 
+#endif /* DISABLE_PKINIT */
+
 static void free_typed_data(void *dummy, krb5_typed_data *val)
 {
     free(val->data);
@@ -2354,4 +2356,3 @@ asn1_decode_typed_data_ptr(asn1buf *buf, krb5_typed_data **valptr)
 {
     decode_ptr(krb5_typed_data *, asn1_decode_typed_data);
 }
-#endif /* DISABLE_PKINIT */
index 53ce7fee1d3a96565c6e3c1298ff01430272f243..efa75643d5d75af3fab0b5127889c46cb1072c9a 100644 (file)
@@ -1337,7 +1337,6 @@ MAKE_FULL_ENCODER(encode_krb5_fast_response, fast_response);
 
 
 
-#ifndef DISABLE_PKINIT
 /*
  * PKINIT
  */
@@ -1439,6 +1438,8 @@ MAKE_FULL_ENCODER(encode_krb5_fast_response, fast_response);
     return retval; }\
   sum += length; }
 
+#ifndef DISABLE_PKINIT
+
 /* Callable encoders for the types defined above, until the PKINIT
    encoders get converted.  */
 MAKE_ENCFN(asn1_encode_realm, realm_of_principal_data);
@@ -1819,6 +1820,8 @@ asn1_error_code asn1_encode_td_trusted_certifiers(asn1buf *buf, const krb5_exter
     asn1_cleanup();
 }
 
+#endif /* DISABLE_PKINIT */
+
 asn1_error_code asn1_encode_sequence_of_typed_data(asn1buf *buf, const krb5_typed_data **val, unsigned int *retlen)
 {
     asn1_setup();
@@ -1847,4 +1850,3 @@ asn1_error_code asn1_encode_typed_data(asn1buf *buf, const krb5_typed_data *val,
     asn1_makeseq();
     asn1_cleanup();
 }
-#endif /* DISABLE_PKINIT */
index 32d60915da920036dd32b9c92ddca292cd0725d8..9080d97ec77dc1f761df9d9d6d94637a57a3fc2f 100644 (file)
@@ -1296,16 +1296,6 @@ decode_krb5_reply_key_pack_draft9(const krb5_data *code,
     cleanup(free);
 }
 
-krb5_error_code
-decode_krb5_typed_data(const krb5_data *code, krb5_typed_data ***repptr)
-{
-    setup_buf_only(krb5_typed_data **);
-    retval = asn1_decode_sequence_of_typed_data(&buf, &rep);
-    if (retval) clean_return(retval);
-
-    cleanup(free);
-}
-
 krb5_error_code
 decode_krb5_td_trusted_certifiers(const krb5_data *code,
                                   krb5_external_principal_identifier ***repptr)
@@ -1328,3 +1318,13 @@ decode_krb5_td_dh_parameters(const krb5_data *code,
     cleanup(free);
 }
 #endif /* DISABLE_PKINIT */
+
+krb5_error_code
+decode_krb5_typed_data(const krb5_data *code, krb5_typed_data ***repptr)
+{
+    setup_buf_only(krb5_typed_data **);
+    retval = asn1_decode_sequence_of_typed_data(&buf, &rep);
+    if (retval) clean_return(retval);
+
+    cleanup(free);
+}
index a8ac06a54b680945d7b2790597d332343c09d4d3..5834e8ae8466a1006efae4af9528dcd449dda545 100644 (file)
@@ -34,7 +34,6 @@
 
 /**************** Macros (these save a lot of typing) ****************/
 
-#ifndef DISABLE_PKINIT
 /* setup() -- create and initialize bookkeeping variables
      retval: stores error codes returned from subroutines
      buf: the coding buffer
@@ -63,6 +62,7 @@ error:\
   *code = tmpcode;\
   return 0
 
+#ifndef DISABLE_PKINIT
 krb5_error_code encode_krb5_pa_pk_as_req(const krb5_pa_pk_as_req *rep, krb5_data **code)
 {
     krb5_setup();
@@ -153,21 +153,22 @@ krb5_error_code encode_krb5_td_trusted_certifiers(const krb5_external_principal_
     krb5_cleanup();
 }
 
-krb5_error_code encode_krb5_typed_data(const krb5_typed_data **rep, krb5_data **code)
+krb5_error_code encode_krb5_td_dh_parameters(const krb5_algorithm_identifier **rep, krb5_data **code)
 {
     krb5_setup();
-    retval = asn1_encode_sequence_of_typed_data(buf,rep,&length);
+    retval = asn1_encode_sequence_of_algorithm_identifier(buf,rep,&length);
     if (retval) goto error;
     sum += length;
     krb5_cleanup();
 }
+#endif /* DISABLE_PKINIT */
 
-krb5_error_code encode_krb5_td_dh_parameters(const krb5_algorithm_identifier **rep, krb5_data **code)
+krb5_error_code encode_krb5_typed_data(const krb5_typed_data **rep, krb5_data **code)
 {
     krb5_setup();
-    retval = asn1_encode_sequence_of_algorithm_identifier(buf,rep,&length);
+    retval = asn1_encode_sequence_of_typed_data(buf,rep,&length);
     if (retval) goto error;
     sum += length;
     krb5_cleanup();
 }
-#endif /* DISABLE_PKINIT */
+