| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssh/src/openbsd-compat/libressl-api-compat.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||
| 7 | - | |||||||||||||||||||||||||
| 8 | - | |||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||
| 11 | - | |||||||||||||||||||||||||
| 12 | void | - | ||||||||||||||||||||||||
| 13 | DSA_get0_pqg(const DSA *d, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) | - | ||||||||||||||||||||||||
| 14 | { | - | ||||||||||||||||||||||||
| 15 | if (p !=
| 3-240 | ||||||||||||||||||||||||
| 16 | ((void *)0)
| 3-240 | ||||||||||||||||||||||||
| 17 | ) | - | ||||||||||||||||||||||||
| 18 | * executed 240 times by 4 tests: p = d->p;*p = d->p;Executed by:
executed 240 times by 4 tests: *p = d->p;Executed by:
| 240 | ||||||||||||||||||||||||
| 19 | if (q !=
| 28-215 | ||||||||||||||||||||||||
| 20 | ((void *)0)
| 28-215 | ||||||||||||||||||||||||
| 21 | ) | - | ||||||||||||||||||||||||
| 22 | * executed 215 times by 4 tests: q = d->q;*q = d->q;Executed by:
executed 215 times by 4 tests: *q = d->q;Executed by:
| 215 | ||||||||||||||||||||||||
| 23 | if (g !=
| 25-218 | ||||||||||||||||||||||||
| 24 | ((void *)0)
| 25-218 | ||||||||||||||||||||||||
| 25 | ) | - | ||||||||||||||||||||||||
| 26 | * executed 218 times by 4 tests: g = d->g;*g = d->g;Executed by:
executed 218 times by 4 tests: *g = d->g;Executed by:
| 218 | ||||||||||||||||||||||||
| 27 | } executed 243 times by 4 tests: end of blockExecuted by:
| 243 | ||||||||||||||||||||||||
| 28 | - | |||||||||||||||||||||||||
| 29 | - | |||||||||||||||||||||||||
| 30 | - | |||||||||||||||||||||||||
| 31 | int | - | ||||||||||||||||||||||||
| 32 | DSA_set0_pqg(DSA *d, BIGNUM *p, BIGNUM *q, BIGNUM *g) | - | ||||||||||||||||||||||||
| 33 | { | - | ||||||||||||||||||||||||
| 34 | if ((d->p ==
| 0-10010 | ||||||||||||||||||||||||
| 35 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 36 | && p ==
| 0-10010 | ||||||||||||||||||||||||
| 37 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 38 | ) || (d->q ==
| 0-10010 | ||||||||||||||||||||||||
| 39 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 40 | && q ==
| 0-10010 | ||||||||||||||||||||||||
| 41 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 42 | ) || | - | ||||||||||||||||||||||||
| 43 | (d->g ==
| 0-10010 | ||||||||||||||||||||||||
| 44 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 45 | && g ==
| 0-10010 | ||||||||||||||||||||||||
| 46 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 47 | )) | - | ||||||||||||||||||||||||
| 48 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 49 | - | |||||||||||||||||||||||||
| 50 | if (p !=
| 0-10010 | ||||||||||||||||||||||||
| 51 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 52 | ) { | - | ||||||||||||||||||||||||
| 53 | BN_free(d->p); | - | ||||||||||||||||||||||||
| 54 | d->p = p; | - | ||||||||||||||||||||||||
| 55 | } executed 10010 times by 4 tests: end of blockExecuted by:
| 10010 | ||||||||||||||||||||||||
| 56 | if (q !=
| 0-10010 | ||||||||||||||||||||||||
| 57 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 58 | ) { | - | ||||||||||||||||||||||||
| 59 | BN_free(d->q); | - | ||||||||||||||||||||||||
| 60 | d->q = q; | - | ||||||||||||||||||||||||
| 61 | } executed 10010 times by 4 tests: end of blockExecuted by:
| 10010 | ||||||||||||||||||||||||
| 62 | if (g !=
| 0-10010 | ||||||||||||||||||||||||
| 63 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 64 | ) { | - | ||||||||||||||||||||||||
| 65 | BN_free(d->g); | - | ||||||||||||||||||||||||
| 66 | d->g = g; | - | ||||||||||||||||||||||||
| 67 | } executed 10010 times by 4 tests: end of blockExecuted by:
| 10010 | ||||||||||||||||||||||||
| 68 | - | |||||||||||||||||||||||||
| 69 | return executed 10010 times by 4 tests: 1;return 1;Executed by:
executed 10010 times by 4 tests: return 1;Executed by:
| 10010 | ||||||||||||||||||||||||
| 70 | } | - | ||||||||||||||||||||||||
| 71 | - | |||||||||||||||||||||||||
| 72 | - | |||||||||||||||||||||||||
| 73 | - | |||||||||||||||||||||||||
| 74 | void | - | ||||||||||||||||||||||||
| 75 | DSA_get0_key(const DSA *d, const BIGNUM **pub_key, const BIGNUM **priv_key) | - | ||||||||||||||||||||||||
| 76 | { | - | ||||||||||||||||||||||||
| 77 | if (pub_key !=
| 3-216 | ||||||||||||||||||||||||
| 78 | ((void *)0)
| 3-216 | ||||||||||||||||||||||||
| 79 | ) | - | ||||||||||||||||||||||||
| 80 | * executed 216 times by 4 tests: pub_key = d->pub_key;*pub_key = d->pub_key;Executed by:
executed 216 times by 4 tests: *pub_key = d->pub_key;Executed by:
| 216 | ||||||||||||||||||||||||
| 81 | if (priv_key !=
| 4-215 | ||||||||||||||||||||||||
| 82 | ((void *)0)
| 4-215 | ||||||||||||||||||||||||
| 83 | ) | - | ||||||||||||||||||||||||
| 84 | * executed 4 times by 2 tests: priv_key = d->priv_key;*priv_key = d->priv_key;Executed by:
executed 4 times by 2 tests: *priv_key = d->priv_key;Executed by:
| 4 | ||||||||||||||||||||||||
| 85 | } executed 219 times by 4 tests: end of blockExecuted by:
| 219 | ||||||||||||||||||||||||
| 86 | - | |||||||||||||||||||||||||
| 87 | - | |||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||
| 89 | int | - | ||||||||||||||||||||||||
| 90 | DSA_set0_key(DSA *d, BIGNUM *pub_key, BIGNUM *priv_key) | - | ||||||||||||||||||||||||
| 91 | { | - | ||||||||||||||||||||||||
| 92 | if (d->pub_key ==
| 0-10010 | ||||||||||||||||||||||||
| 93 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 94 | && pub_key ==
| 0-10010 | ||||||||||||||||||||||||
| 95 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 96 | ) | - | ||||||||||||||||||||||||
| 97 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||
| 99 | if (pub_key !=
| 0-10010 | ||||||||||||||||||||||||
| 100 | ((void *)0)
| 0-10010 | ||||||||||||||||||||||||
| 101 | ) { | - | ||||||||||||||||||||||||
| 102 | BN_free(d->pub_key); | - | ||||||||||||||||||||||||
| 103 | d->pub_key = pub_key; | - | ||||||||||||||||||||||||
| 104 | } executed 10010 times by 4 tests: end of blockExecuted by:
| 10010 | ||||||||||||||||||||||||
| 105 | if (priv_key !=
| 2-10008 | ||||||||||||||||||||||||
| 106 | ((void *)0)
| 2-10008 | ||||||||||||||||||||||||
| 107 | ) { | - | ||||||||||||||||||||||||
| 108 | BN_free(d->priv_key); | - | ||||||||||||||||||||||||
| 109 | d->priv_key = priv_key; | - | ||||||||||||||||||||||||
| 110 | } executed 2 times by 2 tests: end of blockExecuted by:
| 2 | ||||||||||||||||||||||||
| 111 | - | |||||||||||||||||||||||||
| 112 | return executed 10010 times by 4 tests: 1;return 1;Executed by:
executed 10010 times by 4 tests: return 1;Executed by:
| 10010 | ||||||||||||||||||||||||
| 113 | } | - | ||||||||||||||||||||||||
| 114 | - | |||||||||||||||||||||||||
| 115 | - | |||||||||||||||||||||||||
| 116 | - | |||||||||||||||||||||||||
| 117 | void | - | ||||||||||||||||||||||||
| 118 | RSA_get0_key(const RSA *r, const BIGNUM **n, const BIGNUM **e, const BIGNUM **d) | - | ||||||||||||||||||||||||
| 119 | { | - | ||||||||||||||||||||||||
| 120 | if (n !=
| 8-173831 | ||||||||||||||||||||||||
| 121 | ((void *)0)
| 8-173831 | ||||||||||||||||||||||||
| 122 | ) | - | ||||||||||||||||||||||||
| 123 | * executed 173831 times by 5 tests: n = r->n;*n = r->n;Executed by:
executed 173831 times by 5 tests: *n = r->n;Executed by:
| 173831 | ||||||||||||||||||||||||
| 124 | if (e !=
| 232-173607 | ||||||||||||||||||||||||
| 125 | ((void *)0)
| 232-173607 | ||||||||||||||||||||||||
| 126 | ) | - | ||||||||||||||||||||||||
| 127 | * executed 232 times by 5 tests: e = r->e;*e = r->e;Executed by:
executed 232 times by 5 tests: *e = r->e;Executed by:
| 232 | ||||||||||||||||||||||||
| 128 | if (d !=
| 10-173829 | ||||||||||||||||||||||||
| 129 | ((void *)0)
| 10-173829 | ||||||||||||||||||||||||
| 130 | ) | - | ||||||||||||||||||||||||
| 131 | * executed 10 times by 3 tests: d = r->d;*d = r->d;Executed by:
executed 10 times by 3 tests: *d = r->d;Executed by:
| 10 | ||||||||||||||||||||||||
| 132 | } executed 173839 times by 5 tests: end of blockExecuted by:
| 173839 | ||||||||||||||||||||||||
| 133 | - | |||||||||||||||||||||||||
| 134 | - | |||||||||||||||||||||||||
| 135 | - | |||||||||||||||||||||||||
| 136 | int | - | ||||||||||||||||||||||||
| 137 | RSA_set0_key(RSA *r, BIGNUM *n, BIGNUM *e, BIGNUM *d) | - | ||||||||||||||||||||||||
| 138 | { | - | ||||||||||||||||||||||||
| 139 | if ((r->n ==
| 0-5049 | ||||||||||||||||||||||||
| 140 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 141 | && n ==
| 0-5049 | ||||||||||||||||||||||||
| 142 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 143 | ) || (r->e ==
| 0-5049 | ||||||||||||||||||||||||
| 144 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 145 | && e ==
| 0-5049 | ||||||||||||||||||||||||
| 146 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 147 | )) | - | ||||||||||||||||||||||||
| 148 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 149 | - | |||||||||||||||||||||||||
| 150 | if (n !=
| 0-5049 | ||||||||||||||||||||||||
| 151 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 152 | ) { | - | ||||||||||||||||||||||||
| 153 | BN_free(r->n); | - | ||||||||||||||||||||||||
| 154 | r->n = n; | - | ||||||||||||||||||||||||
| 155 | } executed 5049 times by 5 tests: end of blockExecuted by:
| 5049 | ||||||||||||||||||||||||
| 156 | if (e !=
| 0-5049 | ||||||||||||||||||||||||
| 157 | ((void *)0)
| 0-5049 | ||||||||||||||||||||||||
| 158 | ) { | - | ||||||||||||||||||||||||
| 159 | BN_free(r->e); | - | ||||||||||||||||||||||||
| 160 | r->e = e; | - | ||||||||||||||||||||||||
| 161 | } executed 5049 times by 5 tests: end of blockExecuted by:
| 5049 | ||||||||||||||||||||||||
| 162 | if (d !=
| 6-5043 | ||||||||||||||||||||||||
| 163 | ((void *)0)
| 6-5043 | ||||||||||||||||||||||||
| 164 | ) { | - | ||||||||||||||||||||||||
| 165 | BN_free(r->d); | - | ||||||||||||||||||||||||
| 166 | r->d = d; | - | ||||||||||||||||||||||||
| 167 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 168 | - | |||||||||||||||||||||||||
| 169 | return executed 5049 times by 5 tests: 1;return 1;Executed by:
executed 5049 times by 5 tests: return 1;Executed by:
| 5049 | ||||||||||||||||||||||||
| 170 | } | - | ||||||||||||||||||||||||
| 171 | - | |||||||||||||||||||||||||
| 172 | - | |||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||
| 174 | void | - | ||||||||||||||||||||||||
| 175 | RSA_get0_crt_params(const RSA *r, const BIGNUM **dmp1, const BIGNUM **dmq1, | - | ||||||||||||||||||||||||
| 176 | const BIGNUM **iqmp) | - | ||||||||||||||||||||||||
| 177 | { | - | ||||||||||||||||||||||||
| 178 | if (dmp1 !=
| 0-4 | ||||||||||||||||||||||||
| 179 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||
| 180 | ) | - | ||||||||||||||||||||||||
| 181 | * never executed: dmp1 = r->dmp1;*dmp1 = r->dmp1;never executed: *dmp1 = r->dmp1; | 0 | ||||||||||||||||||||||||
| 182 | if (dmq1 !=
| 0-4 | ||||||||||||||||||||||||
| 183 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||
| 184 | ) | - | ||||||||||||||||||||||||
| 185 | * never executed: dmq1 = r->dmq1;*dmq1 = r->dmq1;never executed: *dmq1 = r->dmq1; | 0 | ||||||||||||||||||||||||
| 186 | if (iqmp !=
| 0-4 | ||||||||||||||||||||||||
| 187 | ((void *)0)
| 0-4 | ||||||||||||||||||||||||
| 188 | ) | - | ||||||||||||||||||||||||
| 189 | * executed 4 times by 2 tests: iqmp = r->iqmp;*iqmp = r->iqmp;Executed by:
executed 4 times by 2 tests: *iqmp = r->iqmp;Executed by:
| 4 | ||||||||||||||||||||||||
| 190 | } executed 4 times by 2 tests: end of blockExecuted by:
| 4 | ||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||
| 193 | - | |||||||||||||||||||||||||
| 194 | int | - | ||||||||||||||||||||||||
| 195 | RSA_set0_crt_params(RSA *r, BIGNUM *dmp1, BIGNUM *dmq1, BIGNUM *iqmp) | - | ||||||||||||||||||||||||
| 196 | { | - | ||||||||||||||||||||||||
| 197 | if ((r->dmp1 ==
| 0-6 | ||||||||||||||||||||||||
| 198 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 199 | && dmp1 ==
| 0-6 | ||||||||||||||||||||||||
| 200 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 201 | ) || | - | ||||||||||||||||||||||||
| 202 | (r->dmq1 ==
| 0-6 | ||||||||||||||||||||||||
| 203 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 204 | && dmq1 ==
| 0-6 | ||||||||||||||||||||||||
| 205 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 206 | ) || | - | ||||||||||||||||||||||||
| 207 | (r->iqmp ==
| 0-6 | ||||||||||||||||||||||||
| 208 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 209 | && iqmp ==
| 0-6 | ||||||||||||||||||||||||
| 210 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 211 | )) | - | ||||||||||||||||||||||||
| 212 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 213 | - | |||||||||||||||||||||||||
| 214 | if (dmp1 !=
| 0-6 | ||||||||||||||||||||||||
| 215 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 216 | ) { | - | ||||||||||||||||||||||||
| 217 | BN_free(r->dmp1); | - | ||||||||||||||||||||||||
| 218 | r->dmp1 = dmp1; | - | ||||||||||||||||||||||||
| 219 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 220 | if (dmq1 !=
| 0-6 | ||||||||||||||||||||||||
| 221 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 222 | ) { | - | ||||||||||||||||||||||||
| 223 | BN_free(r->dmq1); | - | ||||||||||||||||||||||||
| 224 | r->dmq1 = dmq1; | - | ||||||||||||||||||||||||
| 225 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 226 | if (iqmp !=
| 0-6 | ||||||||||||||||||||||||
| 227 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 228 | ) { | - | ||||||||||||||||||||||||
| 229 | BN_free(r->iqmp); | - | ||||||||||||||||||||||||
| 230 | r->iqmp = iqmp; | - | ||||||||||||||||||||||||
| 231 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 232 | - | |||||||||||||||||||||||||
| 233 | return executed 6 times by 3 tests: 1;return 1;Executed by:
executed 6 times by 3 tests: return 1;Executed by:
| 6 | ||||||||||||||||||||||||
| 234 | } | - | ||||||||||||||||||||||||
| 235 | - | |||||||||||||||||||||||||
| 236 | - | |||||||||||||||||||||||||
| 237 | - | |||||||||||||||||||||||||
| 238 | void | - | ||||||||||||||||||||||||
| 239 | RSA_get0_factors(const RSA *r, const BIGNUM **p, const BIGNUM **q) | - | ||||||||||||||||||||||||
| 240 | { | - | ||||||||||||||||||||||||
| 241 | if (p !=
| 1-13 | ||||||||||||||||||||||||
| 242 | ((void *)0)
| 1-13 | ||||||||||||||||||||||||
| 243 | ) | - | ||||||||||||||||||||||||
| 244 | * executed 13 times by 3 tests: p = r->p;*p = r->p;Executed by:
executed 13 times by 3 tests: *p = r->p;Executed by:
| 13 | ||||||||||||||||||||||||
| 245 | if (q !=
| 3-11 | ||||||||||||||||||||||||
| 246 | ((void *)0)
| 3-11 | ||||||||||||||||||||||||
| 247 | ) | - | ||||||||||||||||||||||||
| 248 | * executed 11 times by 3 tests: q = r->q;*q = r->q;Executed by:
executed 11 times by 3 tests: *q = r->q;Executed by:
| 11 | ||||||||||||||||||||||||
| 249 | } executed 14 times by 3 tests: end of blockExecuted by:
| 14 | ||||||||||||||||||||||||
| 250 | - | |||||||||||||||||||||||||
| 251 | - | |||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||
| 253 | int | - | ||||||||||||||||||||||||
| 254 | RSA_set0_factors(RSA *r, BIGNUM *p, BIGNUM *q) | - | ||||||||||||||||||||||||
| 255 | { | - | ||||||||||||||||||||||||
| 256 | if ((r->p ==
| 0-6 | ||||||||||||||||||||||||
| 257 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 258 | && p ==
| 0-6 | ||||||||||||||||||||||||
| 259 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 260 | ) || (r->q ==
| 0-6 | ||||||||||||||||||||||||
| 261 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 262 | && q ==
| 0-6 | ||||||||||||||||||||||||
| 263 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 264 | )) | - | ||||||||||||||||||||||||
| 265 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 266 | - | |||||||||||||||||||||||||
| 267 | if (p !=
| 0-6 | ||||||||||||||||||||||||
| 268 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 269 | ) { | - | ||||||||||||||||||||||||
| 270 | BN_free(r->p); | - | ||||||||||||||||||||||||
| 271 | r->p = p; | - | ||||||||||||||||||||||||
| 272 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 273 | if (q !=
| 0-6 | ||||||||||||||||||||||||
| 274 | ((void *)0)
| 0-6 | ||||||||||||||||||||||||
| 275 | ) { | - | ||||||||||||||||||||||||
| 276 | BN_free(r->q); | - | ||||||||||||||||||||||||
| 277 | r->q = q; | - | ||||||||||||||||||||||||
| 278 | } executed 6 times by 3 tests: end of blockExecuted by:
| 6 | ||||||||||||||||||||||||
| 279 | - | |||||||||||||||||||||||||
| 280 | return executed 6 times by 3 tests: 1;return 1;Executed by:
executed 6 times by 3 tests: return 1;Executed by:
| 6 | ||||||||||||||||||||||||
| 281 | } | - | ||||||||||||||||||||||||
| 282 | - | |||||||||||||||||||||||||
| 283 | - | |||||||||||||||||||||||||
| 284 | - | |||||||||||||||||||||||||
| 285 | int | - | ||||||||||||||||||||||||
| 286 | EVP_CIPHER_CTX_get_iv(const EVP_CIPHER_CTX *ctx, unsigned char *iv, size_t len) | - | ||||||||||||||||||||||||
| 287 | { | - | ||||||||||||||||||||||||
| 288 | if (ctx ==
| 0 | ||||||||||||||||||||||||
| 289 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 290 | ) | - | ||||||||||||||||||||||||
| 291 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 292 | if (EVP_CIPHER_CTX_iv_length(ctx) < 0
| 0 | ||||||||||||||||||||||||
| 293 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 294 | if (len != (size_t)EVP_CIPHER_CTX_iv_length(ctx)
| 0 | ||||||||||||||||||||||||
| 295 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 296 | if (len >
| 0 | ||||||||||||||||||||||||
| 297 | 16
| 0 | ||||||||||||||||||||||||
| 298 | ) | - | ||||||||||||||||||||||||
| 299 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 300 | - | |||||||||||||||||||||||||
| 301 | - | |||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||
| 303 | - | |||||||||||||||||||||||||
| 304 | if (len != 0
| 0 | ||||||||||||||||||||||||
| 305 | if (iv ==
| 0 | ||||||||||||||||||||||||
| 306 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 307 | ) | - | ||||||||||||||||||||||||
| 308 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 309 | - | |||||||||||||||||||||||||
| 310 | - | |||||||||||||||||||||||||
| 311 | - | |||||||||||||||||||||||||
| 312 | memcpy(iv, ctx->iv, len); | - | ||||||||||||||||||||||||
| 313 | - | |||||||||||||||||||||||||
| 314 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 315 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 316 | } | - | ||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||
| 318 | - | |||||||||||||||||||||||||
| 319 | - | |||||||||||||||||||||||||
| 320 | int | - | ||||||||||||||||||||||||
| 321 | EVP_CIPHER_CTX_set_iv(EVP_CIPHER_CTX *ctx, const unsigned char *iv, size_t len) | - | ||||||||||||||||||||||||
| 322 | { | - | ||||||||||||||||||||||||
| 323 | if (ctx ==
| 0 | ||||||||||||||||||||||||
| 324 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 325 | ) | - | ||||||||||||||||||||||||
| 326 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 327 | if (EVP_CIPHER_CTX_iv_length(ctx) < 0
| 0 | ||||||||||||||||||||||||
| 328 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 329 | if (len != (size_t)EVP_CIPHER_CTX_iv_length(ctx)
| 0 | ||||||||||||||||||||||||
| 330 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 331 | if (len >
| 0 | ||||||||||||||||||||||||
| 332 | 16
| 0 | ||||||||||||||||||||||||
| 333 | ) | - | ||||||||||||||||||||||||
| 334 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 335 | - | |||||||||||||||||||||||||
| 336 | - | |||||||||||||||||||||||||
| 337 | - | |||||||||||||||||||||||||
| 338 | - | |||||||||||||||||||||||||
| 339 | if (len != 0
| 0 | ||||||||||||||||||||||||
| 340 | if (iv ==
| 0 | ||||||||||||||||||||||||
| 341 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 342 | ) | - | ||||||||||||||||||||||||
| 343 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 344 | - | |||||||||||||||||||||||||
| 345 | - | |||||||||||||||||||||||||
| 346 | - | |||||||||||||||||||||||||
| 347 | memcpy(ctx->iv, iv, len); | - | ||||||||||||||||||||||||
| 348 | - | |||||||||||||||||||||||||
| 349 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 350 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 351 | } | - | ||||||||||||||||||||||||
| 352 | - | |||||||||||||||||||||||||
| 353 | - | |||||||||||||||||||||||||
| 354 | - | |||||||||||||||||||||||||
| 355 | void | - | ||||||||||||||||||||||||
| 356 | DSA_SIG_get0(const DSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | - | ||||||||||||||||||||||||
| 357 | { | - | ||||||||||||||||||||||||
| 358 | if (pr !=
| 0-65 | ||||||||||||||||||||||||
| 359 | ((void *)0)
| 0-65 | ||||||||||||||||||||||||
| 360 | ) | - | ||||||||||||||||||||||||
| 361 | * executed 65 times by 3 tests: pr = sig->r;*pr = sig->r;Executed by:
executed 65 times by 3 tests: *pr = sig->r;Executed by:
| 65 | ||||||||||||||||||||||||
| 362 | if (ps !=
| 0-65 | ||||||||||||||||||||||||
| 363 | ((void *)0)
| 0-65 | ||||||||||||||||||||||||
| 364 | ) | - | ||||||||||||||||||||||||
| 365 | * executed 65 times by 3 tests: ps = sig->s;*ps = sig->s;Executed by:
executed 65 times by 3 tests: *ps = sig->s;Executed by:
| 65 | ||||||||||||||||||||||||
| 366 | } executed 65 times by 3 tests: end of blockExecuted by:
| 65 | ||||||||||||||||||||||||
| 367 | - | |||||||||||||||||||||||||
| 368 | - | |||||||||||||||||||||||||
| 369 | - | |||||||||||||||||||||||||
| 370 | int | - | ||||||||||||||||||||||||
| 371 | DSA_SIG_set0(DSA_SIG *sig, BIGNUM *r, BIGNUM *s) | - | ||||||||||||||||||||||||
| 372 | { | - | ||||||||||||||||||||||||
| 373 | if (r ==
| 0-2031 | ||||||||||||||||||||||||
| 374 | ((void *)0)
| 0-2031 | ||||||||||||||||||||||||
| 375 | || s ==
| 0-2031 | ||||||||||||||||||||||||
| 376 | ((void *)0)
| 0-2031 | ||||||||||||||||||||||||
| 377 | ) | - | ||||||||||||||||||||||||
| 378 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 379 | - | |||||||||||||||||||||||||
| 380 | BN_clear_free(sig->r); | - | ||||||||||||||||||||||||
| 381 | sig->r = r; | - | ||||||||||||||||||||||||
| 382 | BN_clear_free(sig->s); | - | ||||||||||||||||||||||||
| 383 | sig->s = s; | - | ||||||||||||||||||||||||
| 384 | - | |||||||||||||||||||||||||
| 385 | return executed 2031 times by 3 tests: 1;return 1;Executed by:
executed 2031 times by 3 tests: return 1;Executed by:
| 2031 | ||||||||||||||||||||||||
| 386 | } | - | ||||||||||||||||||||||||
| 387 | - | |||||||||||||||||||||||||
| 388 | - | |||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||
| 390 | void | - | ||||||||||||||||||||||||
| 391 | ECDSA_SIG_get0(const ECDSA_SIG *sig, const BIGNUM **pr, const BIGNUM **ps) | - | ||||||||||||||||||||||||
| 392 | { | - | ||||||||||||||||||||||||
| 393 | if (pr !=
| 0-64 | ||||||||||||||||||||||||
| 394 | ((void *)0)
| 0-64 | ||||||||||||||||||||||||
| 395 | ) | - | ||||||||||||||||||||||||
| 396 | * executed 64 times by 2 tests: pr = sig->r;*pr = sig->r;Executed by:
executed 64 times by 2 tests: *pr = sig->r;Executed by:
| 64 | ||||||||||||||||||||||||
| 397 | if (ps !=
| 0-64 | ||||||||||||||||||||||||
| 398 | ((void *)0)
| 0-64 | ||||||||||||||||||||||||
| 399 | ) | - | ||||||||||||||||||||||||
| 400 | * executed 64 times by 2 tests: ps = sig->s;*ps = sig->s;Executed by:
executed 64 times by 2 tests: *ps = sig->s;Executed by:
| 64 | ||||||||||||||||||||||||
| 401 | } executed 64 times by 2 tests: end of blockExecuted by:
| 64 | ||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||
| 403 | - | |||||||||||||||||||||||||
| 404 | - | |||||||||||||||||||||||||
| 405 | int | - | ||||||||||||||||||||||||
| 406 | ECDSA_SIG_set0(ECDSA_SIG *sig, BIGNUM *r, BIGNUM *s) | - | ||||||||||||||||||||||||
| 407 | { | - | ||||||||||||||||||||||||
| 408 | if (r ==
| 0-5809 | ||||||||||||||||||||||||
| 409 | ((void *)0)
| 0-5809 | ||||||||||||||||||||||||
| 410 | || s ==
| 0-5809 | ||||||||||||||||||||||||
| 411 | ((void *)0)
| 0-5809 | ||||||||||||||||||||||||
| 412 | ) | - | ||||||||||||||||||||||||
| 413 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 414 | - | |||||||||||||||||||||||||
| 415 | BN_clear_free(sig->r); | - | ||||||||||||||||||||||||
| 416 | BN_clear_free(sig->s); | - | ||||||||||||||||||||||||
| 417 | sig->r = r; | - | ||||||||||||||||||||||||
| 418 | sig->s = s; | - | ||||||||||||||||||||||||
| 419 | return executed 5809 times by 2 tests: 1;return 1;Executed by:
executed 5809 times by 2 tests: return 1;Executed by:
| 5809 | ||||||||||||||||||||||||
| 420 | } | - | ||||||||||||||||||||||||
| 421 | - | |||||||||||||||||||||||||
| 422 | - | |||||||||||||||||||||||||
| 423 | - | |||||||||||||||||||||||||
| 424 | void | - | ||||||||||||||||||||||||
| 425 | DH_get0_pqg(const DH *dh, const BIGNUM **p, const BIGNUM **q, const BIGNUM **g) | - | ||||||||||||||||||||||||
| 426 | { | - | ||||||||||||||||||||||||
| 427 | if (p !=
| 0-600 | ||||||||||||||||||||||||
| 428 | ((void *)0)
| 0-600 | ||||||||||||||||||||||||
| 429 | ) | - | ||||||||||||||||||||||||
| 430 | * executed 600 times by 1 test: p = dh->p;*p = dh->p;Executed by:
executed 600 times by 1 test: *p = dh->p;Executed by:
| 600 | ||||||||||||||||||||||||
| 431 | if (q !=
| 0-600 | ||||||||||||||||||||||||
| 432 | ((void *)0)
| 0-600 | ||||||||||||||||||||||||
| 433 | ) | - | ||||||||||||||||||||||||
| 434 | * never executed: q = dh->q;*q = dh->q;never executed: *q = dh->q; | 0 | ||||||||||||||||||||||||
| 435 | if (g !=
| 120-480 | ||||||||||||||||||||||||
| 436 | ((void *)0)
| 120-480 | ||||||||||||||||||||||||
| 437 | ) | - | ||||||||||||||||||||||||
| 438 | * executed 120 times by 1 test: g = dh->g;*g = dh->g;Executed by:
executed 120 times by 1 test: *g = dh->g;Executed by:
| 120 | ||||||||||||||||||||||||
| 439 | } executed 600 times by 1 test: end of blockExecuted by:
| 600 | ||||||||||||||||||||||||
| 440 | - | |||||||||||||||||||||||||
| 441 | - | |||||||||||||||||||||||||
| 442 | - | |||||||||||||||||||||||||
| 443 | int | - | ||||||||||||||||||||||||
| 444 | DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) | - | ||||||||||||||||||||||||
| 445 | { | - | ||||||||||||||||||||||||
| 446 | if ((dh->p ==
| 0-160 | ||||||||||||||||||||||||
| 447 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 448 | && p ==
| 0-160 | ||||||||||||||||||||||||
| 449 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 450 | ) || (dh->g ==
| 0-160 | ||||||||||||||||||||||||
| 451 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 452 | && g ==
| 0-160 | ||||||||||||||||||||||||
| 453 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 454 | )) | - | ||||||||||||||||||||||||
| 455 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 456 | - | |||||||||||||||||||||||||
| 457 | if (p !=
| 0-160 | ||||||||||||||||||||||||
| 458 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 459 | ) { | - | ||||||||||||||||||||||||
| 460 | BN_free(dh->p); | - | ||||||||||||||||||||||||
| 461 | dh->p = p; | - | ||||||||||||||||||||||||
| 462 | } executed 160 times by 1 test: end of blockExecuted by:
| 160 | ||||||||||||||||||||||||
| 463 | if (q !=
| 0-160 | ||||||||||||||||||||||||
| 464 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 465 | ) { | - | ||||||||||||||||||||||||
| 466 | BN_free(dh->q); | - | ||||||||||||||||||||||||
| 467 | dh->q = q; | - | ||||||||||||||||||||||||
| 468 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 469 | if (g !=
| 0-160 | ||||||||||||||||||||||||
| 470 | ((void *)0)
| 0-160 | ||||||||||||||||||||||||
| 471 | ) { | - | ||||||||||||||||||||||||
| 472 | BN_free(dh->g); | - | ||||||||||||||||||||||||
| 473 | dh->g = g; | - | ||||||||||||||||||||||||
| 474 | } executed 160 times by 1 test: end of blockExecuted by:
| 160 | ||||||||||||||||||||||||
| 475 | - | |||||||||||||||||||||||||
| 476 | return executed 160 times by 1 test: 1;return 1;Executed by:
executed 160 times by 1 test: return 1;Executed by:
| 160 | ||||||||||||||||||||||||
| 477 | } | - | ||||||||||||||||||||||||
| 478 | - | |||||||||||||||||||||||||
| 479 | - | |||||||||||||||||||||||||
| 480 | - | |||||||||||||||||||||||||
| 481 | void | - | ||||||||||||||||||||||||
| 482 | DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) | - | ||||||||||||||||||||||||
| 483 | { | - | ||||||||||||||||||||||||
| 484 | if (pub_key !=
| 0-400 | ||||||||||||||||||||||||
| 485 | ((void *)0)
| 0-400 | ||||||||||||||||||||||||
| 486 | ) | - | ||||||||||||||||||||||||
| 487 | * executed 400 times by 1 test: pub_key = dh->pub_key;*pub_key = dh->pub_key;Executed by:
executed 400 times by 1 test: *pub_key = dh->pub_key;Executed by:
| 400 | ||||||||||||||||||||||||
| 488 | if (priv_key !=
| 0-400 | ||||||||||||||||||||||||
| 489 | ((void *)0)
| 0-400 | ||||||||||||||||||||||||
| 490 | ) | - | ||||||||||||||||||||||||
| 491 | * never executed: priv_key = dh->priv_key;*priv_key = dh->priv_key;never executed: *priv_key = dh->priv_key; | 0 | ||||||||||||||||||||||||
| 492 | } executed 400 times by 1 test: end of blockExecuted by:
| 400 | ||||||||||||||||||||||||
| 493 | - | |||||||||||||||||||||||||
| 494 | - | |||||||||||||||||||||||||
| 495 | - | |||||||||||||||||||||||||
| 496 | int | - | ||||||||||||||||||||||||
| 497 | DH_set0_key(DH *dh, BIGNUM *pub_key, BIGNUM *priv_key) | - | ||||||||||||||||||||||||
| 498 | { | - | ||||||||||||||||||||||||
| 499 | if (pub_key !=
| 0 | ||||||||||||||||||||||||
| 500 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 501 | ) { | - | ||||||||||||||||||||||||
| 502 | BN_free(dh->pub_key); | - | ||||||||||||||||||||||||
| 503 | dh->pub_key = pub_key; | - | ||||||||||||||||||||||||
| 504 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 505 | if (priv_key !=
| 0 | ||||||||||||||||||||||||
| 506 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 507 | ) { | - | ||||||||||||||||||||||||
| 508 | BN_free(dh->priv_key); | - | ||||||||||||||||||||||||
| 509 | dh->priv_key = priv_key; | - | ||||||||||||||||||||||||
| 510 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||
| 512 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 513 | } | - | ||||||||||||||||||||||||
| 514 | - | |||||||||||||||||||||||||
| 515 | - | |||||||||||||||||||||||||
| 516 | - | |||||||||||||||||||||||||
| 517 | int | - | ||||||||||||||||||||||||
| 518 | DH_set_length(DH *dh, long length) | - | ||||||||||||||||||||||||
| 519 | { | - | ||||||||||||||||||||||||
| 520 | if (length < 0
| 0-160 | ||||||||||||||||||||||||
| 521 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 522 | - | |||||||||||||||||||||||||
| 523 | dh->length = length; | - | ||||||||||||||||||||||||
| 524 | return executed 160 times by 1 test: 1;return 1;Executed by:
executed 160 times by 1 test: return 1;Executed by:
| 160 | ||||||||||||||||||||||||
| 525 | } | - | ||||||||||||||||||||||||
| 526 | - | |||||||||||||||||||||||||
| 527 | - | |||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||
| 529 | void | - | ||||||||||||||||||||||||
| 530 | RSA_meth_free(RSA_METHOD *meth) | - | ||||||||||||||||||||||||
| 531 | { | - | ||||||||||||||||||||||||
| 532 | if (meth !=
| 0 | ||||||||||||||||||||||||
| 533 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 534 | ) { | - | ||||||||||||||||||||||||
| 535 | free((char *)meth->name); | - | ||||||||||||||||||||||||
| 536 | free(meth); | - | ||||||||||||||||||||||||
| 537 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 538 | } never executed: end of block | 0 | ||||||||||||||||||||||||
| 539 | - | |||||||||||||||||||||||||
| 540 | - | |||||||||||||||||||||||||
| 541 | - | |||||||||||||||||||||||||
| 542 | RSA_METHOD * | - | ||||||||||||||||||||||||
| 543 | RSA_meth_dup(const RSA_METHOD *meth) | - | ||||||||||||||||||||||||
| 544 | { | - | ||||||||||||||||||||||||
| 545 | RSA_METHOD *copy; | - | ||||||||||||||||||||||||
| 546 | - | |||||||||||||||||||||||||
| 547 | if ((
| 0 | ||||||||||||||||||||||||
| 548 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 549 | ) | - | ||||||||||||||||||||||||
| 550 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 551 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 552 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 553 | memcpy(copy, meth, sizeof(*copy)); | - | ||||||||||||||||||||||||
| 554 | if ((
| 0 | ||||||||||||||||||||||||
| 555 | (__extension__ (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||
| 556 | meth->name
| 0 | ||||||||||||||||||||||||
| 557 | )
| 0 | ||||||||||||||||||||||||
| 558 | meth->name
| 0 | ||||||||||||||||||||||||
| 559 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||
| 560 | meth->name
| 0 | ||||||||||||||||||||||||
| 561 | ) == 1)
| 0 | ||||||||||||||||||||||||
| 562 | meth->name
| 0 | ||||||||||||||||||||||||
| 563 | ))[0] == '\0'
| 0 | ||||||||||||||||||||||||
| 564 | meth->name
| 0 | ||||||||||||||||||||||||
| 565 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)
never executed: __retval = (char *) memcpy (__retval, meth->name , __len); | 0 | ||||||||||||||||||||||||
| 566 | meth->name
never executed: __retval = (char *) memcpy (__retval, meth->name , __len); | 0 | ||||||||||||||||||||||||
| 567 | , __len); __retval; })) : __strdup (
| 0 | ||||||||||||||||||||||||
| 568 | meth->name
| 0 | ||||||||||||||||||||||||
| 569 | )))
| 0 | ||||||||||||||||||||||||
| 570 | ) ==
| 0 | ||||||||||||||||||||||||
| 571 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 572 | ) { | - | ||||||||||||||||||||||||
| 573 | free(copy); | - | ||||||||||||||||||||||||
| 574 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 575 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 576 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 577 | } | - | ||||||||||||||||||||||||
| 578 | - | |||||||||||||||||||||||||
| 579 | return never executed: copy;return copy;never executed: return copy; | 0 | ||||||||||||||||||||||||
| 580 | } | - | ||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||
| 582 | - | |||||||||||||||||||||||||
| 583 | - | |||||||||||||||||||||||||
| 584 | int | - | ||||||||||||||||||||||||
| 585 | RSA_meth_set1_name(RSA_METHOD *meth, const char *name) | - | ||||||||||||||||||||||||
| 586 | { | - | ||||||||||||||||||||||||
| 587 | char *copy; | - | ||||||||||||||||||||||||
| 588 | - | |||||||||||||||||||||||||
| 589 | if ((
| 0 | ||||||||||||||||||||||||
| 590 | (__extension__ (__builtin_constant_p (
| 0 | ||||||||||||||||||||||||
| 591 | name
| 0 | ||||||||||||||||||||||||
| 592 | )
| 0 | ||||||||||||||||||||||||
| 593 | name
| 0 | ||||||||||||||||||||||||
| 594 | ) + 1) - (size_t)(const void *)(
| 0 | ||||||||||||||||||||||||
| 595 | name
| 0 | ||||||||||||||||||||||||
| 596 | ) == 1)
| 0 | ||||||||||||||||||||||||
| 597 | name
| 0 | ||||||||||||||||||||||||
| 598 | ))[0] == '\0'
| 0 | ||||||||||||||||||||||||
| 599 | name
| 0 | ||||||||||||||||||||||||
| 600 | ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)
never executed: __retval = (char *) memcpy (__retval, name , __len); | 0 | ||||||||||||||||||||||||
| 601 | name
never executed: __retval = (char *) memcpy (__retval, name , __len); | 0 | ||||||||||||||||||||||||
| 602 | , __len); __retval; })) : __strdup (
| 0 | ||||||||||||||||||||||||
| 603 | name
| 0 | ||||||||||||||||||||||||
| 604 | )))
| 0 | ||||||||||||||||||||||||
| 605 | ) ==
| 0 | ||||||||||||||||||||||||
| 606 | ((void *)0)
| 0 | ||||||||||||||||||||||||
| 607 | ) | - | ||||||||||||||||||||||||
| 608 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||||||||||||||
| 609 | free((char *)meth->name); | - | ||||||||||||||||||||||||
| 610 | meth->name = copy; | - | ||||||||||||||||||||||||
| 611 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 612 | } | - | ||||||||||||||||||||||||
| 613 | - | |||||||||||||||||||||||||
| 614 | - | |||||||||||||||||||||||||
| 615 | - | |||||||||||||||||||||||||
| 616 | int | - | ||||||||||||||||||||||||
| 617 | (*RSA_meth_get_finish(const RSA_METHOD *meth))(RSA *rsa) | - | ||||||||||||||||||||||||
| 618 | { | - | ||||||||||||||||||||||||
| 619 | return never executed: meth->finish;return meth->finish;never executed: return meth->finish; | 0 | ||||||||||||||||||||||||
| 620 | } | - | ||||||||||||||||||||||||
| 621 | - | |||||||||||||||||||||||||
| 622 | - | |||||||||||||||||||||||||
| 623 | - | |||||||||||||||||||||||||
| 624 | int | - | ||||||||||||||||||||||||
| 625 | RSA_meth_set_priv_enc(RSA_METHOD *meth, int (*priv_enc)(int flen, | - | ||||||||||||||||||||||||
| 626 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) | - | ||||||||||||||||||||||||
| 627 | { | - | ||||||||||||||||||||||||
| 628 | meth->rsa_priv_enc = priv_enc; | - | ||||||||||||||||||||||||
| 629 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 630 | } | - | ||||||||||||||||||||||||
| 631 | - | |||||||||||||||||||||||||
| 632 | - | |||||||||||||||||||||||||
| 633 | - | |||||||||||||||||||||||||
| 634 | int | - | ||||||||||||||||||||||||
| 635 | RSA_meth_set_priv_dec(RSA_METHOD *meth, int (*priv_dec)(int flen, | - | ||||||||||||||||||||||||
| 636 | const unsigned char *from, unsigned char *to, RSA *rsa, int padding)) | - | ||||||||||||||||||||||||
| 637 | { | - | ||||||||||||||||||||||||
| 638 | meth->rsa_priv_dec = priv_dec; | - | ||||||||||||||||||||||||
| 639 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 640 | } | - | ||||||||||||||||||||||||
| 641 | - | |||||||||||||||||||||||||
| 642 | - | |||||||||||||||||||||||||
| 643 | - | |||||||||||||||||||||||||
| 644 | int | - | ||||||||||||||||||||||||
| 645 | RSA_meth_set_finish(RSA_METHOD *meth, int (*finish)(RSA *rsa)) | - | ||||||||||||||||||||||||
| 646 | { | - | ||||||||||||||||||||||||
| 647 | meth->finish = finish; | - | ||||||||||||||||||||||||
| 648 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||||||||||||||
| 649 | } | - | ||||||||||||||||||||||||
| 650 | - | |||||||||||||||||||||||||
| 651 | - | |||||||||||||||||||||||||
| 652 | - | |||||||||||||||||||||||||
| 653 | RSA * | - | ||||||||||||||||||||||||
| 654 | EVP_PKEY_get0_RSA(EVP_PKEY *pkey) | - | ||||||||||||||||||||||||
| 655 | { | - | ||||||||||||||||||||||||
| 656 | if (pkey->type !=
| 0 | ||||||||||||||||||||||||
| 657 | 6
| 0 | ||||||||||||||||||||||||
| 658 | ) { | - | ||||||||||||||||||||||||
| 659 | - | |||||||||||||||||||||||||
| 660 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 661 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 662 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||||||||||||||
| 663 | } | - | ||||||||||||||||||||||||
| 664 | return never executed: pkey->pkey.rsa;return pkey->pkey.rsa;never executed: return pkey->pkey.rsa; | 0 | ||||||||||||||||||||||||
| 665 | } | - | ||||||||||||||||||||||||
| 666 | - | |||||||||||||||||||||||||
| 667 | - | |||||||||||||||||||||||||
| 668 | - | |||||||||||||||||||||||||
| 669 | EVP_MD_CTX * | - | ||||||||||||||||||||||||
| 670 | EVP_MD_CTX_new(void) | - | ||||||||||||||||||||||||
| 671 | { | - | ||||||||||||||||||||||||
| 672 | return executed 6290 times by 3 tests: calloc(1, sizeof(EVP_MD_CTX));return calloc(1, sizeof(EVP_MD_CTX));Executed by:
executed 6290 times by 3 tests: return calloc(1, sizeof(EVP_MD_CTX));Executed by:
| 6290 | ||||||||||||||||||||||||
| 673 | } | - | ||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||
| 675 | - | |||||||||||||||||||||||||
| 676 | - | |||||||||||||||||||||||||
| 677 | void | - | ||||||||||||||||||||||||
| 678 | EVP_MD_CTX_free(EVP_MD_CTX *ctx) | - | ||||||||||||||||||||||||
| 679 | { | - | ||||||||||||||||||||||||
| 680 | if (ctx ==
| 0-6290 | ||||||||||||||||||||||||
| 681 | ((void *)0)
| 0-6290 | ||||||||||||||||||||||||
| 682 | ) | - | ||||||||||||||||||||||||
| 683 | return; never executed: return; | 0 | ||||||||||||||||||||||||
| 684 | - | |||||||||||||||||||||||||
| 685 | EVP_MD_CTX_cleanup(ctx); | - | ||||||||||||||||||||||||
| 686 | - | |||||||||||||||||||||||||
| 687 | free(ctx); | - | ||||||||||||||||||||||||
| 688 | } executed 6290 times by 3 tests: end of blockExecuted by:
| 6290 | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |