| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/x509/x509cset.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | int X509_CRL_set_version(X509_CRL *x, long version) | - | ||||||||||||
| 3 | { | - | ||||||||||||
| 4 | if (x ==
| 0 | ||||||||||||
| 5 | ((void *)0)
| 0 | ||||||||||||
| 6 | ) | - | ||||||||||||
| 7 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 8 | if (x->crl.version ==
| 0 | ||||||||||||
| 9 | ((void *)0)
| 0 | ||||||||||||
| 10 | ) { | - | ||||||||||||
| 11 | if ((
| 0 | ||||||||||||
| 12 | ((void *)0)
| 0 | ||||||||||||
| 13 | ) | - | ||||||||||||
| 14 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 15 | } never executed: end of block | 0 | ||||||||||||
| 16 | return never executed: ASN1_INTEGER_set(x->crl.version, version);return ASN1_INTEGER_set(x->crl.version, version);never executed: return ASN1_INTEGER_set(x->crl.version, version); | 0 | ||||||||||||
| 17 | } | - | ||||||||||||
| 18 | - | |||||||||||||
| 19 | int X509_CRL_set_issuer_name(X509_CRL *x, X509_NAME *name) | - | ||||||||||||
| 20 | { | - | ||||||||||||
| 21 | if (x ==
| 0 | ||||||||||||
| 22 | ((void *)0)
| 0 | ||||||||||||
| 23 | ) | - | ||||||||||||
| 24 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 25 | return never executed: X509_NAME_set(&x->crl.issuer, name);return X509_NAME_set(&x->crl.issuer, name);never executed: return X509_NAME_set(&x->crl.issuer, name); | 0 | ||||||||||||
| 26 | } | - | ||||||||||||
| 27 | - | |||||||||||||
| 28 | int X509_CRL_set1_lastUpdate(X509_CRL *x, const ASN1_TIME *tm) | - | ||||||||||||
| 29 | { | - | ||||||||||||
| 30 | if (x ==
| 0 | ||||||||||||
| 31 | ((void *)0)
| 0 | ||||||||||||
| 32 | ) | - | ||||||||||||
| 33 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 34 | return never executed: x509_set1_time(&x->crl.lastUpdate, tm);return x509_set1_time(&x->crl.lastUpdate, tm);never executed: return x509_set1_time(&x->crl.lastUpdate, tm); | 0 | ||||||||||||
| 35 | } | - | ||||||||||||
| 36 | - | |||||||||||||
| 37 | int X509_CRL_set1_nextUpdate(X509_CRL *x, const ASN1_TIME *tm) | - | ||||||||||||
| 38 | { | - | ||||||||||||
| 39 | if (x ==
| 0 | ||||||||||||
| 40 | ((void *)0)
| 0 | ||||||||||||
| 41 | ) | - | ||||||||||||
| 42 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 43 | return never executed: x509_set1_time(&x->crl.nextUpdate, tm);return x509_set1_time(&x->crl.nextUpdate, tm);never executed: return x509_set1_time(&x->crl.nextUpdate, tm); | 0 | ||||||||||||
| 44 | } | - | ||||||||||||
| 45 | - | |||||||||||||
| 46 | int X509_CRL_sort(X509_CRL *c) | - | ||||||||||||
| 47 | { | - | ||||||||||||
| 48 | int i; | - | ||||||||||||
| 49 | X509_REVOKED *r; | - | ||||||||||||
| 50 | - | |||||||||||||
| 51 | - | |||||||||||||
| 52 | - | |||||||||||||
| 53 | sk_X509_REVOKED_sort(c->crl.revoked); | - | ||||||||||||
| 54 | for (i = 0; i < sk_X509_REVOKED_num(c->crl.revoked)
| 0 | ||||||||||||
| 55 | r = sk_X509_REVOKED_value(c->crl.revoked, i); | - | ||||||||||||
| 56 | r->sequence = i; | - | ||||||||||||
| 57 | } never executed: end of block | 0 | ||||||||||||
| 58 | c->crl.enc.modified = 1; | - | ||||||||||||
| 59 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 60 | } | - | ||||||||||||
| 61 | - | |||||||||||||
| 62 | int X509_CRL_up_ref(X509_CRL *crl) | - | ||||||||||||
| 63 | { | - | ||||||||||||
| 64 | int i; | - | ||||||||||||
| 65 | - | |||||||||||||
| 66 | if (CRYPTO_UP_REF(&crl->references, &i, crl->lock) <= 0
| 0-12 | ||||||||||||
| 67 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 68 | - | |||||||||||||
| 69 | ; | - | ||||||||||||
| 70 | ; | - | ||||||||||||
| 71 | return executed 12 times by 1 test: ((return ((i > 1) ? 1 : 0);Executed by:
executed 12 times by 1 test: return ((i > 1) ? 1 : 0);Executed by:
| 0-12 | ||||||||||||
| 72 | } | - | ||||||||||||
| 73 | - | |||||||||||||
| 74 | long X509_CRL_get_version(const X509_CRL *crl) | - | ||||||||||||
| 75 | { | - | ||||||||||||
| 76 | return executed 1839 times by 1 test: ASN1_INTEGER_get(crl->crl.version);return ASN1_INTEGER_get(crl->crl.version);Executed by:
executed 1839 times by 1 test: return ASN1_INTEGER_get(crl->crl.version);Executed by:
| 1839 | ||||||||||||
| 77 | } | - | ||||||||||||
| 78 | - | |||||||||||||
| 79 | const ASN1_TIME *X509_CRL_get0_lastUpdate(const X509_CRL *crl) | - | ||||||||||||
| 80 | { | - | ||||||||||||
| 81 | return executed 1847 times by 1 test: crl->crl.lastUpdate;return crl->crl.lastUpdate;Executed by:
executed 1847 times by 1 test: return crl->crl.lastUpdate;Executed by:
| 1847 | ||||||||||||
| 82 | } | - | ||||||||||||
| 83 | - | |||||||||||||
| 84 | const ASN1_TIME *X509_CRL_get0_nextUpdate(const X509_CRL *crl) | - | ||||||||||||
| 85 | { | - | ||||||||||||
| 86 | return executed 1962 times by 1 test: crl->crl.nextUpdate;return crl->crl.nextUpdate;Executed by:
executed 1962 times by 1 test: return crl->crl.nextUpdate;Executed by:
| 1962 | ||||||||||||
| 87 | } | - | ||||||||||||
| 88 | - | |||||||||||||
| 89 | - | |||||||||||||
| 90 | ASN1_TIME *X509_CRL_get_lastUpdate(X509_CRL *crl) | - | ||||||||||||
| 91 | { | - | ||||||||||||
| 92 | return never executed: crl->crl.lastUpdate;return crl->crl.lastUpdate;never executed: return crl->crl.lastUpdate; | 0 | ||||||||||||
| 93 | } | - | ||||||||||||
| 94 | - | |||||||||||||
| 95 | ASN1_TIME *X509_CRL_get_nextUpdate(X509_CRL *crl) | - | ||||||||||||
| 96 | { | - | ||||||||||||
| 97 | return never executed: crl->crl.nextUpdate;return crl->crl.nextUpdate;never executed: return crl->crl.nextUpdate; | 0 | ||||||||||||
| 98 | } | - | ||||||||||||
| 99 | - | |||||||||||||
| 100 | - | |||||||||||||
| 101 | X509_NAME *X509_CRL_get_issuer(const X509_CRL *crl) | - | ||||||||||||
| 102 | { | - | ||||||||||||
| 103 | return executed 11462 times by 1 test: crl->crl.issuer;return crl->crl.issuer;Executed by:
executed 11462 times by 1 test: return crl->crl.issuer;Executed by:
| 11462 | ||||||||||||
| 104 | } | - | ||||||||||||
| 105 | - | |||||||||||||
| 106 | const struct stack_st_X509_EXTENSION *X509_CRL_get0_extensions(const X509_CRL *crl) | - | ||||||||||||
| 107 | { | - | ||||||||||||
| 108 | return executed 1839 times by 1 test: crl->crl.extensions;return crl->crl.extensions;Executed by:
executed 1839 times by 1 test: return crl->crl.extensions;Executed by:
| 1839 | ||||||||||||
| 109 | } | - | ||||||||||||
| 110 | - | |||||||||||||
| 111 | struct stack_st_X509_REVOKED *X509_CRL_get_REVOKED(X509_CRL *crl) | - | ||||||||||||
| 112 | { | - | ||||||||||||
| 113 | return executed 36193 times by 1 test: crl->crl.revoked;return crl->crl.revoked;Executed by:
executed 36193 times by 1 test: return crl->crl.revoked;Executed by:
| 36193 | ||||||||||||
| 114 | } | - | ||||||||||||
| 115 | - | |||||||||||||
| 116 | void X509_CRL_get0_signature(const X509_CRL *crl, const ASN1_BIT_STRING **psig, | - | ||||||||||||
| 117 | const X509_ALGOR **palg) | - | ||||||||||||
| 118 | { | - | ||||||||||||
| 119 | if (psig !=
| 0-1839 | ||||||||||||
| 120 | ((void *)0)
| 0-1839 | ||||||||||||
| 121 | ) | - | ||||||||||||
| 122 | * executed 1839 times by 1 test: psig = &crl->signature;*psig = &crl->signature;Executed by:
executed 1839 times by 1 test: *psig = &crl->signature;Executed by:
| 1839 | ||||||||||||
| 123 | if (palg !=
| 0-1839 | ||||||||||||
| 124 | ((void *)0)
| 0-1839 | ||||||||||||
| 125 | ) | - | ||||||||||||
| 126 | * executed 1839 times by 1 test: palg = &crl->sig_alg;*palg = &crl->sig_alg;Executed by:
executed 1839 times by 1 test: *palg = &crl->sig_alg;Executed by:
| 1839 | ||||||||||||
| 127 | } executed 1839 times by 1 test: end of blockExecuted by:
| 1839 | ||||||||||||
| 128 | - | |||||||||||||
| 129 | int X509_CRL_get_signature_nid(const X509_CRL *crl) | - | ||||||||||||
| 130 | { | - | ||||||||||||
| 131 | return never executed: OBJ_obj2nid(crl->sig_alg.algorithm);return OBJ_obj2nid(crl->sig_alg.algorithm);never executed: return OBJ_obj2nid(crl->sig_alg.algorithm); | 0 | ||||||||||||
| 132 | } | - | ||||||||||||
| 133 | - | |||||||||||||
| 134 | const ASN1_TIME *X509_REVOKED_get0_revocationDate(const X509_REVOKED *x) | - | ||||||||||||
| 135 | { | - | ||||||||||||
| 136 | return executed 8472 times by 1 test: x->revocationDate;return x->revocationDate;Executed by:
executed 8472 times by 1 test: return x->revocationDate;Executed by:
| 8472 | ||||||||||||
| 137 | } | - | ||||||||||||
| 138 | - | |||||||||||||
| 139 | int X509_REVOKED_set_revocationDate(X509_REVOKED *x, ASN1_TIME *tm) | - | ||||||||||||
| 140 | { | - | ||||||||||||
| 141 | ASN1_TIME *in; | - | ||||||||||||
| 142 | - | |||||||||||||
| 143 | if (x ==
| 0 | ||||||||||||
| 144 | ((void *)0)
| 0 | ||||||||||||
| 145 | ) | - | ||||||||||||
| 146 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 147 | in = x->revocationDate; | - | ||||||||||||
| 148 | if (in != tm
| 0 | ||||||||||||
| 149 | in = ASN1_STRING_dup(tm); | - | ||||||||||||
| 150 | if (in !=
| 0 | ||||||||||||
| 151 | ((void *)0)
| 0 | ||||||||||||
| 152 | ) { | - | ||||||||||||
| 153 | ASN1_TIME_free(x->revocationDate); | - | ||||||||||||
| 154 | x->revocationDate = in; | - | ||||||||||||
| 155 | } never executed: end of block | 0 | ||||||||||||
| 156 | } never executed: end of block | 0 | ||||||||||||
| 157 | return never executed: (in != return (in != ((void *)0) );never executed: return (in != ((void *)0) ); | 0 | ||||||||||||
| 158 | ((void *)0) never executed: return (in != ((void *)0) ); | 0 | ||||||||||||
| 159 | ); never executed: return (in != ((void *)0) ); | 0 | ||||||||||||
| 160 | } | - | ||||||||||||
| 161 | - | |||||||||||||
| 162 | const ASN1_INTEGER *X509_REVOKED_get0_serialNumber(const X509_REVOKED *x) | - | ||||||||||||
| 163 | { | - | ||||||||||||
| 164 | return executed 8472 times by 1 test: &x->serialNumber;return &x->serialNumber;Executed by:
executed 8472 times by 1 test: return &x->serialNumber;Executed by:
| 8472 | ||||||||||||
| 165 | } | - | ||||||||||||
| 166 | - | |||||||||||||
| 167 | int X509_REVOKED_set_serialNumber(X509_REVOKED *x, ASN1_INTEGER *serial) | - | ||||||||||||
| 168 | { | - | ||||||||||||
| 169 | ASN1_INTEGER *in; | - | ||||||||||||
| 170 | - | |||||||||||||
| 171 | if (x ==
| 0 | ||||||||||||
| 172 | ((void *)0)
| 0 | ||||||||||||
| 173 | ) | - | ||||||||||||
| 174 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 175 | in = &x->serialNumber; | - | ||||||||||||
| 176 | if (in != serial
| 0 | ||||||||||||
| 177 | return never executed: ASN1_STRING_copy(in, serial);return ASN1_STRING_copy(in, serial);never executed: return ASN1_STRING_copy(in, serial); | 0 | ||||||||||||
| 178 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 179 | } | - | ||||||||||||
| 180 | - | |||||||||||||
| 181 | const struct stack_st_X509_EXTENSION *X509_REVOKED_get0_extensions(const X509_REVOKED *r) | - | ||||||||||||
| 182 | { | - | ||||||||||||
| 183 | return executed 8472 times by 1 test: r->extensions;return r->extensions;Executed by:
executed 8472 times by 1 test: return r->extensions;Executed by:
| 8472 | ||||||||||||
| 184 | } | - | ||||||||||||
| 185 | - | |||||||||||||
| 186 | int i2d_re_X509_CRL_tbs(X509_CRL *crl, unsigned char **pp) | - | ||||||||||||
| 187 | { | - | ||||||||||||
| 188 | crl->crl.enc.modified = 1; | - | ||||||||||||
| 189 | return never executed: i2d_X509_CRL_INFO(&crl->crl, pp);return i2d_X509_CRL_INFO(&crl->crl, pp);never executed: return i2d_X509_CRL_INFO(&crl->crl, pp); | 0 | ||||||||||||
| 190 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |