Browse Source

fix compilation with debug output enabled

Steffen Jaeckel 7 years ago
parent
commit
3cfdd4bfdb
2 changed files with 2 additions and 2 deletions
  1. 1 1
      src/pk/asn1/der/sequence/der_decode_sequence_flexi.c
  2. 1 1
      tests/der_test.c

+ 1 - 1
src/pk/asn1/der/sequence/der_decode_sequence_flexi.c

@@ -96,7 +96,7 @@ int der_decode_sequence_flexi(const unsigned char *in, unsigned long *inlen, ltc
          }
          }
          data_offset = id_len + len_len;
          data_offset = id_len + len_len;
 #if defined(LTC_TEST_DBG) && LTC_TEST_DBG > 1
 #if defined(LTC_TEST_DBG) && LTC_TEST_DBG > 1
-         if (l->type == LTC_ASN1_CUSTOM_TYPE && l->class == LTC_ASN1_CL_CONTEXT_SPECIFIC) {
+         if (l->type == LTC_ASN1_CUSTOM_TYPE && l->klass == LTC_ASN1_CL_CONTEXT_SPECIFIC) {
             fprintf(stderr, "OK %02lx: hl=%4lu l=%4lu - Context Specific[%s %llu]\n", identifier, data_offset, len, der_asn1_pc_to_string_map[l->pc], l->tag);
             fprintf(stderr, "OK %02lx: hl=%4lu l=%4lu - Context Specific[%s %llu]\n", identifier, data_offset, len, der_asn1_pc_to_string_map[l->pc], l->tag);
          } else {
          } else {
             fprintf(stderr, "OK %02lx: hl=%4lu l=%4lu - %s\n", identifier, data_offset, len, der_asn1_tag_to_string_map[l->tag]);
             fprintf(stderr, "OK %02lx: hl=%4lu l=%4lu - %s\n", identifier, data_offset, len, der_asn1_tag_to_string_map[l->tag]);

+ 1 - 1
tests/der_test.c

@@ -387,7 +387,7 @@ static void _der_tests_print_flexi(ltc_asn1_list* l, unsigned int level)
        char* s = buf;
        char* s = buf;
        int sz = sizeof(buf);
        int sz = sizeof(buf);
 
 
-       r = snprintf(s, sz, "[%s %s %llu]", der_asn1_class_to_string_map[l->class], der_asn1_pc_to_string_map[l->pc], l->tag);
+       r = snprintf(s, sz, "[%s %s %llu]", der_asn1_class_to_string_map[l->klass], der_asn1_pc_to_string_map[l->pc], l->tag);
        if (r < 0 || r >= sz) {
        if (r < 0 || r >= sz) {
            fprintf(stderr, "%s boom\n", name);
            fprintf(stderr, "%s boom\n", name);
            exit(EXIT_FAILURE);
            exit(EXIT_FAILURE);