| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/crypto/x509/x509_d2.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||
| 2 | - | |||||||||||||||||||
| 3 | int | - | ||||||||||||||||||
| 4 | X509_STORE_set_default_paths(X509_STORE *ctx) | - | ||||||||||||||||||
| 5 | { | - | ||||||||||||||||||
| 6 | X509_LOOKUP *lookup; | - | ||||||||||||||||||
| 7 | - | |||||||||||||||||||
| 8 | lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file()); | - | ||||||||||||||||||
| 9 | if (lookup ==
| 0-23 | ||||||||||||||||||
| 10 | ((void *)0)
| 0-23 | ||||||||||||||||||
| 11 | ) | - | ||||||||||||||||||
| 12 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 13 | X509_LOOKUP_ctrl((lookup),1,( | - | ||||||||||||||||||
| 14 | ((void *)0) | - | ||||||||||||||||||
| 15 | ),(long)(3), | - | ||||||||||||||||||
| 16 | ((void *)0) | - | ||||||||||||||||||
| 17 | ); | - | ||||||||||||||||||
| 18 | - | |||||||||||||||||||
| 19 | lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir()); | - | ||||||||||||||||||
| 20 | if (lookup ==
| 0-23 | ||||||||||||||||||
| 21 | ((void *)0)
| 0-23 | ||||||||||||||||||
| 22 | ) | - | ||||||||||||||||||
| 23 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 24 | X509_LOOKUP_ctrl((lookup),2,( | - | ||||||||||||||||||
| 25 | ((void *)0) | - | ||||||||||||||||||
| 26 | ),(long)(3), | - | ||||||||||||||||||
| 27 | ((void *)0) | - | ||||||||||||||||||
| 28 | ); | - | ||||||||||||||||||
| 29 | - | |||||||||||||||||||
| 30 | - | |||||||||||||||||||
| 31 | ERR_clear_error(); | - | ||||||||||||||||||
| 32 | - | |||||||||||||||||||
| 33 | return executed 23 times by 2 tests: (1);return (1);Executed by:
executed 23 times by 2 tests: return (1);Executed by:
| 23 | ||||||||||||||||||
| 34 | } | - | ||||||||||||||||||
| 35 | - | |||||||||||||||||||
| 36 | int | - | ||||||||||||||||||
| 37 | X509_STORE_load_locations(X509_STORE *ctx, const char *file, const char *path) | - | ||||||||||||||||||
| 38 | { | - | ||||||||||||||||||
| 39 | X509_LOOKUP *lookup; | - | ||||||||||||||||||
| 40 | - | |||||||||||||||||||
| 41 | if (file !=
| 20-40 | ||||||||||||||||||
| 42 | ((void *)0)
| 20-40 | ||||||||||||||||||
| 43 | ) { | - | ||||||||||||||||||
| 44 | lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_file()); | - | ||||||||||||||||||
| 45 | if (lookup ==
| 0-20 | ||||||||||||||||||
| 46 | ((void *)0)
| 0-20 | ||||||||||||||||||
| 47 | ) | - | ||||||||||||||||||
| 48 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 49 | if (X509_LOOKUP_ctrl((lookup),1,(file),(long)(1),
| 0-20 | ||||||||||||||||||
| 50 | ((void *)0)
| 0-20 | ||||||||||||||||||
| 51 | ) != 1
| 0-20 | ||||||||||||||||||
| 52 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 53 | } executed 20 times by 1 test: end of blockExecuted by:
| 20 | ||||||||||||||||||
| 54 | if (path !=
| 0-60 | ||||||||||||||||||
| 55 | ((void *)0)
| 0-60 | ||||||||||||||||||
| 56 | ) { | - | ||||||||||||||||||
| 57 | lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_hash_dir()); | - | ||||||||||||||||||
| 58 | if (lookup ==
| 0 | ||||||||||||||||||
| 59 | ((void *)0)
| 0 | ||||||||||||||||||
| 60 | ) | - | ||||||||||||||||||
| 61 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 62 | if (X509_LOOKUP_ctrl((lookup),2,(path),(long)(1),
| 0 | ||||||||||||||||||
| 63 | ((void *)0)
| 0 | ||||||||||||||||||
| 64 | ) != 1
| 0 | ||||||||||||||||||
| 65 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 66 | } never executed: end of block | 0 | ||||||||||||||||||
| 67 | if ((
| 0-60 | ||||||||||||||||||
| 68 | ((void *)0)
| 0-60 | ||||||||||||||||||
| 69 | )
| 0-60 | ||||||||||||||||||
| 70 | ((void *)0)
| 20-40 | ||||||||||||||||||
| 71 | )
| 20-40 | ||||||||||||||||||
| 72 | return executed 40 times by 1 test: (0);return (0);Executed by:
executed 40 times by 1 test: return (0);Executed by:
| 40 | ||||||||||||||||||
| 73 | return executed 20 times by 1 test: (1);return (1);Executed by:
executed 20 times by 1 test: return (1);Executed by:
| 20 | ||||||||||||||||||
| 74 | } | - | ||||||||||||||||||
| 75 | - | |||||||||||||||||||
| 76 | int | - | ||||||||||||||||||
| 77 | X509_STORE_load_mem(X509_STORE *ctx, void *buf, int len) | - | ||||||||||||||||||
| 78 | { | - | ||||||||||||||||||
| 79 | X509_LOOKUP *lookup; | - | ||||||||||||||||||
| 80 | struct iovec iov; | - | ||||||||||||||||||
| 81 | - | |||||||||||||||||||
| 82 | lookup = X509_STORE_add_lookup(ctx, X509_LOOKUP_mem()); | - | ||||||||||||||||||
| 83 | if (lookup ==
| 0-4 | ||||||||||||||||||
| 84 | ((void *)0)
| 0-4 | ||||||||||||||||||
| 85 | ) | - | ||||||||||||||||||
| 86 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 87 | - | |||||||||||||||||||
| 88 | iov.iov_base = buf; | - | ||||||||||||||||||
| 89 | iov.iov_len = len; | - | ||||||||||||||||||
| 90 | - | |||||||||||||||||||
| 91 | if (X509_LOOKUP_ctrl((lookup),3,(const char *)(&iov), (long)(1),
| 0-4 | ||||||||||||||||||
| 92 | ((void *)0)
| 0-4 | ||||||||||||||||||
| 93 | ) != 1
| 0-4 | ||||||||||||||||||
| 94 | return never executed: (0);return (0);never executed: return (0); | 0 | ||||||||||||||||||
| 95 | - | |||||||||||||||||||
| 96 | return executed 4 times by 1 test: (1);return (1);Executed by:
executed 4 times by 1 test: return (1);Executed by:
| 4 | ||||||||||||||||||
| 97 | } | - | ||||||||||||||||||
| Switch to Source code | Preprocessed file |