From: Greg Hudson Date: Mon, 19 Sep 2011 14:52:16 +0000 (+0000) Subject: Make ASN.1 code build without PKINIT support X-Git-Tag: krb5-1.10-alpha1~164 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=0ba7d8bd3f46902cbd5c4e8c7592a4fa36f5975e;p=krb5.git 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 --- 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); -}