| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/asn1/tasn_prn.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | static ASN1_PCTX default_pctx = { | - | ||||||||||||||||||||||||
| 11 | 0x001, | - | ||||||||||||||||||||||||
| 12 | 0, | - | ||||||||||||||||||||||||
| 13 | 0, | - | ||||||||||||||||||||||||
| 14 | 0, | - | ||||||||||||||||||||||||
| 15 | 0 | - | ||||||||||||||||||||||||
| 16 | }; | - | ||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||
| 18 | ASN1_PCTX *ASN1_PCTX_new(void) | - | ||||||||||||||||||||||||
| 19 | { | - | ||||||||||||||||||||||||
| 20 | ASN1_PCTX *ret; | - | ||||||||||||||||||||||||
| 21 | - | |||||||||||||||||||||||||
| 22 | ret = CRYPTO_zalloc(sizeof(*ret), __FILE__, 39); | - | ||||||||||||||||||||||||
| 23 | if (ret ==
| 0-1 | ||||||||||||||||||||||||
| 24 | ((void *)0)
| 0-1 | ||||||||||||||||||||||||
| 25 | ) { | - | ||||||||||||||||||||||||
| 26 | ERR_put_error(13,(205),((1|64)),__FILE__,41); | - | ||||||||||||||||||||||||
| 27 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 28 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 29 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 30 | } | - | ||||||||||||||||||||||||
| 31 | return executed 1 time by 1 test: ret;return ret;Executed by:
executed 1 time by 1 test: return ret;Executed by:
| 1 | ||||||||||||||||||||||||
| 32 | } | - | ||||||||||||||||||||||||
| 33 | - | |||||||||||||||||||||||||
| 34 | void ASN1_PCTX_free(ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 35 | { | - | ||||||||||||||||||||||||
| 36 | CRYPTO_free(p, __FILE__, 49); | - | ||||||||||||||||||||||||
| 37 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||
| 38 | - | |||||||||||||||||||||||||
| 39 | unsigned long ASN1_PCTX_get_flags(const ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 40 | { | - | ||||||||||||||||||||||||
| 41 | return never executed: p->flags;return p->flags;never executed: return p->flags; | 0 | ||||||||||||||||||||||||
| 42 | } | - | ||||||||||||||||||||||||
| 43 | - | |||||||||||||||||||||||||
| 44 | void ASN1_PCTX_set_flags(ASN1_PCTX *p, unsigned long flags) | - | ||||||||||||||||||||||||
| 45 | { | - | ||||||||||||||||||||||||
| 46 | p->flags = flags; | - | ||||||||||||||||||||||||
| 47 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||
| 49 | unsigned long ASN1_PCTX_get_nm_flags(const ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 50 | { | - | ||||||||||||||||||||||||
| 51 | return never executed: p->nm_flags;return p->nm_flags;never executed: return p->nm_flags; | 0 | ||||||||||||||||||||||||
| 52 | } | - | ||||||||||||||||||||||||
| 53 | - | |||||||||||||||||||||||||
| 54 | void ASN1_PCTX_set_nm_flags(ASN1_PCTX *p, unsigned long flags) | - | ||||||||||||||||||||||||
| 55 | { | - | ||||||||||||||||||||||||
| 56 | p->nm_flags = flags; | - | ||||||||||||||||||||||||
| 57 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||
| 59 | unsigned long ASN1_PCTX_get_cert_flags(const ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 60 | { | - | ||||||||||||||||||||||||
| 61 | return never executed: p->cert_flags;return p->cert_flags;never executed: return p->cert_flags; | 0 | ||||||||||||||||||||||||
| 62 | } | - | ||||||||||||||||||||||||
| 63 | - | |||||||||||||||||||||||||
| 64 | void ASN1_PCTX_set_cert_flags(ASN1_PCTX *p, unsigned long flags) | - | ||||||||||||||||||||||||
| 65 | { | - | ||||||||||||||||||||||||
| 66 | p->cert_flags = flags; | - | ||||||||||||||||||||||||
| 67 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 68 | - | |||||||||||||||||||||||||
| 69 | unsigned long ASN1_PCTX_get_oid_flags(const ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 70 | { | - | ||||||||||||||||||||||||
| 71 | return never executed: p->oid_flags;return p->oid_flags;never executed: return p->oid_flags; | 0 | ||||||||||||||||||||||||
| 72 | } | - | ||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||
| 74 | void ASN1_PCTX_set_oid_flags(ASN1_PCTX *p, unsigned long flags) | - | ||||||||||||||||||||||||
| 75 | { | - | ||||||||||||||||||||||||
| 76 | p->oid_flags = flags; | - | ||||||||||||||||||||||||
| 77 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 78 | - | |||||||||||||||||||||||||
| 79 | unsigned long ASN1_PCTX_get_str_flags(const ASN1_PCTX *p) | - | ||||||||||||||||||||||||
| 80 | { | - | ||||||||||||||||||||||||
| 81 | return never executed: p->str_flags;return p->str_flags;never executed: return p->str_flags; | 0 | ||||||||||||||||||||||||
| 82 | } | - | ||||||||||||||||||||||||
| 83 | - | |||||||||||||||||||||||||
| 84 | void ASN1_PCTX_set_str_flags(ASN1_PCTX *p, unsigned long flags) | - | ||||||||||||||||||||||||
| 85 | { | - | ||||||||||||||||||||||||
| 86 | p->str_flags = flags; | - | ||||||||||||||||||||||||
| 87 | } executed 1 time by 1 test: end of blockExecuted by:
| 1 | ||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||
| 89 | - | |||||||||||||||||||||||||
| 90 | - | |||||||||||||||||||||||||
| 91 | static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, | - | ||||||||||||||||||||||||
| 92 | const ASN1_ITEM *it, | - | ||||||||||||||||||||||||
| 93 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 94 | int nohdr, const ASN1_PCTX *pctx); | - | ||||||||||||||||||||||||
| 95 | - | |||||||||||||||||||||||||
| 96 | static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, | - | ||||||||||||||||||||||||
| 97 | const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx); | - | ||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||
| 99 | static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld, | - | ||||||||||||||||||||||||
| 100 | const ASN1_ITEM *it, int indent, | - | ||||||||||||||||||||||||
| 101 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 102 | const ASN1_PCTX *pctx); | - | ||||||||||||||||||||||||
| 103 | - | |||||||||||||||||||||||||
| 104 | static int asn1_print_fsname(BIO *out, int indent, | - | ||||||||||||||||||||||||
| 105 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 106 | const ASN1_PCTX *pctx); | - | ||||||||||||||||||||||||
| 107 | - | |||||||||||||||||||||||||
| 108 | int ASN1_item_print(BIO *out, ASN1_VALUE *ifld, int indent, | - | ||||||||||||||||||||||||
| 109 | const ASN1_ITEM *it, const ASN1_PCTX *pctx) | - | ||||||||||||||||||||||||
| 110 | { | - | ||||||||||||||||||||||||
| 111 | const char *sname; | - | ||||||||||||||||||||||||
| 112 | if (pctx ==
| 5-10772 | ||||||||||||||||||||||||
| 113 | ((void *)0)
| 5-10772 | ||||||||||||||||||||||||
| 114 | ) | - | ||||||||||||||||||||||||
| 115 | pctx = &default_pctx; executed 5 times by 1 test: pctx = &default_pctx;Executed by:
| 5 | ||||||||||||||||||||||||
| 116 | if (pctx->flags & 0x100
| 0-10777 | ||||||||||||||||||||||||
| 117 | sname = never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 118 | ((void *)0) never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 119 | ; never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 120 | else | - | ||||||||||||||||||||||||
| 121 | sname = it->sname; executed 10777 times by 1 test: sname = it->sname;Executed by:
| 10777 | ||||||||||||||||||||||||
| 122 | return executed 10777 times by 1 test: asn1_item_print_ctx(out, &ifld, indent, it, return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);Executed by:
executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);Executed by:
| 10777 | ||||||||||||||||||||||||
| 123 | ((void *)0) executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);Executed by:
| 10777 | ||||||||||||||||||||||||
| 124 | , sname, 0, pctx); executed 10777 times by 1 test: return asn1_item_print_ctx(out, &ifld, indent, it, ((void *)0) , sname, 0, pctx);Executed by:
| 10777 | ||||||||||||||||||||||||
| 125 | } | - | ||||||||||||||||||||||||
| 126 | - | |||||||||||||||||||||||||
| 127 | static int asn1_item_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, | - | ||||||||||||||||||||||||
| 128 | const ASN1_ITEM *it, | - | ||||||||||||||||||||||||
| 129 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 130 | int nohdr, const ASN1_PCTX *pctx) | - | ||||||||||||||||||||||||
| 131 | { | - | ||||||||||||||||||||||||
| 132 | const ASN1_TEMPLATE *tt; | - | ||||||||||||||||||||||||
| 133 | const ASN1_EXTERN_FUNCS *ef; | - | ||||||||||||||||||||||||
| 134 | ASN1_VALUE **tmpfld; | - | ||||||||||||||||||||||||
| 135 | const ASN1_AUX *aux = it->funcs; | - | ||||||||||||||||||||||||
| 136 | ASN1_aux_cb *asn1_cb; | - | ||||||||||||||||||||||||
| 137 | ASN1_PRINT_ARG parg; | - | ||||||||||||||||||||||||
| 138 | int i; | - | ||||||||||||||||||||||||
| 139 | if (aux
| 1167-79041 | ||||||||||||||||||||||||
| 140 | parg.out = out; | - | ||||||||||||||||||||||||
| 141 | parg.indent = indent; | - | ||||||||||||||||||||||||
| 142 | parg.pctx = pctx; | - | ||||||||||||||||||||||||
| 143 | asn1_cb = aux->asn1_cb; | - | ||||||||||||||||||||||||
| 144 | } executed 15513 times by 1 test: elseend of blockExecuted by:
| 15513 | ||||||||||||||||||||||||
| 145 | asn1_cb = 0; executed 80208 times by 1 test: asn1_cb = 0;Executed by:
| 80208 | ||||||||||||||||||||||||
| 146 | - | |||||||||||||||||||||||||
| 147 | if (((
| 27811-67910 | ||||||||||||||||||||||||
| 148 | || (
| 2434-88442 | ||||||||||||||||||||||||
| 149 | ((void *)0)
| 4845-88442 | ||||||||||||||||||||||||
| 150 | ) { | - | ||||||||||||||||||||||||
| 151 | if (pctx->flags & 0x001
| 0-4845 | ||||||||||||||||||||||||
| 152 | if (!nohdr
| 0-4845 | ||||||||||||||||||||||||
| 153 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 154 | if (BIO_puts(out, "<ABSENT>\n") <= 0
| 0-4845 | ||||||||||||||||||||||||
| 155 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 156 | } executed 4845 times by 1 test: end of blockExecuted by:
| 4845 | ||||||||||||||||||||||||
| 157 | return executed 4845 times by 1 test: 1;return 1;Executed by:
executed 4845 times by 1 test: return 1;Executed by:
| 4845 | ||||||||||||||||||||||||
| 158 | } | - | ||||||||||||||||||||||||
| 159 | - | |||||||||||||||||||||||||
| 160 | switch (it->itype) { | - | ||||||||||||||||||||||||
| 161 | case executed 64451 times by 1 test: 0x0:case 0x0:Executed by:
executed 64451 times by 1 test: case 0x0:Executed by:
| 64451 | ||||||||||||||||||||||||
| 162 | if (it->templates
| 2581-61870 | ||||||||||||||||||||||||
| 163 | if (!asn1_template_print_ctx(out, fld, indent,
| 154-2427 | ||||||||||||||||||||||||
| 164 | it->templates, pctx)
| 154-2427 | ||||||||||||||||||||||||
| 165 | return executed 154 times by 1 test: 0;return 0;Executed by:
executed 154 times by 1 test: return 0;Executed by:
| 154 | ||||||||||||||||||||||||
| 166 | break; executed 2427 times by 1 test: break;Executed by:
| 2427 | ||||||||||||||||||||||||
| 167 | } | - | ||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||
| 169 | case executed 3871 times by 1 test: 0x5:case 0x5:Executed by:
executed 3871 times by 1 test: case 0x5:Executed by:
code before this statement executed 61870 times by 1 test: case 0x5:Executed by:
| 3871-61870 | ||||||||||||||||||||||||
| 170 | if (!asn1_primitive_print(out, fld, it, indent, fname, sname, pctx)
| 1211-64530 | ||||||||||||||||||||||||
| 171 | return executed 1211 times by 1 test: 0;return 0;Executed by:
executed 1211 times by 1 test: return 0;Executed by:
| 1211 | ||||||||||||||||||||||||
| 172 | break; executed 64530 times by 1 test: break;Executed by:
| 64530 | ||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||
| 174 | case executed 1163 times by 1 test: 0x4:case 0x4:Executed by:
executed 1163 times by 1 test: case 0x4:Executed by:
| 1163 | ||||||||||||||||||||||||
| 175 | if (!nohdr
| 0-1163 | ||||||||||||||||||||||||
| 176 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 177 | - | |||||||||||||||||||||||||
| 178 | ef = it->funcs; | - | ||||||||||||||||||||||||
| 179 | if (ef
| 0-1163 | ||||||||||||||||||||||||
| 180 | i = ef->asn1_ex_print(out, fld, indent, "", pctx); | - | ||||||||||||||||||||||||
| 181 | if (!i
| 0-1163 | ||||||||||||||||||||||||
| 182 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 183 | if ((
| 0-1163 | ||||||||||||||||||||||||
| 184 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 185 | return executed 1163 times by 1 test: 1;return 1;Executed by:
executed 1163 times by 1 test: return 1;Executed by:
| 1163 | ||||||||||||||||||||||||
| 186 | } else if (sname
| 0 | ||||||||||||||||||||||||
| 187 | BIO_printf(out, ":EXTERNAL TYPE %s\n", sname) <= 0
| 0 | ||||||||||||||||||||||||
| 188 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 189 | break; never executed: break; | 0 | ||||||||||||||||||||||||
| 190 | - | |||||||||||||||||||||||||
| 191 | case executed 4292 times by 1 test: 0x2:case 0x2:Executed by:
executed 4292 times by 1 test: case 0x2:Executed by:
| 4292 | ||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||
| 193 | i = asn1_get_choice_selector(fld, it); | - | ||||||||||||||||||||||||
| 194 | - | |||||||||||||||||||||||||
| 195 | if ((
| 0-4292 | ||||||||||||||||||||||||
| 196 | if (BIO_printf(out, "ERROR: selector [%d] invalid\n", i) <= 0
| 0 | ||||||||||||||||||||||||
| 197 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 198 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 199 | } | - | ||||||||||||||||||||||||
| 200 | tt = it->templates + i; | - | ||||||||||||||||||||||||
| 201 | tmpfld = asn1_get_field_ptr(fld, tt); | - | ||||||||||||||||||||||||
| 202 | if (!asn1_template_print_ctx(out, tmpfld, indent, tt, pctx)
| 46-4246 | ||||||||||||||||||||||||
| 203 | return executed 46 times by 1 test: 0;return 0;Executed by:
executed 46 times by 1 test: return 0;Executed by:
| 46 | ||||||||||||||||||||||||
| 204 | break; executed 4246 times by 1 test: break;Executed by:
| 4246 | ||||||||||||||||||||||||
| 205 | - | |||||||||||||||||||||||||
| 206 | case executed 16219 times by 1 test: 0x1:case 0x1:Executed by:
executed 16219 times by 1 test: case 0x1:Executed by:
| 16219 | ||||||||||||||||||||||||
| 207 | case executed 880 times by 1 test: 0x6:case 0x6:Executed by:
executed 880 times by 1 test: case 0x6:Executed by:
| 880 | ||||||||||||||||||||||||
| 208 | if (!nohdr
| 0-11384 | ||||||||||||||||||||||||
| 209 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 210 | if (fname
| 2074-13458 | ||||||||||||||||||||||||
| 211 | if (pctx->flags & 0x002
| 5-5710 | ||||||||||||||||||||||||
| 212 | if (BIO_puts(out, " {\n") <= 0
| 0-5710 | ||||||||||||||||||||||||
| 213 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 214 | } executed 5710 times by 1 test: else {end of blockExecuted by:
| 5710 | ||||||||||||||||||||||||
| 215 | if (BIO_puts(out, "\n") <= 0
| 0-5 | ||||||||||||||||||||||||
| 216 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 217 | } executed 5 times by 1 test: end of blockExecuted by:
| 5 | ||||||||||||||||||||||||
| 218 | } | - | ||||||||||||||||||||||||
| 219 | - | |||||||||||||||||||||||||
| 220 | if (asn1_cb
| 1960-15139 | ||||||||||||||||||||||||
| 221 | i = asn1_cb(8, fld, it, &parg); | - | ||||||||||||||||||||||||
| 222 | if (i == 0
| 0-1960 | ||||||||||||||||||||||||
| 223 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 224 | if (i == 2
| 0-1960 | ||||||||||||||||||||||||
| 225 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 226 | } executed 1960 times by 1 test: end of blockExecuted by:
| 1960 | ||||||||||||||||||||||||
| 227 | - | |||||||||||||||||||||||||
| 228 | - | |||||||||||||||||||||||||
| 229 | for (i = 0, tt = it->templates; i < it->tcount
| 16205-47984 | ||||||||||||||||||||||||
| 230 | const ASN1_TEMPLATE *seqtt; | - | ||||||||||||||||||||||||
| 231 | seqtt = asn1_do_adb(fld, tt, 1); | - | ||||||||||||||||||||||||
| 232 | if (!seqtt
| 0-47984 | ||||||||||||||||||||||||
| 233 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 234 | tmpfld = asn1_get_field_ptr(fld, seqtt); | - | ||||||||||||||||||||||||
| 235 | if (!asn1_template_print_ctx(out, tmpfld,
| 894-47090 | ||||||||||||||||||||||||
| 236 | indent + 2, seqtt, pctx)
| 894-47090 | ||||||||||||||||||||||||
| 237 | return executed 894 times by 1 test: 0;return 0;Executed by:
executed 894 times by 1 test: return 0;Executed by:
| 894 | ||||||||||||||||||||||||
| 238 | } executed 47090 times by 1 test: end of blockExecuted by:
| 47090 | ||||||||||||||||||||||||
| 239 | if (pctx->flags & 0x002
| 5-16200 | ||||||||||||||||||||||||
| 240 | if (BIO_printf(out, "%*s}\n", indent, "") < 0
| 0-16200 | ||||||||||||||||||||||||
| 241 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 242 | } executed 16200 times by 1 test: end of blockExecuted by:
| 16200 | ||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||
| 244 | if (asn1_cb
| 1607-14598 | ||||||||||||||||||||||||
| 245 | i = asn1_cb(9, fld, it, &parg); | - | ||||||||||||||||||||||||
| 246 | if (i == 0
| 0-1607 | ||||||||||||||||||||||||
| 247 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 248 | } executed 1607 times by 1 test: end of blockExecuted by:
| 1607 | ||||||||||||||||||||||||
| 249 | break; executed 16205 times by 1 test: break;Executed by:
| 16205 | ||||||||||||||||||||||||
| 250 | - | |||||||||||||||||||||||||
| 251 | default never executed: :default:never executed: default: | 0 | ||||||||||||||||||||||||
| 252 | BIO_printf(out, "Unprocessed type %d\n", it->itype); | - | ||||||||||||||||||||||||
| 253 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 254 | } | - | ||||||||||||||||||||||||
| 255 | - | |||||||||||||||||||||||||
| 256 | return executed 87408 times by 1 test: 1;return 1;Executed by:
executed 87408 times by 1 test: return 1;Executed by:
| 87408 | ||||||||||||||||||||||||
| 257 | } | - | ||||||||||||||||||||||||
| 258 | - | |||||||||||||||||||||||||
| 259 | static int asn1_template_print_ctx(BIO *out, ASN1_VALUE **fld, int indent, | - | ||||||||||||||||||||||||
| 260 | const ASN1_TEMPLATE *tt, const ASN1_PCTX *pctx) | - | ||||||||||||||||||||||||
| 261 | { | - | ||||||||||||||||||||||||
| 262 | int i, flags; | - | ||||||||||||||||||||||||
| 263 | const char *sname, *fname; | - | ||||||||||||||||||||||||
| 264 | ASN1_VALUE *tfld; | - | ||||||||||||||||||||||||
| 265 | flags = tt->flags; | - | ||||||||||||||||||||||||
| 266 | if (pctx->flags & 0x080
| 15-54842 | ||||||||||||||||||||||||
| 267 | sname = (tt->item)->sname; executed 54842 times by 1 test: sname = (tt->item)->sname;Executed by:
| 54842 | ||||||||||||||||||||||||
| 268 | else | - | ||||||||||||||||||||||||
| 269 | sname = executed 15 times by 1 test: sname = ((void *)0) ;Executed by:
| 15 | ||||||||||||||||||||||||
| 270 | ((void *)0) executed 15 times by 1 test: sname = ((void *)0) ;Executed by:
| 15 | ||||||||||||||||||||||||
| 271 | ; executed 15 times by 1 test: sname = ((void *)0) ;Executed by:
| 15 | ||||||||||||||||||||||||
| 272 | if (pctx->flags & 0x040
| 0-54857 | ||||||||||||||||||||||||
| 273 | fname = never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 274 | ((void *)0) never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 275 | ; never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 276 | else | - | ||||||||||||||||||||||||
| 277 | fname = tt->field_name; executed 54857 times by 1 test: fname = tt->field_name;Executed by:
| 54857 | ||||||||||||||||||||||||
| 278 | - | |||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||
| 280 | - | |||||||||||||||||||||||||
| 281 | - | |||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||
| 283 | if (flags & (0x1 << 12)
| 5380-49477 | ||||||||||||||||||||||||
| 284 | tfld = (ASN1_VALUE *)fld; | - | ||||||||||||||||||||||||
| 285 | fld = &tfld; | - | ||||||||||||||||||||||||
| 286 | } executed 5380 times by 1 test: end of blockExecuted by:
| 5380 | ||||||||||||||||||||||||
| 287 | - | |||||||||||||||||||||||||
| 288 | if (flags & (0x3 << 1)
| 8584-46273 | ||||||||||||||||||||||||
| 289 | char *tname; | - | ||||||||||||||||||||||||
| 290 | ASN1_VALUE *skitem; | - | ||||||||||||||||||||||||
| 291 | struct stack_st_ASN1_VALUE *stack; | - | ||||||||||||||||||||||||
| 292 | - | |||||||||||||||||||||||||
| 293 | - | |||||||||||||||||||||||||
| 294 | if (fname
| 0-8584 | ||||||||||||||||||||||||
| 295 | if (pctx->flags & 0x004
| 0-8584 | ||||||||||||||||||||||||
| 296 | if (flags & (0x1 << 1)
| 2049-6535 | ||||||||||||||||||||||||
| 297 | tname = "SET"; executed 2049 times by 1 test: tname = "SET";Executed by:
| 2049 | ||||||||||||||||||||||||
| 298 | else | - | ||||||||||||||||||||||||
| 299 | tname = "SEQUENCE"; executed 6535 times by 1 test: tname = "SEQUENCE";Executed by:
| 6535 | ||||||||||||||||||||||||
| 300 | if (BIO_printf(out, "%*s%s OF %s {\n",
| 0-8584 | ||||||||||||||||||||||||
| 301 | indent, "", tname, tt->field_name) <= 0
| 0-8584 | ||||||||||||||||||||||||
| 302 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 303 | } executed 8584 times by 1 test: else if (BIO_printf(out, "%*s%s:\n", indent, "", fname) <= 0end of blockExecuted by:
| 0-8584 | ||||||||||||||||||||||||
| 304 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 305 | } executed 8584 times by 1 test: end of blockExecuted by:
| 8584 | ||||||||||||||||||||||||
| 306 | stack = (struct stack_st_ASN1_VALUE *)*fld; | - | ||||||||||||||||||||||||
| 307 | for (i = 0; i < sk_ASN1_VALUE_num(stack)
| 8326-38671 | ||||||||||||||||||||||||
| 308 | if ((
| 0-35150 | ||||||||||||||||||||||||
| 309 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 310 | - | |||||||||||||||||||||||||
| 311 | skitem = sk_ASN1_VALUE_value(stack, i); | - | ||||||||||||||||||||||||
| 312 | if (!asn1_item_print_ctx(out, &skitem, indent + 2,
| 258-38413 | ||||||||||||||||||||||||
| 313 | (tt->item),
| 258-38413 | ||||||||||||||||||||||||
| 314 | ((void *)0)
| 258-38413 | ||||||||||||||||||||||||
| 315 | ,
| 258-38413 | ||||||||||||||||||||||||
| 316 | ((void *)0)
| 258-38413 | ||||||||||||||||||||||||
| 317 | , 1,
| 258-38413 | ||||||||||||||||||||||||
| 318 | pctx)
| 258-38413 | ||||||||||||||||||||||||
| 319 | return executed 258 times by 1 test: 0;return 0;Executed by:
executed 258 times by 1 test: return 0;Executed by:
| 258 | ||||||||||||||||||||||||
| 320 | } executed 38413 times by 1 test: end of blockExecuted by:
| 38413 | ||||||||||||||||||||||||
| 321 | if (i == 0
| 0-5063 | ||||||||||||||||||||||||
| 322 | stack ==
| 0-5063 | ||||||||||||||||||||||||
| 323 | ((void *)0)
| 0-5063 | ||||||||||||||||||||||||
| 324 | ? "ABSENT" : "EMPTY") <= 0
| 0-5063 | ||||||||||||||||||||||||
| 325 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 326 | if (pctx->flags & 0x002
| 0-8326 | ||||||||||||||||||||||||
| 327 | if (BIO_printf(out, "%*s}\n", indent, "") <= 0
| 0-8326 | ||||||||||||||||||||||||
| 328 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 329 | } executed 8326 times by 1 test: end of blockExecuted by:
| 8326 | ||||||||||||||||||||||||
| 330 | return executed 8326 times by 1 test: 1;return 1;Executed by:
executed 8326 times by 1 test: return 1;Executed by:
| 8326 | ||||||||||||||||||||||||
| 331 | } | - | ||||||||||||||||||||||||
| 332 | return executed 46273 times by 1 test: asn1_item_print_ctx(out, fld, indent, (tt->item),return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);Executed by:
executed 46273 times by 1 test: return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);Executed by:
| 46273 | ||||||||||||||||||||||||
| 333 | fname, sname, 0, pctx); executed 46273 times by 1 test: return asn1_item_print_ctx(out, fld, indent, (tt->item), fname, sname, 0, pctx);Executed by:
| 46273 | ||||||||||||||||||||||||
| 334 | } | - | ||||||||||||||||||||||||
| 335 | - | |||||||||||||||||||||||||
| 336 | static int asn1_print_fsname(BIO *out, int indent, | - | ||||||||||||||||||||||||
| 337 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 338 | const ASN1_PCTX *pctx) | - | ||||||||||||||||||||||||
| 339 | { | - | ||||||||||||||||||||||||
| 340 | static const char spaces[] = " "; | - | ||||||||||||||||||||||||
| 341 | static const int nspaces = sizeof(spaces) - 1; | - | ||||||||||||||||||||||||
| 342 | - | |||||||||||||||||||||||||
| 343 | while (indent > nspaces
| 1017-77464 | ||||||||||||||||||||||||
| 344 | if (BIO_write(out, spaces, nspaces) != nspaces
| 0-1017 | ||||||||||||||||||||||||
| 345 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 346 | indent -= nspaces; | - | ||||||||||||||||||||||||
| 347 | } executed 1017 times by 1 test: end of blockExecuted by:
| 1017 | ||||||||||||||||||||||||
| 348 | if (BIO_write(out, spaces, indent) != indent
| 0-77464 | ||||||||||||||||||||||||
| 349 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 350 | if (pctx->flags & 0x100
| 0-77464 | ||||||||||||||||||||||||
| 351 | sname = never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 352 | ((void *)0) never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 353 | ; never executed: sname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 354 | if (pctx->flags & 0x040
| 0-77464 | ||||||||||||||||||||||||
| 355 | fname = never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 356 | ((void *)0) never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 357 | ; never executed: fname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 358 | if (!sname
| 15-53623 | ||||||||||||||||||||||||
| 359 | return executed 23826 times by 1 test: 1;return 1;Executed by:
executed 23826 times by 1 test: return 1;Executed by:
| 23826 | ||||||||||||||||||||||||
| 360 | if (fname
| 8430-45208 | ||||||||||||||||||||||||
| 361 | if (BIO_puts(out, fname) <= 0
| 0-45208 | ||||||||||||||||||||||||
| 362 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 363 | } executed 45208 times by 1 test: end of blockExecuted by:
| 45208 | ||||||||||||||||||||||||
| 364 | if (sname
| 15-53623 | ||||||||||||||||||||||||
| 365 | if (fname
| 8430-45193 | ||||||||||||||||||||||||
| 366 | if (BIO_printf(out, " (%s)", sname) <= 0
| 0-45193 | ||||||||||||||||||||||||
| 367 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 368 | } executed 45193 times by 1 test: else {end of blockExecuted by:
| 45193 | ||||||||||||||||||||||||
| 369 | if (BIO_puts(out, sname) <= 0
| 0-8430 | ||||||||||||||||||||||||
| 370 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 371 | } executed 8430 times by 1 test: end of blockExecuted by:
| 8430 | ||||||||||||||||||||||||
| 372 | } | - | ||||||||||||||||||||||||
| 373 | if (BIO_write(out, ": ", 2) != 2
| 0-53638 | ||||||||||||||||||||||||
| 374 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 375 | return executed 53638 times by 1 test: 1;return 1;Executed by:
executed 53638 times by 1 test: return 1;Executed by:
| 53638 | ||||||||||||||||||||||||
| 376 | } | - | ||||||||||||||||||||||||
| 377 | - | |||||||||||||||||||||||||
| 378 | static int asn1_print_boolean(BIO *out, int boolval) | - | ||||||||||||||||||||||||
| 379 | { | - | ||||||||||||||||||||||||
| 380 | const char *str; | - | ||||||||||||||||||||||||
| 381 | switch (boolval) { | - | ||||||||||||||||||||||||
| 382 | case executed 1062 times by 1 test: -1:case -1:Executed by:
executed 1062 times by 1 test: case -1:Executed by:
| 1062 | ||||||||||||||||||||||||
| 383 | str = "BOOL ABSENT"; | - | ||||||||||||||||||||||||
| 384 | break; executed 1062 times by 1 test: break;Executed by:
| 1062 | ||||||||||||||||||||||||
| 385 | - | |||||||||||||||||||||||||
| 386 | case executed 566 times by 1 test: 0:case 0:Executed by:
executed 566 times by 1 test: case 0:Executed by:
| 566 | ||||||||||||||||||||||||
| 387 | str = "FALSE"; | - | ||||||||||||||||||||||||
| 388 | break; executed 566 times by 1 test: break;Executed by:
| 566 | ||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||
| 390 | default executed 1063 times by 1 test: :default:Executed by:
executed 1063 times by 1 test: default:Executed by:
| 1063 | ||||||||||||||||||||||||
| 391 | str = "TRUE"; | - | ||||||||||||||||||||||||
| 392 | break; executed 1063 times by 1 test: break;Executed by:
| 1063 | ||||||||||||||||||||||||
| 393 | - | |||||||||||||||||||||||||
| 394 | } | - | ||||||||||||||||||||||||
| 395 | - | |||||||||||||||||||||||||
| 396 | if (BIO_puts(out, str) <= 0
| 0-2691 | ||||||||||||||||||||||||
| 397 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 398 | return executed 2691 times by 1 test: 1;return 1;Executed by:
executed 2691 times by 1 test: return 1;Executed by:
| 2691 | ||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||
| 400 | } | - | ||||||||||||||||||||||||
| 401 | - | |||||||||||||||||||||||||
| 402 | static int asn1_print_integer(BIO *out, const ASN1_INTEGER *str) | - | ||||||||||||||||||||||||
| 403 | { | - | ||||||||||||||||||||||||
| 404 | char *s; | - | ||||||||||||||||||||||||
| 405 | int ret = 1; | - | ||||||||||||||||||||||||
| 406 | s = i2s_ASN1_INTEGER( | - | ||||||||||||||||||||||||
| 407 | ((void *)0) | - | ||||||||||||||||||||||||
| 408 | , str); | - | ||||||||||||||||||||||||
| 409 | if (s ==
| 38-7608 | ||||||||||||||||||||||||
| 410 | ((void *)0)
| 38-7608 | ||||||||||||||||||||||||
| 411 | ) | - | ||||||||||||||||||||||||
| 412 | return executed 38 times by 1 test: 0;return 0;Executed by:
executed 38 times by 1 test: return 0;Executed by:
| 38 | ||||||||||||||||||||||||
| 413 | if (BIO_puts(out, s) <= 0
| 0-7608 | ||||||||||||||||||||||||
| 414 | ret = 0; never executed: ret = 0; | 0 | ||||||||||||||||||||||||
| 415 | CRYPTO_free(s, __FILE__, 402); | - | ||||||||||||||||||||||||
| 416 | return executed 7608 times by 1 test: ret;return ret;Executed by:
executed 7608 times by 1 test: return ret;Executed by:
| 7608 | ||||||||||||||||||||||||
| 417 | } | - | ||||||||||||||||||||||||
| 418 | - | |||||||||||||||||||||||||
| 419 | static int asn1_print_oid(BIO *out, const ASN1_OBJECT *oid) | - | ||||||||||||||||||||||||
| 420 | { | - | ||||||||||||||||||||||||
| 421 | char objbuf[80]; | - | ||||||||||||||||||||||||
| 422 | const char *ln; | - | ||||||||||||||||||||||||
| 423 | ln = OBJ_nid2ln(OBJ_obj2nid(oid)); | - | ||||||||||||||||||||||||
| 424 | if (!ln
| 0-8946 | ||||||||||||||||||||||||
| 425 | ln = ""; never executed: ln = ""; | 0 | ||||||||||||||||||||||||
| 426 | OBJ_obj2txt(objbuf, sizeof(objbuf), oid, 1); | - | ||||||||||||||||||||||||
| 427 | if (BIO_printf(out, "%s (%s)", ln, objbuf) <= 0
| 0-8946 | ||||||||||||||||||||||||
| 428 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 429 | return executed 8946 times by 1 test: 1;return 1;Executed by:
executed 8946 times by 1 test: return 1;Executed by:
| 8946 | ||||||||||||||||||||||||
| 430 | } | - | ||||||||||||||||||||||||
| 431 | - | |||||||||||||||||||||||||
| 432 | static int asn1_print_obstring(BIO *out, const ASN1_STRING *str, int indent) | - | ||||||||||||||||||||||||
| 433 | { | - | ||||||||||||||||||||||||
| 434 | if (str->type == 3
| 1715-4230 | ||||||||||||||||||||||||
| 435 | if (BIO_printf(out, " (%ld unused bits)\n", str->flags & 0x7) <= 0
| 0-1715 | ||||||||||||||||||||||||
| 436 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 437 | } executed 1715 times by 1 test: else if (BIO_puts(out, "\n") <= 0end of blockExecuted by:
| 0-4230 | ||||||||||||||||||||||||
| 438 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 439 | if ((
| 1529-4416 | ||||||||||||||||||||||||
| 440 | && BIO_dump_indent(out, (const char *)str->data, str->length,
| 0-4416 | ||||||||||||||||||||||||
| 441 | indent + 2) <= 0
| 0-4416 | ||||||||||||||||||||||||
| 442 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 443 | return executed 5945 times by 1 test: 1;return 1;Executed by:
executed 5945 times by 1 test: return 1;Executed by:
| 5945 | ||||||||||||||||||||||||
| 444 | } | - | ||||||||||||||||||||||||
| 445 | - | |||||||||||||||||||||||||
| 446 | static int asn1_primitive_print(BIO *out, ASN1_VALUE **fld, | - | ||||||||||||||||||||||||
| 447 | const ASN1_ITEM *it, int indent, | - | ||||||||||||||||||||||||
| 448 | const char *fname, const char *sname, | - | ||||||||||||||||||||||||
| 449 | const ASN1_PCTX *pctx) | - | ||||||||||||||||||||||||
| 450 | { | - | ||||||||||||||||||||||||
| 451 | long utype; | - | ||||||||||||||||||||||||
| 452 | ASN1_STRING *str; | - | ||||||||||||||||||||||||
| 453 | int ret = 1, needlf = 1; | - | ||||||||||||||||||||||||
| 454 | const char *pname; | - | ||||||||||||||||||||||||
| 455 | const ASN1_PRIMITIVE_FUNCS *pf; | - | ||||||||||||||||||||||||
| 456 | pf = it->funcs; | - | ||||||||||||||||||||||||
| 457 | if (!asn1_print_fsname(out, indent, fname, sname, pctx)
| 0-65741 | ||||||||||||||||||||||||
| 458 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 459 | if (pf
| 0-53477 | ||||||||||||||||||||||||
| 460 | return executed 12264 times by 1 test: pf->prim_print(out, fld, it, indent, pctx);return pf->prim_print(out, fld, it, indent, pctx);Executed by:
executed 12264 times by 1 test: return pf->prim_print(out, fld, it, indent, pctx);Executed by:
| 12264 | ||||||||||||||||||||||||
| 461 | if (it->itype == 0x5
| 3871-49606 | ||||||||||||||||||||||||
| 462 | str = (ASN1_STRING *)*fld; | - | ||||||||||||||||||||||||
| 463 | utype = str->type & ~0x100; | - | ||||||||||||||||||||||||
| 464 | } executed 3871 times by 1 test: else {end of blockExecuted by:
| 3871 | ||||||||||||||||||||||||
| 465 | utype = it->utype; | - | ||||||||||||||||||||||||
| 466 | if (utype == 1
| 2434-47172 | ||||||||||||||||||||||||
| 467 | str = executed 2434 times by 1 test: str = ((void *)0) ;Executed by:
| 2434 | ||||||||||||||||||||||||
| 468 | ((void *)0) executed 2434 times by 1 test: str = ((void *)0) ;Executed by:
| 2434 | ||||||||||||||||||||||||
| 469 | ; executed 2434 times by 1 test: str = ((void *)0) ;Executed by:
| 2434 | ||||||||||||||||||||||||
| 470 | else | - | ||||||||||||||||||||||||
| 471 | str = (ASN1_STRING *)*fld; executed 47172 times by 1 test: str = (ASN1_STRING *)*fld;Executed by:
| 47172 | ||||||||||||||||||||||||
| 472 | } | - | ||||||||||||||||||||||||
| 473 | if (utype == -4
| 25183-28294 | ||||||||||||||||||||||||
| 474 | ASN1_TYPE *atype = (ASN1_TYPE *)*fld; | - | ||||||||||||||||||||||||
| 475 | utype = atype->type; | - | ||||||||||||||||||||||||
| 476 | fld = &atype->value.asn1_value; | - | ||||||||||||||||||||||||
| 477 | str = (ASN1_STRING *)*fld; | - | ||||||||||||||||||||||||
| 478 | if (pctx->flags & 0x010
| 0-28294 | ||||||||||||||||||||||||
| 479 | pname = never executed: pname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 480 | ((void *)0) never executed: pname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 481 | ; never executed: pname = ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 482 | else | - | ||||||||||||||||||||||||
| 483 | pname = ASN1_tag2str(utype); executed 28294 times by 1 test: pname = ASN1_tag2str(utype);Executed by:
| 28294 | ||||||||||||||||||||||||
| 484 | } else { | - | ||||||||||||||||||||||||
| 485 | if (pctx->flags & 0x008
| 5-25178 | ||||||||||||||||||||||||
| 486 | pname = ASN1_tag2str(utype); executed 25178 times by 1 test: pname = ASN1_tag2str(utype);Executed by:
| 25178 | ||||||||||||||||||||||||
| 487 | else | - | ||||||||||||||||||||||||
| 488 | pname = executed 5 times by 1 test: pname = ((void *)0) ;Executed by:
| 5 | ||||||||||||||||||||||||
| 489 | ((void *)0) executed 5 times by 1 test: pname = ((void *)0) ;Executed by:
| 5 | ||||||||||||||||||||||||
| 490 | ; executed 5 times by 1 test: pname = ((void *)0) ;Executed by:
| 5 | ||||||||||||||||||||||||
| 491 | } | - | ||||||||||||||||||||||||
| 492 | - | |||||||||||||||||||||||||
| 493 | if (utype == 5
| 1694-51783 | ||||||||||||||||||||||||
| 494 | if (BIO_puts(out, "NULL\n") <= 0
| 0-1694 | ||||||||||||||||||||||||
| 495 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 496 | return executed 1694 times by 1 test: 1;return 1;Executed by:
executed 1694 times by 1 test: return 1;Executed by:
| 1694 | ||||||||||||||||||||||||
| 497 | } | - | ||||||||||||||||||||||||
| 498 | - | |||||||||||||||||||||||||
| 499 | if (pname
| 5-51778 | ||||||||||||||||||||||||
| 500 | if (BIO_puts(out, pname) <= 0
| 0-51778 | ||||||||||||||||||||||||
| 501 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 502 | if (BIO_puts(out, ":") <= 0
| 0-51778 | ||||||||||||||||||||||||
| 503 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 504 | } executed 51778 times by 1 test: end of blockExecuted by:
| 51778 | ||||||||||||||||||||||||
| 505 | - | |||||||||||||||||||||||||
| 506 | switch (utype) { | - | ||||||||||||||||||||||||
| 507 | case executed 2691 times by 1 test: 1:case 1:Executed by:
executed 2691 times by 1 test: case 1:Executed by:
| 2691 | ||||||||||||||||||||||||
| 508 | { | - | ||||||||||||||||||||||||
| 509 | int boolval = *(int *)fld; | - | ||||||||||||||||||||||||
| 510 | if (boolval == -1
| 1062-1629 | ||||||||||||||||||||||||
| 511 | boolval = it->size; executed 1062 times by 1 test: boolval = it->size;Executed by:
| 1062 | ||||||||||||||||||||||||
| 512 | ret = asn1_print_boolean(out, boolval); | - | ||||||||||||||||||||||||
| 513 | } | - | ||||||||||||||||||||||||
| 514 | break; executed 2691 times by 1 test: break;Executed by:
| 2691 | ||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||
| 516 | case executed 7608 times by 1 test: 2:case 2:Executed by:
executed 7608 times by 1 test: case 2:Executed by:
| 7608 | ||||||||||||||||||||||||
| 517 | case executed 38 times by 1 test: 10:case 10:Executed by:
executed 38 times by 1 test: case 10:Executed by:
| 38 | ||||||||||||||||||||||||
| 518 | ret = asn1_print_integer(out, str); | - | ||||||||||||||||||||||||
| 519 | break; executed 7646 times by 1 test: break;Executed by:
| 7646 | ||||||||||||||||||||||||
| 520 | - | |||||||||||||||||||||||||
| 521 | case executed 1949 times by 1 test: 23:case 23:Executed by:
executed 1949 times by 1 test: case 23:Executed by:
| 1949 | ||||||||||||||||||||||||
| 522 | ret = ASN1_UTCTIME_print(out, str); | - | ||||||||||||||||||||||||
| 523 | break; executed 1949 times by 1 test: break;Executed by:
| 1949 | ||||||||||||||||||||||||
| 524 | - | |||||||||||||||||||||||||
| 525 | case executed 1304 times by 1 test: 24:case 24:Executed by:
executed 1304 times by 1 test: case 24:Executed by:
| 1304 | ||||||||||||||||||||||||
| 526 | ret = ASN1_GENERALIZEDTIME_print(out, str); | - | ||||||||||||||||||||||||
| 527 | break; executed 1304 times by 1 test: break;Executed by:
| 1304 | ||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||
| 529 | case executed 8946 times by 1 test: 6:case 6:Executed by:
executed 8946 times by 1 test: case 6:Executed by:
| 8946 | ||||||||||||||||||||||||
| 530 | ret = asn1_print_oid(out, (const ASN1_OBJECT *)*fld); | - | ||||||||||||||||||||||||
| 531 | break; executed 8946 times by 1 test: break;Executed by:
| 8946 | ||||||||||||||||||||||||
| 532 | - | |||||||||||||||||||||||||
| 533 | case executed 4230 times by 1 test: 4:case 4:Executed by:
executed 4230 times by 1 test: case 4:Executed by:
| 4230 | ||||||||||||||||||||||||
| 534 | case executed 1715 times by 1 test: 3:case 3:Executed by:
executed 1715 times by 1 test: case 3:Executed by:
| 1715 | ||||||||||||||||||||||||
| 535 | ret = asn1_print_obstring(out, str, indent); | - | ||||||||||||||||||||||||
| 536 | needlf = 0; | - | ||||||||||||||||||||||||
| 537 | break; executed 5945 times by 1 test: break;Executed by:
| 5945 | ||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||
| 539 | case executed 11569 times by 1 test: 16:case 16:Executed by:
executed 11569 times by 1 test: case 16:Executed by:
| 11569 | ||||||||||||||||||||||||
| 540 | case executed 764 times by 1 test: 17:case 17:Executed by:
executed 764 times by 1 test: case 17:Executed by:
| 764 | ||||||||||||||||||||||||
| 541 | case executed 7955 times by 1 test: -3:case -3:Executed by:
executed 7955 times by 1 test: case -3:Executed by:
| 7955 | ||||||||||||||||||||||||
| 542 | if (BIO_puts(out, "\n") <= 0
| 0-20288 | ||||||||||||||||||||||||
| 543 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 544 | if (ASN1_parse_dump(out, str->data, str->length, indent, 0) <= 0
| 830-19458 | ||||||||||||||||||||||||
| 545 | ret = 0; executed 830 times by 1 test: ret = 0;Executed by:
| 830 | ||||||||||||||||||||||||
| 546 | needlf = 0; | - | ||||||||||||||||||||||||
| 547 | break; executed 20288 times by 1 test: break;Executed by:
| 20288 | ||||||||||||||||||||||||
| 548 | - | |||||||||||||||||||||||||
| 549 | default executed 3014 times by 1 test: :default:Executed by:
executed 3014 times by 1 test: default:Executed by:
| 3014 | ||||||||||||||||||||||||
| 550 | ret = ASN1_STRING_print_ex(out, str, pctx->str_flags); | - | ||||||||||||||||||||||||
| 551 | - | |||||||||||||||||||||||||
| 552 | } executed 3014 times by 1 test: end of blockExecuted by:
| 3014 | ||||||||||||||||||||||||
| 553 | if (!ret
| 1211-50572 | ||||||||||||||||||||||||
| 554 | return executed 1211 times by 1 test: 0;return 0;Executed by:
executed 1211 times by 1 test: return 0;Executed by:
| 1211 | ||||||||||||||||||||||||
| 555 | if (needlf
| 0-25403 | ||||||||||||||||||||||||
| 556 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 557 | return executed 50572 times by 1 test: 1;return 1;Executed by:
executed 50572 times by 1 test: return 1;Executed by:
| 50572 | ||||||||||||||||||||||||
| 558 | } | - | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |