* decoding procedure, the *@STRUCTURE is deleted and set equal to
* %NULL.
*
+ * This function is deprecated. Use asn1_der_decoding() instead.
+ *
* Returns: %ASN1_SUCCESS if DER encoding OK, %ASN1_ELEMENT_NOT_FOUND
* if ELEMENT is %NULL or @elementName == NULL, and
* %ASN1_TAG_ERROR or %ASN1_DER_ERROR if the der encoding doesn't
#define ASN1_VERSION "3.5"
+#if defined(__GNUC__) && !defined(ASN1_INTERNAL_BUILD)
+# define _ASN1_GCC_VERSION (__GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__)
+# if _ASN1_GCC_VERSION >= 30100
+# define _ASN1_GCC_ATTR_DEPRECATED __attribute__ ((__deprecated__))
+# endif
+#endif
+
+#ifndef _ASN1_GCC_ATTR_DEPRECATED
+#define _ASN1_GCC_ATTR_DEPRECATED
+#endif
+
/*****************************************/
/* Errors returned by libtasn1 functions */
/*****************************************/
asn1_der_decoding (asn1_node * element, const void *ider,
int len, char *errorDescription);
+ /* Do not use. Use asn1_der_decoding() instead. */
extern ASN1_API int
asn1_der_decoding_element (asn1_node * structure,
const char *elementName,
const void *ider, int len,
- char *errorDescription);
+ char *errorDescription) _ASN1_GCC_ATTR_DEPRECATED;
extern ASN1_API int
asn1_der_decoding_startEnd (asn1_node element,
if (result != ASN1_SUCCESS || ret_len != tv[i].derlen
|| bit_len != tv[i].bitlen)
{
- fprintf (stderr, "asn1_get_bit_der iter %lu\n", (unsigned long) i);
+ fprintf (stderr, "asn1_get_bit_der iter %lu, err: %d\n", (unsigned long) i, result);
return 1;
}
}