Make ASN.1 code build without PKINIT support
authorGreg Hudson <ghudson@mit.edu>
Mon, 19 Sep 2011 14:52:16 +0000 (14:52 +0000)
committerGreg Hudson <ghudson@mit.edu>
Mon, 19 Sep 2011 14:52:16 +0000 (14:52 +0000)
Move asn1_decode_kdf_alg_id and asn1_decode_sequence_of_kdf_alg_id
inside the #ifndef DISABLE_PKINIT block; otherwise they reference a
nonexistent asn1_decode_kdf_alg_id_ptr when PKINIT is disabled.

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

src/lib/krb5/asn.1/asn1_k_decode.c

index db33241129996e063fe408c7adfcf1d68a0114d6..f1f4e734b6478b2effd847b4dd601ff261c5cd6f 100644 (file)
@@ -1691,6 +1691,29 @@ error_out:
     return retval;
 }
 
+asn1_error_code
+asn1_decode_kdf_alg_id( asn1buf *buf, krb5_octet_data *val)
+{
+    setup();
+    val->data = NULL;
+    { begin_structure();
+        get_lenfield(val->length,val->data,0,asn1_decode_oid);
+        end_structure();
+    }
+    return 0;
+error_out:
+    free(val->data);
+    return retval;
+}
+
+asn1_error_code
+asn1_decode_sequence_of_kdf_alg_id(asn1buf *buf,
+                                   krb5_octet_data ***val)
+{
+    decode_array_body(krb5_octet_data, asn1_decode_kdf_alg_id_ptr,
+                      krb5_free_octet_data);
+}
+
 #endif /* DISABLE_PKINIT */
 
 static void free_typed_data(void *dummy, krb5_typed_data *val)
@@ -1728,26 +1751,3 @@ asn1_decode_typed_data_ptr(asn1buf *buf, krb5_typed_data **valptr)
 {
     decode_ptr(krb5_typed_data *, asn1_decode_typed_data);
 }
-
-asn1_error_code
-asn1_decode_kdf_alg_id( asn1buf *buf, krb5_octet_data *val)
-{
-    setup();
-    val->data = NULL;
-    { begin_structure();
-        get_lenfield(val->length,val->data,0,asn1_decode_oid);
-        end_structure();
-    }
-    return 0;
-error_out:
-    free(val->data);
-    return retval;
-}
-
-asn1_error_code
-asn1_decode_sequence_of_kdf_alg_id(asn1buf *buf,
-                                   krb5_octet_data ***val)
-{
-    decode_array_body(krb5_octet_data, asn1_decode_kdf_alg_id_ptr,
-                      krb5_free_octet_data);
-}