From 0ba7d8bd3f46902cbd5c4e8c7592a4fa36f5975e Mon Sep 17 00:00:00 2001 From: Greg Hudson Date: Mon, 19 Sep 2011 14:52:16 +0000 Subject: [PATCH] Make ASN.1 code build without PKINIT support 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 | 46 +++++++++++++++--------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/src/lib/krb5/asn.1/asn1_k_decode.c b/src/lib/krb5/asn.1/asn1_k_decode.c index db3324112..f1f4e734b 100644 --- a/src/lib/krb5/asn.1/asn1_k_decode.c +++ b/src/lib/krb5/asn.1/asn1_k_decode.c @@ -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); -} -- 2.26.2