| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/ecdsa/ecs_asn1.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||
|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||
| 2 | static const ASN1_TEMPLATE ECDSA_SIG_seq_tt[] = { | - | ||||||
| 3 | { | - | ||||||
| 4 | .flags = 0, | - | ||||||
| 5 | .tag = 0, | - | ||||||
| 6 | .offset = | - | ||||||
| 7 | __builtin_offsetof ( | - | ||||||
| 8 | ECDSA_SIG | - | ||||||
| 9 | , | - | ||||||
| 10 | r | - | ||||||
| 11 | ) | - | ||||||
| 12 | , | - | ||||||
| 13 | .field_name = "r", | - | ||||||
| 14 | .item = &CBIGNUM_it, | - | ||||||
| 15 | }, | - | ||||||
| 16 | { | - | ||||||
| 17 | .flags = 0, | - | ||||||
| 18 | .tag = 0, | - | ||||||
| 19 | .offset = | - | ||||||
| 20 | __builtin_offsetof ( | - | ||||||
| 21 | ECDSA_SIG | - | ||||||
| 22 | , | - | ||||||
| 23 | s | - | ||||||
| 24 | ) | - | ||||||
| 25 | , | - | ||||||
| 26 | .field_name = "s", | - | ||||||
| 27 | .item = &CBIGNUM_it, | - | ||||||
| 28 | }, | - | ||||||
| 29 | }; | - | ||||||
| 30 | - | |||||||
| 31 | const ASN1_ITEM ECDSA_SIG_it = { | - | ||||||
| 32 | .itype = 0x1, | - | ||||||
| 33 | .utype = 16, | - | ||||||
| 34 | .templates = ECDSA_SIG_seq_tt, | - | ||||||
| 35 | .tcount = sizeof(ECDSA_SIG_seq_tt) / sizeof(ASN1_TEMPLATE), | - | ||||||
| 36 | .funcs = | - | ||||||
| 37 | ((void *)0) | - | ||||||
| 38 | , | - | ||||||
| 39 | .size = sizeof(ECDSA_SIG), | - | ||||||
| 40 | .sname = "ECDSA_SIG", | - | ||||||
| 41 | }; | - | ||||||
| 42 | - | |||||||
| 43 | ECDSA_SIG *ECDSA_SIG_new(void); | - | ||||||
| 44 | void ECDSA_SIG_free(ECDSA_SIG *a); | - | ||||||
| 45 | ECDSA_SIG *d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len); | - | ||||||
| 46 | int i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out); | - | ||||||
| 47 | - | |||||||
| 48 | ECDSA_SIG * | - | ||||||
| 49 | d2i_ECDSA_SIG(ECDSA_SIG **a, const unsigned char **in, long len) | - | ||||||
| 50 | { | - | ||||||
| 51 | return executed 532 times by 1 test: (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len,return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ECDSA_SIG_it);Executed by:
executed 532 times by 1 test: return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ECDSA_SIG_it);Executed by:
| 532 | ||||||
| 52 | &ECDSA_SIG_it); executed 532 times by 1 test: return (ECDSA_SIG *)ASN1_item_d2i((ASN1_VALUE **)a, in, len, &ECDSA_SIG_it);Executed by:
| 532 | ||||||
| 53 | } | - | ||||||
| 54 | - | |||||||
| 55 | int | - | ||||||
| 56 | i2d_ECDSA_SIG(const ECDSA_SIG *a, unsigned char **out) | - | ||||||
| 57 | { | - | ||||||
| 58 | return executed 608 times by 1 test: ASN1_item_i2d((ASN1_VALUE *)a, out, &ECDSA_SIG_it);return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECDSA_SIG_it);Executed by:
executed 608 times by 1 test: return ASN1_item_i2d((ASN1_VALUE *)a, out, &ECDSA_SIG_it);Executed by:
| 608 | ||||||
| 59 | } | - | ||||||
| 60 | - | |||||||
| 61 | ECDSA_SIG * | - | ||||||
| 62 | ECDSA_SIG_new(void) | - | ||||||
| 63 | { | - | ||||||
| 64 | return executed 532 times by 1 test: (ECDSA_SIG *)ASN1_item_new(&ECDSA_SIG_it);return (ECDSA_SIG *)ASN1_item_new(&ECDSA_SIG_it);Executed by:
executed 532 times by 1 test: return (ECDSA_SIG *)ASN1_item_new(&ECDSA_SIG_it);Executed by:
| 532 | ||||||
| 65 | } | - | ||||||
| 66 | - | |||||||
| 67 | void | - | ||||||
| 68 | ECDSA_SIG_free(ECDSA_SIG *a) | - | ||||||
| 69 | { | - | ||||||
| 70 | ASN1_item_free((ASN1_VALUE *)a, &ECDSA_SIG_it); | - | ||||||
| 71 | } executed 610 times by 2 tests: end of blockExecuted by:
| 610 | ||||||
| 72 | - | |||||||
| 73 | void | - | ||||||
| 74 | ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | - | ||||||
| 75 | { | - | ||||||
| 76 | if (pr !=
| 0 | ||||||
| 77 | ((void *)0)
| 0 | ||||||
| 78 | ) | - | ||||||
| 79 | * never executed: pr = sig->r;*pr = sig->r;never executed: *pr = sig->r; | 0 | ||||||
| 80 | if (ps !=
| 0 | ||||||
| 81 | ((void *)0)
| 0 | ||||||
| 82 | ) | - | ||||||
| 83 | * never executed: ps = sig->s;*ps = sig->s;never executed: *ps = sig->s; | 0 | ||||||
| 84 | } never executed: end of block | 0 | ||||||
| 85 | - | |||||||
| 86 | int | - | ||||||
| 87 | ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) | - | ||||||
| 88 | { | - | ||||||
| 89 | if (r ==
| 0 | ||||||
| 90 | ((void *)0)
| 0 | ||||||
| 91 | || s ==
| 0 | ||||||
| 92 | ((void *)0)
| 0 | ||||||
| 93 | ) | - | ||||||
| 94 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||
| 95 | - | |||||||
| 96 | BN_clear_free(sig->r); | - | ||||||
| 97 | BN_clear_free(sig->s); | - | ||||||
| 98 | sig->r = r; | - | ||||||
| 99 | sig->s = s; | - | ||||||
| 100 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||
| 101 | } | - | ||||||
| Switch to Source code | Preprocessed file |