The cgcc review no longer needs -Wno-non-pointer-null.
OCTET_STRING_encode_der,
OCTET_STRING_encode_json,
ANY_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_ANY = {
"ANY",
"ANY",
&asn_OP_ANY,
- 0, 0, 0, 0,
- { 0, 0, asn_generic_no_constraint }, /* No constraints */
- 0, 0, /* No members */
+ NULL, 0, NULL, 0,
+ { NULL, NULL, asn_generic_no_constraint }, /* No constraints */
+ NULL, 0, /* No members */
&asn_SPC_ANY_specs,
};
}
arg.offset = arg.size = 0;
- arg.buffer = 0;
+ arg.buffer = NULL;
erval = der_encode(td, sptr, ANY__consume_bytes, &arg);
if(erval.encoded == -1) {
if(!td || !sptr) {
errno = EINVAL;
- return 0;
+ return NULL;
}
memset(&tmp, 0, sizeof(tmp));
- if(ANY_fromType(&tmp, td, sptr)) return 0;
+ if(ANY_fromType(&tmp, td, sptr)) return NULL;
st = (ANY_t *)CALLOC(1, sizeof(ANY_t));
if(st) {
return st;
} else {
FREEMEM(tmp.buf);
- return 0;
+ return NULL;
}
}
int
ANY_to_type(ANY_t *st, asn_TYPE_descriptor_t *td, void **struct_ptr) {
asn_dec_rval_t rval;
- void *newst = 0;
+ void *newst = NULL;
if(!st || !td || !struct_ptr) {
errno = EINVAL;
return -1;
}
- if(st->buf == 0) {
+ if(st->buf == NULL) {
/* Nothing to convert, make it empty. */
*struct_ptr = (void *)0;
return 0;
asn_DEF_ASId_tags_1, /* Same as above */
sizeof(asn_DEF_ASId_tags_1)
/sizeof(asn_DEF_ASId_tags_1[0]), /* 1 */
- { 0, 0, INTEGER_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, INTEGER_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_ASId,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"id"
},
{ ATF_NOFLAGS, 0, offsetof(struct ASIdOrRange, choice.range),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ASRange,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"range"
},
};
"ASIdOrRange",
"ASIdOrRange",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_ASIdOrRange_1,
2, /* Elements count */
&asn_SPC_ASIdOrRange_specs_1 /* Additional specs */
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_ASIdOrRange,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_asIdsOrRanges_tags_3, /* Same as above */
sizeof(asn_DEF_asIdsOrRanges_tags_3)
/sizeof(asn_DEF_asIdsOrRanges_tags_3[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_asIdsOrRanges_3,
1, /* Single element */
&asn_SPC_asIdsOrRanges_specs_3 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
0,
&asn_DEF_NULL,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"inherit"
},
{ ATF_NOFLAGS, 0, offsetof(struct ASIdentifierChoice, choice.asIdsOrRanges),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_asIdsOrRanges_3,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"asIdsOrRanges"
},
};
"ASIdentifierChoice",
"ASIdentifierChoice",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_ASIdentifierChoice_1,
2, /* Elements count */
&asn_SPC_ASIdentifierChoice_specs_1 /* Additional specs */
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ASIdentifierChoice,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"asnum"
},
{ ATF_POINTER, 1, offsetof(struct ASIdentifiers, rdi),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ASIdentifierChoice,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"rdi"
},
};
asn_DEF_ASIdentifiers_tags_1, /* Same as above */
sizeof(asn_DEF_ASIdentifiers_tags_1)
/sizeof(asn_DEF_ASIdentifiers_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_ASIdentifiers_1,
2, /* Elements count */
&asn_SPC_ASIdentifiers_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_ASId,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"min"
},
{ ATF_NOFLAGS, 0, offsetof(struct ASRange, max),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_ASId,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"max"
},
};
asn_DEF_ASRange_tags_1, /* Same as above */
sizeof(asn_DEF_ASRange_tags_1)
/sizeof(asn_DEF_ASRange_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_ASRange_1,
2, /* Elements count */
&asn_SPC_ASRange_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_OBJECT_IDENTIFIER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"algorithm"
},
{ ATF_ANY_TYPE | ATF_POINTER, 1, offsetof(struct AlgorithmIdentifier, parameters),
-1 /* Ambiguous tag (ANY?) */,
0,
&asn_DEF_ANY,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"parameters"
},
};
asn_DEF_AlgorithmIdentifier_tags_1, /* Same as above */
sizeof(asn_DEF_AlgorithmIdentifier_tags_1)
/sizeof(asn_DEF_AlgorithmIdentifier_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_AlgorithmIdentifier_1,
2, /* Elements count */
&asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */
asn_DEF_AttributeType_tags_1, /* Same as above */
sizeof(asn_DEF_AttributeType_tags_1)
/sizeof(asn_DEF_AttributeType_tags_1[0]), /* 1 */
- { 0, 0, OBJECT_IDENTIFIER_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, OBJECT_IDENTIFIER_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_AttributeType,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"type"
},
{ ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct AttributeTypeAndValue, value),
-1 /* Ambiguous tag (ANY?) */,
0,
&asn_DEF_AttributeValue,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"value"
},
};
asn_DEF_AttributeTypeAndValue_tags_1, /* Same as above */
sizeof(asn_DEF_AttributeTypeAndValue_tags_1)
/sizeof(asn_DEF_AttributeTypeAndValue_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_AttributeTypeAndValue_1,
2, /* Elements count */
&asn_SPC_AttributeTypeAndValue_specs_1 /* Additional specs */
"AttributeValue",
"AttributeValue",
&asn_OP_ANY,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { 0, 0, ANY_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, ANY_constraint },
+ NULL, 0, /* No members */
&asn_SPC_ANY_specs /* Additional specs */
};
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
OCTET_STRING_encode_json, /* Implemented in terms of OCTET STRING */
BIT_STRING_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_BIT_STRING = {
"BIT STRING",
asn_DEF_BIT_STRING_tags, /* Same as above */
sizeof(asn_DEF_BIT_STRING_tags)
/ sizeof(asn_DEF_BIT_STRING_tags[0]),
- { 0, 0, BIT_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, BIT_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_BIT_STRING_specs
};
BOOLEAN_encode_der,
BOOLEAN_encode_json,
BOOLEAN_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_BOOLEAN = {
"BOOLEAN",
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
asn_DEF_BOOLEAN_tags, /* Same as above */
sizeof(asn_DEF_BOOLEAN_tags) / sizeof(asn_DEF_BOOLEAN_tags[0]),
- { 0, 0, asn_generic_no_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, asn_generic_no_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
/*
/*
* Check tags.
*/
- rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size,
- tag_mode, 0, &length, 0);
+ rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size,
+ tag_mode, 0, &length, NULL);
if(rval.code != RC_OK)
return rval;
BOOLEAN_encode_xer(const asn_TYPE_descriptor_t *td, const void *sptr,
int ilevel, int flags, asn_app_consume_bytes_f *cb, void *app_key) {
const BOOLEAN_t *st = (const BOOLEAN_t *)sptr;
- asn_enc_rval_t er = {0, 0, 0};
+ asn_enc_rval_t er = {0, NULL, NULL};
(void)ilevel;
(void)flags;
asn_DEF_BinarySigningTime_tags_1, /* Same as above */
sizeof(asn_DEF_BinarySigningTime_tags_1)
/sizeof(asn_DEF_BinarySigningTime_tags_1[0]), /* 1 */
- { NULL, 0, BinarySigningTime_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, BinarySigningTime_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
asn_DEF_BinaryTime_tags_1, /* Same as above */
sizeof(asn_DEF_BinaryTime_tags_1)
/sizeof(asn_DEF_BinaryTime_tags_1[0]), /* 1 */
- { NULL, 0, BinaryTime_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, BinaryTime_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
#include "asn1/asn1c/SigningTime.h"
#include "json_util.h"
-json_t *
+static json_t *
CMSAttribute_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
{
struct CMSAttribute const *cattr = sptr;
return NULL;
}
-asn_TYPE_operation_t asn_OP_CMSAttribute = {
+static asn_TYPE_operation_t asn_OP_CMSAttribute = {
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_encode_der,
CMSAttribute_encode_json,
SEQUENCE_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
static asn_TYPE_member_t asn_MBR_attrValues_3[] = {
-1 /* Ambiguous tag (ANY?) */,
0,
&asn_DEF_CMSAttributeValue,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_attrValues_tags_3, /* Same as above */
sizeof(asn_DEF_attrValues_tags_3)
/sizeof(asn_DEF_attrValues_tags_3[0]), /* 1 */
- { 0, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_attrValues_3,
1, /* Single element */
&asn_SPC_attrValues_specs_3 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_OBJECT_IDENTIFIER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"attrType"
},
{ ATF_NOFLAGS, 0, offsetof(struct CMSAttribute, attrValues),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_attrValues_3,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"attrValues"
},
};
asn_DEF_CMSAttribute_tags_1, /* Same as above */
sizeof(asn_DEF_CMSAttribute_tags_1)
/sizeof(asn_DEF_CMSAttribute_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_CMSAttribute_1,
2, /* Elements count */
&asn_SPC_CMSAttribute_specs_1 /* Additional specs */
"CMSAttributeValue",
"CMSAttributeValue",
&asn_OP_ANY,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { 0, 0, ANY_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, ANY_constraint },
+ NULL, 0, /* No members */
&asn_SPC_ANY_specs /* Additional specs */
};
asn_DEF_CMSSubjectKeyIdentifier_tags_1, /* Same as above */
sizeof(asn_DEF_CMSSubjectKeyIdentifier_tags_1)
/sizeof(asn_DEF_CMSSubjectKeyIdentifier_tags_1[0]), /* 1 */
- { 0, 0, OCTET_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, OCTET_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};
asn_DEF_CMSVersion_tags_1, /* Same as above */
sizeof(asn_DEF_CMSVersion_tags_1)
/sizeof(asn_DEF_CMSVersion_tags_1[0]), /* 1 */
- { 0, 0, INTEGER_constraint },
- 0, 0, /* Defined elsewhere */
- 0 /* No specifics */
+ { NULL, NULL, INTEGER_constraint },
+ NULL, 0, /* Defined elsewhere */
+ NULL /* No specifics */
};
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_TBSCertList,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"tbsCertList"
},
{ ATF_NOFLAGS, 0, offsetof(struct CertificateList, signatureAlgorithm),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_AlgorithmIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signatureAlgorithm"
},
{ ATF_NOFLAGS, 0, offsetof(struct CertificateList, signature),
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_BIT_STRING,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signature"
},
};
asn_DEF_CertificateList_tags_1, /* Same as above */
sizeof(asn_DEF_CertificateList_tags_1)
/sizeof(asn_DEF_CertificateList_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_CertificateList_1,
3, /* Elements count */
&asn_SPC_CertificateList_specs_1 /* Additional specs */
asn_DEF_CertificateSerialNumber_tags_1, /* Same as above */
sizeof(asn_DEF_CertificateSerialNumber_tags_1)
/sizeof(asn_DEF_CertificateSerialNumber_tags_1[0]), /* 1 */
- { 0, 0, INTEGER_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, INTEGER_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
return NULL;
}
-asn_TYPE_operation_t asn_OP_CertificateSet = {
+static asn_TYPE_operation_t asn_OP_CertificateSet = {
SET_OF_free,
SET_OF_print,
SET_OF_compare,
SET_OF_encode_der,
CertificateSet_encode_json,
SET_OF_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_member_t asn_MBR_CertificateSet_1[] = {
-1 /* Ambiguous tag (ANY?) */,
0,
&asn_DEF_ANY,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_CertificateSet_tags_1, /* Same as above */
sizeof(asn_DEF_CertificateSet_tags_1)
/sizeof(asn_DEF_CertificateSet_tags_1[0]), /* 1 */
- { 0, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_CertificateSet_1,
1, /* Single element */
&asn_SPC_CertificateSet_specs_1 /* Additional specs */
#include "asn1/asn1c/SignedData.h"
#include "json_util.h"
-json_t *
+static json_t *
ContentInfo_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
{
struct ContentInfo const *ci = sptr;
return NULL;
}
-asn_TYPE_operation_t asn_OP_ContentInfo = {
+static asn_TYPE_operation_t asn_OP_ContentInfo = {
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_encode_der,
ContentInfo_encode_json,
SEQUENCE_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
static asn_TYPE_member_t asn_MBR_ContentInfo_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_ContentType,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"contentType"
},
{ ATF_NOFLAGS, 0, offsetof(struct ContentInfo, content),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ANY,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"content"
},
};
asn_DEF_ContentInfo_tags_1, /* Same as above */
sizeof(asn_DEF_ContentInfo_tags_1)
/sizeof(asn_DEF_ContentInfo_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_ContentInfo_1,
2, /* Elements count */
&asn_SPC_ContentInfo_specs_1 /* Additional specs */
asn_DEF_ContentType_tags_1, /* Same as above */
sizeof(asn_DEF_ContentType_tags_1)
/sizeof(asn_DEF_ContentType_tags_1[0]), /* 1 */
- { 0, 0, OBJECT_IDENTIFIER_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, OBJECT_IDENTIFIER_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
asn_DEF_ContentTypePKCS7_tags_1, /* Same as above */
sizeof(asn_DEF_ContentTypePKCS7_tags_1)
/sizeof(asn_DEF_ContentTypePKCS7_tags_1[0]), /* 1 */
- { 0, 0, OCTET_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, OCTET_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};
asn_DEF_Countersignature_tags_1, /* Same as above */
sizeof(asn_DEF_Countersignature_tags_1)
/sizeof(asn_DEF_Countersignature_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_SignerInfo_1,
7, /* Elements count */
&asn_SPC_SignerInfo_specs_1 /* Additional specs */
asn_DEF_DigestAlgorithmIdentifier_tags_1, /* Same as above */
sizeof(asn_DEF_DigestAlgorithmIdentifier_tags_1)
/sizeof(asn_DEF_DigestAlgorithmIdentifier_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_AlgorithmIdentifier_1,
2, /* Elements count */
&asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_DigestAlgorithmIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_DigestAlgorithmIdentifiers_tags_1, /* Same as above */
sizeof(asn_DEF_DigestAlgorithmIdentifiers_tags_1)
/sizeof(asn_DEF_DigestAlgorithmIdentifiers_tags_1[0]), /* 1 */
- { 0, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_DigestAlgorithmIdentifiers_1,
1, /* Single element */
&asn_SPC_DigestAlgorithmIdentifiers_specs_1 /* Additional specs */
asn_DEF_DistinguishedName_tags_1, /* Same as above */
sizeof(asn_DEF_DistinguishedName_tags_1)
/sizeof(asn_DEF_DistinguishedName_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_RDNSequence_1,
1, /* Single element */
&asn_SPC_RDNSequence_specs_1 /* Additional specs */
#include "json_util.h"
#include "nid.h"
-json_t *
+static json_t *
EncapsulatedContentInfo_encode_json(const asn_TYPE_descriptor_t *td,
const void *sptr)
{
return NULL;
}
-asn_TYPE_operation_t asn_OP_EncapsulatedContentInfo = {
+static asn_TYPE_operation_t asn_OP_EncapsulatedContentInfo = {
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_encode_der,
EncapsulatedContentInfo_encode_json,
SEQUENCE_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_member_t asn_MBR_EncapsulatedContentInfo_1[] = {
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_ContentType,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"eContentType"
},
{ ATF_POINTER, 1, offsetof(struct EncapsulatedContentInfo, eContent),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_OCTET_STRING,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"eContent"
},
};
asn_DEF_EncapsulatedContentInfo_tags_1, /* Same as above */
sizeof(asn_DEF_EncapsulatedContentInfo_tags_1)
/sizeof(asn_DEF_EncapsulatedContentInfo_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_EncapsulatedContentInfo_1,
2, /* Elements count */
&asn_SPC_EncapsulatedContentInfo_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_ContentType,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"eContentType"
},
{ ATF_POINTER, 1, offsetof(struct EncapsulatedContentInfoPKCS7, eContent),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_ANY,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"eContent"
},
};
asn_DEF_EncapsulatedContentInfoPKCS7_tags_1, /* Same as above */
sizeof(asn_DEF_EncapsulatedContentInfoPKCS7_tags_1)
/sizeof(asn_DEF_EncapsulatedContentInfoPKCS7_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_EncapsulatedContentInfoPKCS7_1,
2, /* Elements count */
&asn_SPC_EncapsulatedContentInfoPKCS7_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_OBJECT_IDENTIFIER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"extnID"
},
{ ATF_NOFLAGS, 1, offsetof(struct Extension, critical),
(ASN_TAG_CLASS_UNIVERSAL | (1 << 2)),
0,
&asn_DEF_BOOLEAN,
- 0,
- { 0, 0, 0 },
+ NULL,
+ { NULL, NULL, NULL },
&asn_DFL_3_cmp_0, /* Compare DEFAULT 0 */
&asn_DFL_3_set_0, /* Set DEFAULT 0 */
"critical"
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_OCTET_STRING,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"extnValue"
},
};
asn_DEF_Extension_tags_1, /* Same as above */
sizeof(asn_DEF_Extension_tags_1)
/sizeof(asn_DEF_Extension_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_Extension_1,
3, /* Elements count */
&asn_SPC_Extension_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_Extension,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_Extensions_tags_1, /* Same as above */
sizeof(asn_DEF_Extensions_tags_1)
/sizeof(asn_DEF_Extensions_tags_1[0]), /* 1 */
- { NULL, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_Extensions_1,
1, /* Single element */
&asn_SPC_Extensions_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (22 << 2)),
0,
&asn_DEF_IA5String,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"file"
},
{ ATF_NOFLAGS, 0, offsetof(struct FileAndHash, hash),
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_BIT_STRING,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"hash"
},
};
asn_DEF_FileAndHash_tags_1, /* Same as above */
sizeof(asn_DEF_FileAndHash_tags_1)
/sizeof(asn_DEF_FileAndHash_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_FileAndHash_1,
2, /* Elements count */
&asn_SPC_FileAndHash_specs_1 /* Additional specs */
GeneralizedTime_encode_der,
GeneralizedTime_encode_json,
GeneralizedTime_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_GeneralizedTime = {
"GeneralizedTime",
asn_DEF_GeneralizedTime_tags,
sizeof(asn_DEF_GeneralizedTime_tags)
/ sizeof(asn_DEF_GeneralizedTime_tags[0]),
- { 0, NULL, GeneralizedTime_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, GeneralizedTime_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
#endif /* ASN___INTERNAL_TEST_MODE */
ASN__ENCODE_FAILED;
}
- st = asn_time2GT_frac(0, &tm, fv, fd); /* Save time */
+ st = asn_time2GT_frac(NULL, &tm, fv, fd); /* Save time */
if(!st) ASN__ENCODE_FAILED; /* Memory allocation failure. */
erval = OCTET_STRING_encode_der(td, st, tag_mode, tag, cb, app_key);
&fv, &fd, &tm) != 0)
ASN__ENCODE_FAILED;
- gt = asn_time2GT_frac(0, &tm, fv, fd);
+ gt = asn_time2GT_frac(NULL, &tm, fv, fd);
if(!gt) ASN__ENCODE_FAILED;
rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags,
int
asn_GT2time(const GeneralizedTime_t *st, struct tm *ret_tm) {
- return asn_GT2time_frac(st, 0, 0, ret_tm);
+ return asn_GT2time_frac(st, NULL, NULL, ret_tm);
}
time_t
if(frac_value)
tloc = asn_GT2time_frac(st, &fv, &fd, ret_tm);
else
- return asn_GT2time_frac(st, 0, 0, ret_tm);
+ return asn_GT2time_frac(st, NULL, NULL, ret_tm);
if(fd == 0 || frac_digits <= 0) {
*frac_value = 0;
} else {
/* Check arguments */
if(!tm) {
errno = EINVAL;
- return 0;
+ return NULL;
}
/* Pre-allocate a buffer of sufficient yet small length */
buf = (char *)MALLOC(buf_size);
- if(!buf) return 0;
+ if(!buf) return NULL;
size = snprintf(buf, buf_size, "%04d%02d%02d%02d%02d%02d",
tm->tm_year + 1900,
/* Could be assert(size == 14); */
FREEMEM(buf);
errno = EINVAL;
- return 0;
+ return NULL;
}
p = buf + size;
do {
int digit = frac_value / fbase;
- if(digit > 9) { z = 0; break; }
+ if(digit > 9) { z = NULL; break; }
*z++ = digit + 0x30;
frac_value %= fbase;
fbase /= 10;
FREEMEM(opt_gt->buf);
} else {
opt_gt = (GeneralizedTime_t *)CALLOC(1, sizeof *opt_gt);
- if(!opt_gt) { FREEMEM(buf); return 0; }
+ if(!opt_gt) { FREEMEM(buf); return NULL; }
}
opt_gt->buf = (unsigned char *)buf;
time_t at, bt;
errno = EPERM;
- at = asn_GT2time_frac(a, &afrac_value, &afrac_digits, 0);
+ at = asn_GT2time_frac(a, &afrac_value, &afrac_digits, NULL);
aerr = errno;
errno = EPERM;
- bt = asn_GT2time_frac(b, &bfrac_value, &bfrac_digits, 0);
+ bt = asn_GT2time_frac(b, &bfrac_value, &bfrac_digits, NULL);
berr = errno;
if(at == -1 && aerr != EPERM) {
OCTET_STRING_encode_der,
OCTET_STRING_encode_json_utf8,
OCTET_STRING_encode_xer_utf8,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_IA5String = {
"IA5String",
asn_DEF_IA5String_tags,
sizeof(asn_DEF_IA5String_tags)
/ sizeof(asn_DEF_IA5String_tags[0]),
- { 0, NULL, IA5String_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, IA5String_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
int
INTEGER_encode_der,
INTEGER_encode_json,
INTEGER_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_INTEGER = {
"INTEGER",
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
asn_DEF_INTEGER_tags, /* Same as above */
sizeof(asn_DEF_INTEGER_tags) / sizeof(asn_DEF_INTEGER_tags[0]),
- { 0, 0, asn_generic_no_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, asn_generic_no_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
/*
if(ret == 0) {
const asn_INTEGER_enum_map_t *el;
el = (value >= 0 || !specs || !specs->field_unsigned)
- ? INTEGER_map_value2enum(specs, value) : 0;
+ ? INTEGER_map_value2enum(specs, value) : NULL;
if(el) {
if(plainOrXER == 0)
return asn__format_to_callback(cb, app_key,
const asn_INTEGER_enum_map_t *
INTEGER_map_value2enum(const asn_INTEGER_specifics_t *specs, long value) {
int count = specs ? specs->map_count : 0;
- if(!count) return 0;
+ if(!count) return NULL;
return (asn_INTEGER_enum_map_t *)bsearch(&value, specs->value2enum,
count, sizeof(specs->value2enum[0]),
INTEGER__compar_value2enum);
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_IPAddressFamily,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_IPAddrBlocks_tags_1, /* Same as above */
sizeof(asn_DEF_IPAddrBlocks_tags_1)
/sizeof(asn_DEF_IPAddrBlocks_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_IPAddrBlocks_1,
1, /* Single element */
&asn_SPC_IPAddrBlocks_specs_1 /* Additional specs */
asn_DEF_IPAddress_tags_1, /* Same as above */
sizeof(asn_DEF_IPAddress_tags_1)
/sizeof(asn_DEF_IPAddress_tags_1[0]), /* 1 */
- { 0, 0, BIT_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, BIT_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_BIT_STRING_specs /* Additional specs */
};
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_IPAddressOrRange,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_addressesOrRanges_tags_3, /* Same as above */
sizeof(asn_DEF_addressesOrRanges_tags_3)
/sizeof(asn_DEF_addressesOrRanges_tags_3[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_addressesOrRanges_3,
1, /* Single element */
&asn_SPC_addressesOrRanges_specs_3 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (5 << 2)),
0,
&asn_DEF_NULL,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"inherit"
},
{ ATF_NOFLAGS, 0, offsetof(struct IPAddressChoice, choice.addressesOrRanges),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_addressesOrRanges_3,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"addressesOrRanges"
},
};
"IPAddressChoice",
"IPAddressChoice",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_IPAddressChoice_1,
2, /* Elements count */
&asn_SPC_IPAddressChoice_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_OCTET_STRING,
- 0,
- { NULL, 0, memb_addressFamily_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_addressFamily_constraint_1 },
+ NULL, NULL, /* No default value */
"addressFamily"
},
{ ATF_NOFLAGS, 0, offsetof(struct IPAddressFamily, ipAddressChoice),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_IPAddressChoice,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"ipAddressChoice"
},
};
asn_DEF_IPAddressFamily_tags_1, /* Same as above */
sizeof(asn_DEF_IPAddressFamily_tags_1)
/sizeof(asn_DEF_IPAddressFamily_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_IPAddressFamily_1,
2, /* Elements count */
&asn_SPC_IPAddressFamily_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_IPAddress,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"addressPrefix"
},
{ ATF_NOFLAGS, 0, offsetof(struct IPAddressOrRange, choice.addressRange),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_IPAddressRange,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"addressRange"
},
};
"IPAddressOrRange",
"IPAddressOrRange",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_IPAddressOrRange_1,
2, /* Elements count */
&asn_SPC_IPAddressOrRange_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_IPAddress,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"min"
},
{ ATF_NOFLAGS, 0, offsetof(struct IPAddressRange, max),
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_IPAddress,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"max"
},
};
asn_DEF_IPAddressRange_tags_1, /* Same as above */
sizeof(asn_DEF_IPAddressRange_tags_1)
/sizeof(asn_DEF_IPAddressRange_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_IPAddressRange_1,
2, /* Elements count */
&asn_SPC_IPAddressRange_specs_1 /* Additional specs */
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_Name,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"issuer"
},
{ ATF_NOFLAGS, 0, offsetof(struct IssuerAndSerialNumber, serialNumber),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_CertificateSerialNumber,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"serialNumber"
},
};
asn_DEF_IssuerAndSerialNumber_tags_1, /* Same as above */
sizeof(asn_DEF_IssuerAndSerialNumber_tags_1)
/sizeof(asn_DEF_IssuerAndSerialNumber_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_IssuerAndSerialNumber_1,
2, /* Elements count */
&asn_SPC_IssuerAndSerialNumber_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_FileAndHash,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_fileList_tags_7, /* Same as above */
sizeof(asn_DEF_fileList_tags_7)
/sizeof(asn_DEF_fileList_tags_7[0]), /* 1 */
- { NULL, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_fileList_7,
1, /* Single element */
&asn_SPC_fileList_specs_7 /* Additional specs */
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_INTEGER,
- 0,
- { 0, 0, 0 },
+ NULL,
+ { NULL, NULL, NULL },
&asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */
&asn_DFL_2_set_0, /* Set DEFAULT 0 */
"version"
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_INTEGER,
- 0,
- { NULL, 0, memb_manifestNumber_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_manifestNumber_constraint_1 },
+ NULL, NULL, /* No default value */
"manifestNumber"
},
{ ATF_NOFLAGS, 0, offsetof(struct Manifest, thisUpdate),
(ASN_TAG_CLASS_UNIVERSAL | (24 << 2)),
0,
&asn_DEF_GeneralizedTime,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"thisUpdate"
},
{ ATF_NOFLAGS, 0, offsetof(struct Manifest, nextUpdate),
(ASN_TAG_CLASS_UNIVERSAL | (24 << 2)),
0,
&asn_DEF_GeneralizedTime,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"nextUpdate"
},
{ ATF_NOFLAGS, 0, offsetof(struct Manifest, fileHashAlg),
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_OBJECT_IDENTIFIER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"fileHashAlg"
},
{ ATF_NOFLAGS, 0, offsetof(struct Manifest, fileList),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_fileList_7,
- 0,
- { NULL, 0, memb_fileList_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_fileList_constraint_1 },
+ NULL, NULL, /* No default value */
"fileList"
},
};
asn_DEF_Manifest_tags_1, /* Same as above */
sizeof(asn_DEF_Manifest_tags_1)
/sizeof(asn_DEF_Manifest_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_Manifest_1,
6, /* Elements count */
&asn_SPC_Manifest_specs_1 /* Additional specs */
asn_DEF_MessageDigest_tags_1, /* Same as above */
sizeof(asn_DEF_MessageDigest_tags_1)
/sizeof(asn_DEF_MessageDigest_tags_1[0]), /* 1 */
- { 0, 0, OCTET_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, OCTET_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};
NULL_encode_der, /* Special handling of DER encoding */
NULL_encode_json,
NULL_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_NULL = {
"NULL",
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
asn_DEF_NULL_tags, /* Same as above */
sizeof(asn_DEF_NULL_tags) / sizeof(asn_DEF_NULL_tags[0]),
- { 0, 0, asn_generic_no_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, asn_generic_no_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
void
/*
* Check tags.
*/
- rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size, tag_mode, 0,
- &length, 0);
+ rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size, tag_mode, 0,
+ &length, NULL);
if(rval.code != RC_OK) {
return rval;
}
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_RDNSequence,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"rdnSequence"
},
};
"Name",
"Name",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_Name_1,
1, /* Elements count */
&asn_SPC_Name_specs_1 /* Additional specs */
der_encode_primitive,
OBJECT_IDENTIFIER_encode_json,
OBJECT_IDENTIFIER_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_OBJECT_IDENTIFIER = {
"OBJECT IDENTIFIER",
asn_DEF_OBJECT_IDENTIFIER_tags, /* Same as above */
sizeof(asn_DEF_OBJECT_IDENTIFIER_tags)
/ sizeof(asn_DEF_OBJECT_IDENTIFIER_tags[0]),
- { 0, 0, OBJECT_IDENTIFIER_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, OBJECT_IDENTIFIER_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
int
OCTET_STRING_encode_der,
OCTET_STRING_encode_json,
OCTET_STRING_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_OCTET_STRING = {
"OCTET STRING", /* Canonical name */
asn_DEF_OCTET_STRING_tags, /* Same as above */
sizeof(asn_DEF_OCTET_STRING_tags)
/ sizeof(asn_DEF_OCTET_STRING_tags[0]),
- { 0, 0, asn_generic_no_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, asn_generic_no_constraint },
+ NULL, 0, /* No members */
&asn_SPC_OCTET_STRING_specs
};
asn_struct_ctx_t *ctx;
ssize_t consumed_myself = 0;
struct _stack *stck; /* Expectations stack structure */
- struct _stack_el *sel = 0; /* Stack element */
+ struct _stack_el *sel = NULL; /* Stack element */
int tlv_constr;
enum asn_OS_Subvariant type_variant = specs->subvariant;
tlv_constr = 1;
continue;
} else {
- sel = stck->cur_ptr = 0;
+ sel = stck->cur_ptr = NULL;
break; /* Nothing to wait */
}
}
OSXET("\074\151\163\063\057\076"), /* <is3/> */
OSXET("\074\151\163\062\057\076"), /* <is2/> */
OSXET("\074\151\163\061\057\076"), /* <is1/> */
- { 0, 0 }, /* " " */
- { 0, 0 }, /* ! */
- { 0, 0 }, /* \" */
- { 0, 0 }, /* # */
- { 0, 0 }, /* $ */
- { 0, 0 }, /* % */
+ { NULL, 0 }, /* " " */
+ { NULL, 0 }, /* ! */
+ { NULL, 0 }, /* \" */
+ { NULL, 0 }, /* # */
+ { NULL, 0 }, /* $ */
+ { NULL, 0 }, /* % */
OSXET("\046\141\155\160\073"), /* & */
- { 0, 0 }, /* ' */
- {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* ()*+,-./ */
- {0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0},{0,0}, /* 01234567 */
- {0,0},{0,0},{0,0},{0,0}, /* 89:; */
- OSXET("\046\154\164\073"), /* < */
- { 0, 0 }, /* = */
+ { NULL, 0 }, /* ' */
+ {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* ()*+ */
+ {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* ,-./ */
+ {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 0123 */
+ {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 4567 */
+ {NULL,0},{NULL,0},{NULL,0},{NULL,0}, /* 89:; */
+ OSXET("\046\154\164\073"), /* < */
+ { NULL, 0 }, /* = */
OSXET("\046\147\164\073"), /* > */
};
if(st->buf) {
FREEMEM(st->buf);
- st->buf = 0;
+ st->buf = NULL;
}
/*
OCTET_STRING_fromBuf(OCTET_STRING_t *st, const char *str, int len) {
void *buf;
- if(st == 0 || (str == 0 && len)) {
+ if(st == NULL || (str == NULL && len)) {
errno = EINVAL;
return -1;
}
*/
if(str == NULL) {
FREEMEM(st->buf);
- st->buf = 0;
+ st->buf = NULL;
st->size = 0;
return 0;
}
OPEN_TYPE_encode_der,
OPEN_TYPE_encode_json,
OPEN_TYPE_encode_xer,
- 0, /* Use generic outmost tag fetcher */
+ NULL, /* Use generic outmost tag fetcher */
};
#undef ADVANCE
(ASN_TAG_CLASS_UNIVERSAL | (6 << 2)),
0,
&asn_DEF_OBJECT_IDENTIFIER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"otherRevInfoFormat"
},
{ ATF_ANY_TYPE | ATF_NOFLAGS, 0, offsetof(struct OtherRevocationInfoFormat, otherRevInfo),
-1 /* Ambiguous tag (ANY?) */,
0,
&asn_DEF_ANY,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"otherRevInfo"
},
};
asn_DEF_OtherRevocationInfoFormat_tags_1, /* Same as above */
sizeof(asn_DEF_OtherRevocationInfoFormat_tags_1)
/sizeof(asn_DEF_OtherRevocationInfoFormat_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_OtherRevocationInfoFormat_1,
2, /* Elements count */
&asn_SPC_OtherRevocationInfoFormat_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_RelativeDistinguishedName,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_RDNSequence_tags_1, /* Same as above */
sizeof(asn_DEF_RDNSequence_tags_1)
/sizeof(asn_DEF_RDNSequence_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_RDNSequence_1,
1, /* Single element */
&asn_SPC_RDNSequence_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (3 << 2)),
0,
&asn_DEF_IPAddress,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"address"
},
{ ATF_POINTER, 1, offsetof(struct ROAIPAddress, maxLength),
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_INTEGER,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"maxLength"
},
};
asn_DEF_ROAIPAddress_tags_1, /* Same as above */
sizeof(asn_DEF_ROAIPAddress_tags_1)
/sizeof(asn_DEF_ROAIPAddress_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_ROAIPAddress_1,
2, /* Elements count */
&asn_SPC_ROAIPAddress_specs_1 /* Additional specs */
return NULL;
}
-json_t *
+static json_t *
ROAIPAddressFamily_encode_json(const asn_TYPE_descriptor_t *td, const void *sptr)
{
struct ROAIPAddressFamily const *riaf = sptr;
return SEQUENCE_encode_json(td, sptr);
}
-asn_TYPE_operation_t asn_OP_ROAIPAddressFamily = {
+static asn_TYPE_operation_t asn_OP_ROAIPAddressFamily = {
SEQUENCE_free,
SEQUENCE_print,
SEQUENCE_compare,
SEQUENCE_encode_der,
ROAIPAddressFamily_encode_json,
SEQUENCE_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
static int
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ROAIPAddress,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_addresses_tags_3, /* Same as above */
sizeof(asn_DEF_addresses_tags_3)
/sizeof(asn_DEF_addresses_tags_3[0]), /* 1 */
- { NULL, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_addresses_3,
1, /* Single element */
&asn_SPC_addresses_specs_3 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_OCTET_STRING,
- 0,
- { NULL, 0, memb_addressFamily_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_addressFamily_constraint_1 },
+ NULL, NULL, /* No default value */
"addressFamily"
},
{ ATF_NOFLAGS, 0, offsetof(struct ROAIPAddressFamily, addresses),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_addresses_3,
- 0,
- { NULL, 0, memb_addresses_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_addresses_constraint_1 },
+ NULL, NULL, /* No default value */
"addresses"
},
};
asn_DEF_ROAIPAddressFamily_tags_1, /* Same as above */
sizeof(asn_DEF_ROAIPAddressFamily_tags_1)
/sizeof(asn_DEF_ROAIPAddressFamily_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_ROAIPAddressFamily_1,
2, /* Elements count */
&asn_SPC_ROAIPAddressFamily_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_AttributeTypeAndValue,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_RelativeDistinguishedName_tags_1, /* Same as above */
sizeof(asn_DEF_RelativeDistinguishedName_tags_1)
/sizeof(asn_DEF_RelativeDistinguishedName_tags_1[0]), /* 1 */
- { NULL, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_RelativeDistinguishedName_1,
1, /* Single element */
&asn_SPC_RelativeDistinguishedName_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_CertificateList,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"crl"
},
{ ATF_NOFLAGS, 0, offsetof(struct RevocationInfoChoice, choice.other),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_OtherRevocationInfoFormat,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"other"
},
};
"RevocationInfoChoice",
"RevocationInfoChoice",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_RevocationInfoChoice_1,
2, /* Elements count */
&asn_SPC_RevocationInfoChoice_specs_1 /* Additional specs */
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_RevocationInfoChoice,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_RevocationInfoChoices_tags_1, /* Same as above */
sizeof(asn_DEF_RevocationInfoChoices_tags_1)
/sizeof(asn_DEF_RevocationInfoChoices_tags_1[0]), /* 1 */
- { 0, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_RevocationInfoChoices_1,
1, /* Single element */
&asn_SPC_RevocationInfoChoices_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ROAIPAddressFamily,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_ipAddrBlocks_tags_4, /* Same as above */
sizeof(asn_DEF_ipAddrBlocks_tags_4)
/sizeof(asn_DEF_ipAddrBlocks_tags_4[0]), /* 1 */
- { NULL, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_ipAddrBlocks_4,
1, /* Single element */
&asn_SPC_ipAddrBlocks_specs_4 /* Additional specs */
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_INTEGER,
- 0,
- { 0, 0, 0 },
+ NULL,
+ { NULL, NULL, NULL },
&asn_DFL_2_cmp_0, /* Compare DEFAULT 0 */
&asn_DFL_2_set_0, /* Set DEFAULT 0 */
"version"
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_ASId,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"asId"
},
{ ATF_NOFLAGS, 0, offsetof(struct RouteOriginAttestation, ipAddrBlocks),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_ipAddrBlocks_4,
- 0,
- { NULL, 0, memb_ipAddrBlocks_constraint_1 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, memb_ipAddrBlocks_constraint_1 },
+ NULL, NULL, /* No default value */
"ipAddrBlocks"
},
};
asn_DEF_RouteOriginAttestation_tags_1, /* Same as above */
sizeof(asn_DEF_RouteOriginAttestation_tags_1)
/sizeof(asn_DEF_RouteOriginAttestation_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_RouteOriginAttestation_1,
3, /* Elements count */
&asn_SPC_RouteOriginAttestation_specs_1 /* Additional specs */
asn_DEF_SignatureAlgorithmIdentifier_tags_1, /* Same as above */
sizeof(asn_DEF_SignatureAlgorithmIdentifier_tags_1)
/sizeof(asn_DEF_SignatureAlgorithmIdentifier_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_AlgorithmIdentifier_1,
2, /* Elements count */
&asn_SPC_AlgorithmIdentifier_specs_1 /* Additional specs */
asn_DEF_SignatureValue_tags_1, /* Same as above */
sizeof(asn_DEF_SignatureValue_tags_1)
/sizeof(asn_DEF_SignatureValue_tags_1[0]), /* 1 */
- { 0, 0, OCTET_STRING_constraint },
- 0, 0, /* No members */
+ { NULL, NULL, OCTET_STRING_constraint },
+ NULL, 0, /* No members */
&asn_SPC_OCTET_STRING_specs /* Additional specs */
};
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_CMSAttribute,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_SignedAttributes_tags_1, /* Same as above */
sizeof(asn_DEF_SignedAttributes_tags_1)
/sizeof(asn_DEF_SignedAttributes_tags_1[0]), /* 1 */
- { NULL, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_SignedAttributes_1,
1, /* Single element */
&asn_SPC_SignedAttributes_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_CMSVersion,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"version"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedData, digestAlgorithms),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_DigestAlgorithmIdentifiers,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"digestAlgorithms"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedData, encapContentInfo),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_EncapsulatedContentInfo,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"encapContentInfo"
},
{ ATF_POINTER, 2, offsetof(struct SignedData, certificates),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CertificateSet,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"certificates"
},
{ ATF_POINTER, 1, offsetof(struct SignedData, crls),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_RevocationInfoChoices,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"crls"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedData, signerInfos),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_SignerInfos,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signerInfos"
},
};
asn_DEF_SignedData_tags_1, /* Same as above */
sizeof(asn_DEF_SignedData_tags_1)
/sizeof(asn_DEF_SignedData_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_SignedData_1,
6, /* Elements count */
&asn_SPC_SignedData_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_CMSVersion,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"version"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, digestAlgorithms),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_DigestAlgorithmIdentifiers,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"digestAlgorithms"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, encapContentInfo),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_EncapsulatedContentInfoPKCS7,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"encapContentInfo"
},
{ ATF_POINTER, 2, offsetof(struct SignedDataPKCS7, certificates),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CertificateSet,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"certificates"
},
{ ATF_POINTER, 1, offsetof(struct SignedDataPKCS7, crls),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_RevocationInfoChoices,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"crls"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignedDataPKCS7, signerInfos),
(ASN_TAG_CLASS_UNIVERSAL | (17 << 2)),
0,
&asn_DEF_SignerInfos,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signerInfos"
},
};
asn_DEF_SignedDataPKCS7_tags_1, /* Same as above */
sizeof(asn_DEF_SignedDataPKCS7_tags_1)
/sizeof(asn_DEF_SignedDataPKCS7_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_SignedDataPKCS7_1,
6, /* Elements count */
&asn_SPC_SignedDataPKCS7_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_IssuerAndSerialNumber,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"issuerAndSerialNumber"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignerIdentifier, choice.subjectKeyIdentifier),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_CMSSubjectKeyIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"subjectKeyIdentifier"
},
};
"SignerIdentifier",
"SignerIdentifier",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_SignerIdentifier_1,
2, /* Elements count */
&asn_SPC_SignerIdentifier_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_CMSVersion,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"version"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignerInfo, sid),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_SignerIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"sid"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignerInfo, digestAlgorithm),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_DigestAlgorithmIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"digestAlgorithm"
},
{ ATF_POINTER, 1, offsetof(struct SignerInfo, signedAttrs),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_SignedAttributes,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signedAttrs"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignerInfo, signatureAlgorithm),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_SignatureAlgorithmIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signatureAlgorithm"
},
{ ATF_NOFLAGS, 0, offsetof(struct SignerInfo, signature),
(ASN_TAG_CLASS_UNIVERSAL | (4 << 2)),
0,
&asn_DEF_SignatureValue,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signature"
},
{ ATF_POINTER, 1, offsetof(struct SignerInfo, unsignedAttrs),
(ASN_TAG_CLASS_CONTEXT | (1 << 2)),
-1, /* IMPLICIT tag at current level */
&asn_DEF_UnsignedAttributes,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"unsignedAttrs"
},
};
asn_DEF_SignerInfo_tags_1, /* Same as above */
sizeof(asn_DEF_SignerInfo_tags_1)
/sizeof(asn_DEF_SignerInfo_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_SignerInfo_1,
7, /* Elements count */
&asn_SPC_SignerInfo_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_SignerInfo,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_SignerInfos_tags_1, /* Same as above */
sizeof(asn_DEF_SignerInfos_tags_1)
/sizeof(asn_DEF_SignerInfos_tags_1[0]), /* 1 */
- { 0, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_SignerInfos_1,
1, /* Single element */
&asn_SPC_SignerInfos_specs_1 /* Additional specs */
"SigningTime",
"SigningTime",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { 0, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_Time_1,
2, /* Elements count */
&asn_SPC_Time_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_CertificateSerialNumber,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"userCertificate"
},
{ ATF_NOFLAGS, 0, offsetof(struct TBSCertList__revokedCertificates__Member, revocationDate),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_Time,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"revocationDate"
},
{ ATF_POINTER, 1, offsetof(struct TBSCertList__revokedCertificates__Member, crlEntryExtensions),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_Extensions,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"crlEntryExtensions"
},
};
asn_DEF_Member_tags_8, /* Same as above */
sizeof(asn_DEF_Member_tags_8)
/sizeof(asn_DEF_Member_tags_8[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_Member_8,
3, /* Elements count */
&asn_SPC_Member_specs_8 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_Member_8,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_revokedCertificates_tags_7, /* Same as above */
sizeof(asn_DEF_revokedCertificates_tags_7)
/sizeof(asn_DEF_revokedCertificates_tags_7[0]), /* 1 */
- { 0, 0, SEQUENCE_OF_constraint },
+ { NULL, NULL, SEQUENCE_OF_constraint },
asn_MBR_revokedCertificates_7,
1, /* Single element */
&asn_SPC_revokedCertificates_specs_7 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (2 << 2)),
0,
&asn_DEF_Version,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"version"
},
{ ATF_NOFLAGS, 0, offsetof(struct TBSCertList, signature),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_AlgorithmIdentifier,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"signature"
},
{ ATF_NOFLAGS, 0, offsetof(struct TBSCertList, issuer),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_Name,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"issuer"
},
{ ATF_NOFLAGS, 0, offsetof(struct TBSCertList, thisUpdate),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_Time,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"thisUpdate"
},
{ ATF_POINTER, 3, offsetof(struct TBSCertList, nextUpdate),
-1 /* Ambiguous tag (CHOICE?) */,
0,
&asn_DEF_Time,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"nextUpdate"
},
{ ATF_POINTER, 2, offsetof(struct TBSCertList, revokedCertificates),
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_revokedCertificates_7,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"revokedCertificates"
},
{ ATF_POINTER, 1, offsetof(struct TBSCertList, crlExtensions),
(ASN_TAG_CLASS_CONTEXT | (0 << 2)),
+1, /* EXPLICIT tag at current level */
&asn_DEF_Extensions,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"crlExtensions"
},
};
asn_DEF_TBSCertList_tags_1, /* Same as above */
sizeof(asn_DEF_TBSCertList_tags_1)
/sizeof(asn_DEF_TBSCertList_tags_1[0]), /* 1 */
- { 0, 0, SEQUENCE_constraint },
+ { NULL, NULL, SEQUENCE_constraint },
asn_MBR_TBSCertList_1,
7, /* Elements count */
&asn_SPC_TBSCertList_specs_1 /* Additional specs */
(ASN_TAG_CLASS_UNIVERSAL | (23 << 2)),
0,
&asn_DEF_UTCTime,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"utcTime"
},
{ ATF_NOFLAGS, 0, offsetof(struct Time, choice.generalTime),
(ASN_TAG_CLASS_UNIVERSAL | (24 << 2)),
0,
&asn_DEF_GeneralizedTime,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
"generalTime"
},
};
"Time",
"Time",
&asn_OP_CHOICE,
- 0, /* No effective tags (pointer) */
+ NULL, /* No effective tags (pointer) */
0, /* No effective tags (count) */
- 0, /* No tags (pointer) */
+ NULL, /* No tags (pointer) */
0, /* No tags (count) */
- { NULL, 0, CHOICE_constraint },
+ { NULL, NULL, CHOICE_constraint },
asn_MBR_Time_1,
2, /* Elements count */
&asn_SPC_Time_specs_1 /* Additional specs */
OCTET_STRING_encode_der, /* Implemented in terms of OCTET STRING */
UTCTime_encode_json,
UTCTime_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
asn_TYPE_descriptor_t asn_DEF_UTCTime = {
"UTCTime",
asn_DEF_UTCTime_tags,
sizeof(asn_DEF_UTCTime_tags)
/ sizeof(asn_DEF_UTCTime_tags[0]),
- { 0, NULL, UTCTime_constraint },
- 0, 0, /* No members */
- 0 /* No specifics */
+ { NULL, NULL, UTCTime_constraint },
+ NULL, 0, /* No members */
+ NULL /* No specifics */
};
#endif /* ASN___INTERNAL_TEST_MODE */
fprintf(stderr, "UTCTime_constraint() is not implemented for now.\n");
abort();
- if(asn_UT2time(st, 0) != 0) {
+ if(asn_UT2time(st, NULL) != 0) {
ASN__CTFAIL(app_key, td, sptr, "%s: Invalid time format: %s (%s:%d)",
td->name, strerror(errno), __FILE__, __LINE__);
return -1;
ASN__ENCODE_FAILED;
/* Fractions are not allowed in UTCTime */
- ut = asn_time2UT(0, &tm);
+ ut = asn_time2UT(NULL, &tm);
if(!ut) ASN__ENCODE_FAILED;
rv = OCTET_STRING_encode_xer_utf8(td, sptr, ilevel, flags,
GeneralizedTime_t *gt = (GeneralizedTime_t *)opt_ut;
gt = asn_time2GT(gt, tm);
- if(gt == 0) return 0;
+ if(gt == NULL) return NULL;
assert(gt->size >= 2);
gt->size -= 2;
int aerr, berr;
errno = EPERM;
- at = asn_UT2time(a, 0);
+ at = asn_UT2time(a, NULL);
aerr = errno;
errno = EPERM;
- bt = asn_UT2time(b, 0);
+ bt = asn_UT2time(b, NULL);
berr = errno;
if(at == -1 && aerr != EPERM) {
(ASN_TAG_CLASS_UNIVERSAL | (16 << 2)),
0,
&asn_DEF_CMSAttribute,
- 0,
- { 0, 0, 0 },
- 0, 0, /* No default value */
+ NULL,
+ { NULL, NULL, NULL },
+ NULL, NULL, /* No default value */
""
},
};
asn_DEF_UnsignedAttributes_tags_1, /* Same as above */
sizeof(asn_DEF_UnsignedAttributes_tags_1)
/sizeof(asn_DEF_UnsignedAttributes_tags_1[0]), /* 1 */
- { NULL, 0, SET_OF_constraint },
+ { NULL, NULL, SET_OF_constraint },
asn_MBR_UnsignedAttributes_1,
1, /* Single element */
&asn_SPC_UnsignedAttributes_specs_1 /* Additional specs */
asn_DEF_Version_tags_1, /* Same as above */
sizeof(asn_DEF_Version_tags_1)
/sizeof(asn_DEF_Version_tags_1[0]), /* 1 */
- { 0, 0, INTEGER_constraint },
- 0, 0, /* Defined elsewhere */
- 0 /* No specifics */
+ { NULL, NULL, INTEGER_constraint },
+ NULL, 0, /* Defined elsewhere */
+ NULL /* No specifics */
};
*/
#include "asn1/asn1c/asn_SEQUENCE_OF.h"
+#include <stddef.h>
+#include <stdio.h>
+#include <string.h>
+#include <unistd.h>
+
typedef A_SEQUENCE_OF(void) asn_sequence;
void
if(_do_free && as->free) {
ptr = as->array[number];
} else {
- ptr = 0;
+ ptr = NULL;
}
/*
asn_set_add(void *asn_set_of_x, void *ptr) {
asn_anonymous_set_ *as = _A_SET_FROM_VOID(asn_set_of_x);
- if(as == 0 || ptr == 0) {
+ if(as == NULL || ptr == NULL) {
errno = EINVAL; /* Invalid arguments */
return -1;
}
if(_do_free && as->free) {
ptr = as->array[number];
} else {
- ptr = 0;
+ ptr = NULL;
}
as->array[number] = as->array[--as->count];
as->free(as->array[as->count]);
}
FREEMEM(as->array);
- as->array = 0;
+ as->array = NULL;
}
as->count = 0;
as->size = 0;
return tmp_error; \
} while(0)
#define ASN__ENCODED_OK(rval) do { \
- rval.structure_ptr = 0; \
- rval.failed_type = 0; \
+ rval.structure_ptr = NULL; \
+ rval.failed_type = NULL; \
return rval; \
} while(0)
/*
* Check tags and extract value length.
*/
- rval = ber_check_tags(opt_codec_ctx, td, 0, buf_ptr, size,
- tag_mode, 0, &length, 0);
+ rval = ber_check_tags(opt_codec_ctx, td, NULL, buf_ptr, size,
+ tag_mode, 0, &length, NULL);
if(rval.code != RC_OK)
return rval;
ssize_t
ber_tlv_tag_snprint(ber_tlv_tag_t tag, char *buf, size_t size) {
- const char *type = 0;
+ const char *type = NULL;
int ret;
switch(tag & 0x3) {
/*
* Create the target structure if it is not present already.
*/
- if(st == 0) {
+ if(st == NULL) {
st = *struct_ptr = CALLOC(1, specs->struct_size);
- if(st == 0) {
+ if(st == NULL) {
RETURN(RC_FAIL);
}
}
if(tag_mode || td->tags_count) {
rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size,
- tag_mode, -1, &ctx->left, 0);
+ tag_mode, -1, &ctx->left, NULL);
if(rval.code != RC_OK) {
ASN_DEBUG("%s tagging check failed: %d",
td->name, rval.code);
/* Encode member with its tag */
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
- elm->tag_mode, elm->tag, 0, 0);
+ elm->tag_mode, elm->tag, NULL, NULL);
if(erval.encoded == -1)
return erval;
/*
* Create the target structure if it is not present already.
*/
- if(st == 0) {
+ if(st == NULL) {
st = *struct_ptr = CALLOC(1, specs->struct_size);
- if(st == 0) {
+ if(st == NULL) {
RETURN(RC_FAIL);
}
}
*/
rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size,
- tag_mode, 1, &ctx->left, 0);
+ tag_mode, 1, &ctx->left, NULL);
if(rval.code != RC_OK) {
ASN_DEBUG("%s tagging check failed: %d",
td->name, rval.code);
specs->tag2el, specs->tag2el_count,
sizeof(specs->tag2el[0]), _t2e_cmp);
if(t2m) {
- const asn_TYPE_tag2member_t *best = 0;
+ const asn_TYPE_tag2member_t *best = NULL;
const asn_TYPE_tag2member_t *t2m_f, *t2m_l;
size_t edx_max = edx + elements[edx].optional;
/*
erval = elm->type->op->der_encoder(elm->type, *memb_ptr2,
elm->tag_mode, elm->tag,
- 0, 0);
+ NULL, NULL);
if(erval.encoded == -1)
return erval;
computed_size += erval.encoded;
asn_app_consume_bytes_f *cb, void *app_key) {
asn_enc_rval_t er;
int xcan = (flags & XER_F_CANONICAL);
- asn_TYPE_descriptor_t *tmp_def_val_td = 0;
- void *tmp_def_val = 0;
+ asn_TYPE_descriptor_t *tmp_def_val_td = NULL;
+ void *tmp_def_val = NULL;
size_t edx;
if(!sptr) ASN__ENCODE_FAILED;
memb_ptr = get_member(sptr, elm);
if(!memb_ptr) {
- assert(tmp_def_val == 0);
+ assert(tmp_def_val == NULL);
if(elm->default_value_set) {
if(elm->default_value_set(&tmp_def_val)) {
ASN__ENCODE_FAILED;
flags, cb, app_key);
if(tmp_def_val) {
ASN_STRUCT_FREE(*tmp_def_val_td, tmp_def_val);
- tmp_def_val = 0;
+ tmp_def_val = NULL;
}
if(tmper.encoded == -1) return tmper;
er.encoded += tmper.encoded;
SEQUENCE_encode_der,
SEQUENCE_encode_json,
SEQUENCE_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
if(!memb_ptr) continue;
erval = elm->type->op->der_encoder(elm->type, memb_ptr,
0, elm->tag,
- 0, 0);
+ NULL, NULL);
if(erval.encoded == -1)
return erval;
computed_size += erval.encoded;
erval.structure_ptr = ptr;
} else {
erval.encoded = computed_size;
- erval.structure_ptr = 0;
- erval.failed_type = 0;
+ erval.structure_ptr = NULL;
+ erval.failed_type = NULL;
}
return erval;
const asn_TYPE_member_t *elm = td->elements;
const asn_anonymous_sequence_ *list = _A_CSEQUENCE_FROM_VOID(sptr);
const char *mname = specs->as_XMLValueList
- ? 0
+ ? NULL
: ((*elm->name) ? elm->name : elm->type->xml_tag);
size_t mlen = mname ? strlen(mname) : 0;
int xcan = (flags & XER_F_CANONICAL);
SEQUENCE_OF_encode_der,
SEQUENCE_OF_encode_json,
SEQUENCE_OF_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
/*
* Create the target structure if it is not present already.
*/
- if(st == 0) {
+ if(st == NULL) {
st = *struct_ptr = CALLOC(1, specs->struct_size);
- if(st == 0) {
+ if(st == NULL) {
RETURN(RC_FAIL);
}
}
*/
rval = ber_check_tags(opt_codec_ctx, td, ctx, ptr, size,
- tag_mode, 1, &ctx->left, 0);
+ tag_mode, 1, &ctx->left, NULL);
if(rval.code != RC_OK) {
ASN_DEBUG("%s tagging check failed: %d",
td->name, rval.code);
if(ASN_SET_ADD(list, ctx->ptr) != 0)
RETURN(RC_FAIL);
else
- ctx->ptr = 0;
+ ctx->ptr = NULL;
}
break;
case RC_WMORE: /* More data expected */
/* Fall through */
case RC_FAIL: /* Fatal error */
ASN_STRUCT_FREE(*elm->type, ctx->ptr);
- ctx->ptr = 0;
+ ctx->ptr = NULL;
RETURN(RC_FAIL);
} /* switch(rval) */
if(!memb_ptr) ASN__ENCODE_FAILED;
erval =
- elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, 0, 0);
+ elm->type->op->der_encoder(elm->type, memb_ptr, 0, elm->tag, NULL, NULL);
if(erval.encoded == -1) return erval;
computed_size += erval.encoded;
}
const asn_TYPE_member_t *elm = td->elements;
const asn_anonymous_set_ *list = _A_CSET_FROM_VOID(sptr);
const char *mname = specs->as_XMLValueList
- ? 0 : ((*elm->name) ? elm->name : elm->type->xml_tag);
+ ? NULL : ((*elm->name) ? elm->name : elm->type->xml_tag);
size_t mlen = mname ? strlen(mname) : 0;
int xcan = (flags & XER_F_CANONICAL);
- xer_tmp_enc_t *encs = 0;
+ xer_tmp_enc_t *encs = NULL;
size_t encs_count = 0;
void *original_app_key = app_key;
asn_app_consume_bytes_f *original_cb = cb;
for(; enc < end; enc++) {
ASN__CALLBACK(enc->buffer, enc->offset);
FREEMEM(enc->buffer);
- enc->buffer = 0;
+ enc->buffer = NULL;
control_size += enc->offset;
}
assert(control_size == er.encoded);
ctx = (asn_struct_ctx_t *)((char *)ptr + specs->ctx_offset);
if(ctx->ptr) {
ASN_STRUCT_FREE(*elm->type, ctx->ptr);
- ctx->ptr = 0;
+ ctx->ptr = NULL;
}
switch(method) {
SET_OF_encode_der,
SET_OF_encode_json,
SET_OF_encode_xer,
- 0 /* Use generic outmost tag fetcher */
+ NULL /* Use generic outmost tag fetcher */
};
struct errbufDesc arg;
int ret;
- arg.failed_type = 0;
- arg.failed_struct_ptr = 0;
+ arg.failed_type = NULL;
+ arg.failed_struct_ptr = NULL;
arg.errbuf = errbuf;
arg.errlen = errlen ? *errlen : 0;
*/
overall_length = struct_length;
for(i = tags_count - 1; i >= 0; --i) {
- lens[i] = der_write_TL(tags[i], overall_length, 0, 0, 0);
+ lens[i] = der_write_TL(tags[i], overall_length, NULL, NULL, 0);
if(lens[i] == -1) return -1;
overall_length += lens[i];
lens[i] = overall_length - lens[i];
xer_encode(const asn_TYPE_descriptor_t *td, const void *sptr,
enum xer_encoder_flags_e xer_flags, asn_app_consume_bytes_f *cb,
void *app_key) {
- asn_enc_rval_t er = {0, 0, 0};
+ asn_enc_rval_t er = { 0 };
asn_enc_rval_t tmper;
const char *mname;
size_t mlen;