| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/crypto/err/err.c |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | - | |||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | static int err_load_strings(const ERR_STRING_DATA *str); | - | ||||||||||||
| 7 | - | |||||||||||||
| 8 | static void ERR_STATE_free(ERR_STATE *s); | - | ||||||||||||
| 9 | - | |||||||||||||
| 10 | static ERR_STRING_DATA ERR_str_libraries[] = { | - | ||||||||||||
| 11 | {( (((unsigned int)(1) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "unknown library"}, | - | ||||||||||||
| 12 | {( (((unsigned int)(2) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "system library"}, | - | ||||||||||||
| 13 | {( (((unsigned int)(3) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "bignum routines"}, | - | ||||||||||||
| 14 | {( (((unsigned int)(4) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "rsa routines"}, | - | ||||||||||||
| 15 | {( (((unsigned int)(5) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "Diffie-Hellman routines"}, | - | ||||||||||||
| 16 | {( (((unsigned int)(6) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "digital envelope routines"}, | - | ||||||||||||
| 17 | {( (((unsigned int)(7) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "memory buffer routines"}, | - | ||||||||||||
| 18 | {( (((unsigned int)(8) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "object identifier routines"}, | - | ||||||||||||
| 19 | {( (((unsigned int)(9) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "PEM routines"}, | - | ||||||||||||
| 20 | {( (((unsigned int)(10) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "dsa routines"}, | - | ||||||||||||
| 21 | {( (((unsigned int)(11) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "x509 certificate routines"}, | - | ||||||||||||
| 22 | {( (((unsigned int)(13) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "asn1 encoding routines"}, | - | ||||||||||||
| 23 | {( (((unsigned int)(14) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "configuration file routines"}, | - | ||||||||||||
| 24 | {( (((unsigned int)(15) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "common libcrypto routines"}, | - | ||||||||||||
| 25 | {( (((unsigned int)(16) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "elliptic curve routines"}, | - | ||||||||||||
| 26 | {( (((unsigned int)(42) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "ECDSA routines"}, | - | ||||||||||||
| 27 | {( (((unsigned int)(43) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "ECDH routines"}, | - | ||||||||||||
| 28 | {( (((unsigned int)(20) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "SSL routines"}, | - | ||||||||||||
| 29 | {( (((unsigned int)(32) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "BIO routines"}, | - | ||||||||||||
| 30 | {( (((unsigned int)(33) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "PKCS7 routines"}, | - | ||||||||||||
| 31 | {( (((unsigned int)(34) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "X509 V3 routines"}, | - | ||||||||||||
| 32 | {( (((unsigned int)(35) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "PKCS12 routines"}, | - | ||||||||||||
| 33 | {( (((unsigned int)(36) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "random number generator"}, | - | ||||||||||||
| 34 | {( (((unsigned int)(37) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "DSO support routines"}, | - | ||||||||||||
| 35 | {( (((unsigned int)(47) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "time stamp routines"}, | - | ||||||||||||
| 36 | {( (((unsigned int)(38) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "engine routines"}, | - | ||||||||||||
| 37 | {( (((unsigned int)(39) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "OCSP routines"}, | - | ||||||||||||
| 38 | {( (((unsigned int)(40) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "UI routines"}, | - | ||||||||||||
| 39 | {( (((unsigned int)(45) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "FIPS routines"}, | - | ||||||||||||
| 40 | {( (((unsigned int)(46) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "CMS routines"}, | - | ||||||||||||
| 41 | {( (((unsigned int)(48) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "HMAC routines"}, | - | ||||||||||||
| 42 | {( (((unsigned int)(50) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "CT routines"}, | - | ||||||||||||
| 43 | {( (((unsigned int)(51) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "ASYNC routines"}, | - | ||||||||||||
| 44 | {( (((unsigned int)(52) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "KDF routines"}, | - | ||||||||||||
| 45 | {( (((unsigned int)(44) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "STORE routines"}, | - | ||||||||||||
| 46 | {( (((unsigned int)(53) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "SM2 routines"}, | - | ||||||||||||
| 47 | {0, | - | ||||||||||||
| 48 | ((void *)0) | - | ||||||||||||
| 49 | }, | - | ||||||||||||
| 50 | }; | - | ||||||||||||
| 51 | - | |||||||||||||
| 52 | static ERR_STRING_DATA ERR_str_functs[] = { | - | ||||||||||||
| 53 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(1) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "fopen"}, | - | ||||||||||||
| 54 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(2) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "connect"}, | - | ||||||||||||
| 55 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(3) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "getservbyname"}, | - | ||||||||||||
| 56 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(4) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "socket"}, | - | ||||||||||||
| 57 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(5) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "ioctlsocket"}, | - | ||||||||||||
| 58 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(6) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "bind"}, | - | ||||||||||||
| 59 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(7) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "listen"}, | - | ||||||||||||
| 60 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(8) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "accept"}, | - | ||||||||||||
| 61 | - | |||||||||||||
| 62 | - | |||||||||||||
| 63 | - | |||||||||||||
| 64 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(10) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "opendir"}, | - | ||||||||||||
| 65 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(11) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "fread"}, | - | ||||||||||||
| 66 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(12) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "getaddrinfo"}, | - | ||||||||||||
| 67 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(13) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "getnameinfo"}, | - | ||||||||||||
| 68 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(14) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "setsockopt"}, | - | ||||||||||||
| 69 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(15) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "getsockopt"}, | - | ||||||||||||
| 70 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(16) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "getsockname"}, | - | ||||||||||||
| 71 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(17) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "gethostbyname"}, | - | ||||||||||||
| 72 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(18) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "fflush"}, | - | ||||||||||||
| 73 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(19) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "open"}, | - | ||||||||||||
| 74 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(20) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "close"}, | - | ||||||||||||
| 75 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(21) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "ioctl"}, | - | ||||||||||||
| 76 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(22) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "stat"}, | - | ||||||||||||
| 77 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(23) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "fcntl"}, | - | ||||||||||||
| 78 | {( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(24) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ), "fstat"}, | - | ||||||||||||
| 79 | {0, | - | ||||||||||||
| 80 | ((void *)0) | - | ||||||||||||
| 81 | }, | - | ||||||||||||
| 82 | }; | - | ||||||||||||
| 83 | - | |||||||||||||
| 84 | static ERR_STRING_DATA ERR_str_reasons[] = { | - | ||||||||||||
| 85 | {2, "system lib"}, | - | ||||||||||||
| 86 | {3, "BN lib"}, | - | ||||||||||||
| 87 | {4, "RSA lib"}, | - | ||||||||||||
| 88 | {5, "DH lib"}, | - | ||||||||||||
| 89 | {6, "EVP lib"}, | - | ||||||||||||
| 90 | {7, "BUF lib"}, | - | ||||||||||||
| 91 | {8, "OBJ lib"}, | - | ||||||||||||
| 92 | {9, "PEM lib"}, | - | ||||||||||||
| 93 | {10, "DSA lib"}, | - | ||||||||||||
| 94 | {11, "X509 lib"}, | - | ||||||||||||
| 95 | {13, "ASN1 lib"}, | - | ||||||||||||
| 96 | {16, "EC lib"}, | - | ||||||||||||
| 97 | {32, "BIO lib"}, | - | ||||||||||||
| 98 | {33, "PKCS7 lib"}, | - | ||||||||||||
| 99 | {34, "X509V3 lib"}, | - | ||||||||||||
| 100 | {38, "ENGINE lib"}, | - | ||||||||||||
| 101 | {40, "UI lib"}, | - | ||||||||||||
| 102 | {44, "STORE lib"}, | - | ||||||||||||
| 103 | {42, "ECDSA lib"}, | - | ||||||||||||
| 104 | - | |||||||||||||
| 105 | {58, "nested asn1 error"}, | - | ||||||||||||
| 106 | {63, "missing asn1 eos"}, | - | ||||||||||||
| 107 | - | |||||||||||||
| 108 | {64, "fatal"}, | - | ||||||||||||
| 109 | {(1|64), "malloc failure"}, | - | ||||||||||||
| 110 | {(2|64), | - | ||||||||||||
| 111 | "called a function you should not call"}, | - | ||||||||||||
| 112 | {(3|64), "passed a null parameter"}, | - | ||||||||||||
| 113 | {(4|64), "internal error"}, | - | ||||||||||||
| 114 | {(5|64), "called a function that was disabled at compile-time"}, | - | ||||||||||||
| 115 | {(6|64), "init fail"}, | - | ||||||||||||
| 116 | {(8|64), "operation fail"}, | - | ||||||||||||
| 117 | - | |||||||||||||
| 118 | {0, | - | ||||||||||||
| 119 | ((void *)0) | - | ||||||||||||
| 120 | }, | - | ||||||||||||
| 121 | }; | - | ||||||||||||
| 122 | - | |||||||||||||
| 123 | - | |||||||||||||
| 124 | static CRYPTO_ONCE err_init = | - | ||||||||||||
| 125 | 0 | - | ||||||||||||
| 126 | ; | - | ||||||||||||
| 127 | static int set_err_thread_local; | - | ||||||||||||
| 128 | static CRYPTO_THREAD_LOCAL err_thread_local; | - | ||||||||||||
| 129 | - | |||||||||||||
| 130 | static CRYPTO_ONCE err_string_init = | - | ||||||||||||
| 131 | 0 | - | ||||||||||||
| 132 | ; | - | ||||||||||||
| 133 | static CRYPTO_RWLOCK *err_string_lock; | - | ||||||||||||
| 134 | - | |||||||||||||
| 135 | static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *); | - | ||||||||||||
| 136 | - | |||||||||||||
| 137 | - | |||||||||||||
| 138 | - | |||||||||||||
| 139 | - | |||||||||||||
| 140 | - | |||||||||||||
| 141 | static struct lhash_st_ERR_STRING_DATA *int_error_hash = | - | ||||||||||||
| 142 | ((void *)0) | - | ||||||||||||
| 143 | ; | - | ||||||||||||
| 144 | static int int_err_library_number = 128; | - | ||||||||||||
| 145 | - | |||||||||||||
| 146 | static unsigned long get_error_values(int inc, int top, const char **file, | - | ||||||||||||
| 147 | int *line, const char **data, | - | ||||||||||||
| 148 | int *flags); | - | ||||||||||||
| 149 | - | |||||||||||||
| 150 | static unsigned long err_string_data_hash(const ERR_STRING_DATA *a) | - | ||||||||||||
| 151 | { | - | ||||||||||||
| 152 | unsigned long ret, l; | - | ||||||||||||
| 153 | - | |||||||||||||
| 154 | l = a->error; | - | ||||||||||||
| 155 | ret = l ^ (int)(((l) >> 24L) & 0x0FFL) ^ (int)(((l) >> 12L) & 0xFFFL); | - | ||||||||||||
| 156 | return executed 16216750 times by 11 tests: (ret ^ ret % 19 * 13);return (ret ^ ret % 19 * 13);Executed by:
executed 16216750 times by 11 tests: return (ret ^ ret % 19 * 13);Executed by:
| 16216750 | ||||||||||||
| 157 | } | - | ||||||||||||
| 158 | - | |||||||||||||
| 159 | static int err_string_data_cmp(const ERR_STRING_DATA *a, | - | ||||||||||||
| 160 | const ERR_STRING_DATA *b) | - | ||||||||||||
| 161 | { | - | ||||||||||||
| 162 | if (a->error == b->error
| 274668-10759803 | ||||||||||||
| 163 | return executed 10759803 times by 11 tests: 0;return 0;Executed by:
executed 10759803 times by 11 tests: return 0;Executed by:
| 10759803 | ||||||||||||
| 164 | return executed 274668 times by 11 tests: a->error > b->errorreturn a->error > b->error ? 1 : -1;Executed by:
executed 274668 times by 11 tests: return a->error > b->error ? 1 : -1;Executed by:
| 108973-274668 | ||||||||||||
| 165 | } | - | ||||||||||||
| 166 | - | |||||||||||||
| 167 | static ERR_STRING_DATA *int_err_get_item(const ERR_STRING_DATA *d) | - | ||||||||||||
| 168 | { | - | ||||||||||||
| 169 | ERR_STRING_DATA *p = | - | ||||||||||||
| 170 | ((void *)0) | - | ||||||||||||
| 171 | ; | - | ||||||||||||
| 172 | - | |||||||||||||
| 173 | CRYPTO_THREAD_read_lock(err_string_lock); | - | ||||||||||||
| 174 | p = lh_ERR_STRING_DATA_retrieve(int_error_hash, d); | - | ||||||||||||
| 175 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 176 | - | |||||||||||||
| 177 | return executed 73868 times by 11 tests: p;return p;Executed by:
executed 73868 times by 11 tests: return p;Executed by:
| 73868 | ||||||||||||
| 178 | } | - | ||||||||||||
| 179 | - | |||||||||||||
| 180 | - | |||||||||||||
| 181 | - | |||||||||||||
| 182 | - | |||||||||||||
| 183 | - | |||||||||||||
| 184 | static ERR_STRING_DATA SYS_str_reasons[127 + 1]; | - | ||||||||||||
| 185 | static void build_SYS_str_reasons(void) | - | ||||||||||||
| 186 | { | - | ||||||||||||
| 187 | - | |||||||||||||
| 188 | static char strerror_tab[127][32]; | - | ||||||||||||
| 189 | static int init = 1; | - | ||||||||||||
| 190 | int i; | - | ||||||||||||
| 191 | - | |||||||||||||
| 192 | CRYPTO_THREAD_write_lock(err_string_lock); | - | ||||||||||||
| 193 | if (!init
| 2074-122120 | ||||||||||||
| 194 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 195 | return; executed 122120 times by 11 tests: return;Executed by:
| 122120 | ||||||||||||
| 196 | } | - | ||||||||||||
| 197 | - | |||||||||||||
| 198 | for (i = 1; i <= 127
| 2074-263398 | ||||||||||||
| 199 | ERR_STRING_DATA *str = &SYS_str_reasons[i - 1]; | - | ||||||||||||
| 200 | - | |||||||||||||
| 201 | str->error = ( (((unsigned int)(2) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(i) & 0xFFF) ) ); | - | ||||||||||||
| 202 | if (str->string ==
| 0-263398 | ||||||||||||
| 203 | ((void *)0)
| 0-263398 | ||||||||||||
| 204 | ) { | - | ||||||||||||
| 205 | char (*dest)[32] = &(strerror_tab[i - 1]); | - | ||||||||||||
| 206 | if (openssl_strerror_r(i, *dest, sizeof(*dest))
| 39406-223992 | ||||||||||||
| 207 | str->string = *dest; executed 223992 times by 11 tests: str->string = *dest;Executed by:
| 223992 | ||||||||||||
| 208 | } executed 263398 times by 11 tests: end of blockExecuted by:
| 263398 | ||||||||||||
| 209 | if (str->string ==
| 39406-223992 | ||||||||||||
| 210 | ((void *)0)
| 39406-223992 | ||||||||||||
| 211 | ) | - | ||||||||||||
| 212 | str->string = "unknown"; executed 39406 times by 11 tests: str->string = "unknown";Executed by:
| 39406 | ||||||||||||
| 213 | } executed 263398 times by 11 tests: end of blockExecuted by:
| 263398 | ||||||||||||
| 214 | - | |||||||||||||
| 215 | - | |||||||||||||
| 216 | - | |||||||||||||
| 217 | - | |||||||||||||
| 218 | - | |||||||||||||
| 219 | - | |||||||||||||
| 220 | init = 0; | - | ||||||||||||
| 221 | - | |||||||||||||
| 222 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 223 | err_load_strings(SYS_str_reasons); | - | ||||||||||||
| 224 | } executed 2074 times by 11 tests: end of blockExecuted by:
| 2074 | ||||||||||||
| 225 | static void ERR_STATE_free(ERR_STATE *s) | - | ||||||||||||
| 226 | { | - | ||||||||||||
| 227 | int i; | - | ||||||||||||
| 228 | - | |||||||||||||
| 229 | if (s ==
| 0-2074 | ||||||||||||
| 230 | ((void *)0)
| 0-2074 | ||||||||||||
| 231 | ) | - | ||||||||||||
| 232 | return; never executed: return; | 0 | ||||||||||||
| 233 | for (i = 0; i < 16
| 2074-33184 | ||||||||||||
| 234 | do { if ((
| 83-33101 | ||||||||||||
| 235 | ((void *)0) | - | ||||||||||||
| 236 | ; } executed 83 times by 1 test: (s)->err_data_flags[i] = 0; } while (0);end of blockExecuted by:
| 83 | ||||||||||||
| 237 | } executed 33184 times by 11 tests: end of blockExecuted by:
| 33184 | ||||||||||||
| 238 | CRYPTO_free(s, __FILE__, 263); | - | ||||||||||||
| 239 | } executed 2074 times by 11 tests: end of blockExecuted by:
| 2074 | ||||||||||||
| 240 | - | |||||||||||||
| 241 | static int do_err_strings_init(void); static int do_err_strings_init_ossl_ret_ = 0; static void do_err_strings_init_ossl_(void) { do_err_strings_init_ossl_ret_ = do_err_strings_init(); } executed 2074 times by 11 tests: static int do_err_strings_init(void)end of blockExecuted by:
| 2074 | ||||||||||||
| 242 | { | - | ||||||||||||
| 243 | if (!OPENSSL_init_crypto(0,
| 0-2074 | ||||||||||||
| 244 | ((void *)0)
| 0-2074 | ||||||||||||
| 245 | )
| 0-2074 | ||||||||||||
| 246 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 247 | err_string_lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||
| 248 | if (err_string_lock ==
| 0-2074 | ||||||||||||
| 249 | ((void *)0)
| 0-2074 | ||||||||||||
| 250 | ) | - | ||||||||||||
| 251 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 252 | int_error_hash = lh_ERR_STRING_DATA_new(err_string_data_hash, | - | ||||||||||||
| 253 | err_string_data_cmp); | - | ||||||||||||
| 254 | if (int_error_hash ==
| 0-2074 | ||||||||||||
| 255 | ((void *)0)
| 0-2074 | ||||||||||||
| 256 | ) { | - | ||||||||||||
| 257 | CRYPTO_THREAD_lock_free(err_string_lock); | - | ||||||||||||
| 258 | err_string_lock = | - | ||||||||||||
| 259 | ((void *)0) | - | ||||||||||||
| 260 | ; | - | ||||||||||||
| 261 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 262 | } | - | ||||||||||||
| 263 | return executed 2074 times by 11 tests: 1;return 1;Executed by:
executed 2074 times by 11 tests: return 1;Executed by:
| 2074 | ||||||||||||
| 264 | } | - | ||||||||||||
| 265 | - | |||||||||||||
| 266 | void err_cleanup(void) | - | ||||||||||||
| 267 | { | - | ||||||||||||
| 268 | if (set_err_thread_local != 0
| 2-2074 | ||||||||||||
| 269 | CRYPTO_THREAD_cleanup_local(&err_thread_local); executed 2074 times by 11 tests: CRYPTO_THREAD_cleanup_local(&err_thread_local);Executed by:
| 2074 | ||||||||||||
| 270 | CRYPTO_THREAD_lock_free(err_string_lock); | - | ||||||||||||
| 271 | err_string_lock = | - | ||||||||||||
| 272 | ((void *)0) | - | ||||||||||||
| 273 | ; | - | ||||||||||||
| 274 | lh_ERR_STRING_DATA_free(int_error_hash); | - | ||||||||||||
| 275 | int_error_hash = | - | ||||||||||||
| 276 | ((void *)0) | - | ||||||||||||
| 277 | ; | - | ||||||||||||
| 278 | } executed 2076 times by 12 tests: end of blockExecuted by:
| 2076 | ||||||||||||
| 279 | - | |||||||||||||
| 280 | - | |||||||||||||
| 281 | - | |||||||||||||
| 282 | - | |||||||||||||
| 283 | static void err_patch(int lib, ERR_STRING_DATA *str) | - | ||||||||||||
| 284 | { | - | ||||||||||||
| 285 | unsigned long plib = ( (((unsigned int)(lib) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ); | - | ||||||||||||
| 286 | - | |||||||||||||
| 287 | for (; str->error != 0
| 124930-2857581 | ||||||||||||
| 288 | str->error |= plib; executed 2857581 times by 11 tests: str->error |= plib;Executed by:
| 2857581 | ||||||||||||
| 289 | } executed 124930 times by 11 tests: end of blockExecuted by:
| 124930 | ||||||||||||
| 290 | - | |||||||||||||
| 291 | - | |||||||||||||
| 292 | - | |||||||||||||
| 293 | - | |||||||||||||
| 294 | static int err_load_strings(const ERR_STRING_DATA *str) | - | ||||||||||||
| 295 | { | - | ||||||||||||
| 296 | CRYPTO_THREAD_write_lock(err_string_lock); | - | ||||||||||||
| 297 | for (; str->error
| 496776-16141763 | ||||||||||||
| 298 | ( executed 16141763 times by 11 tests: void)lh_ERR_STRING_DATA_insert(int_error_hash,(void)lh_ERR_STRING_DATA_insert(int_error_hash, (ERR_STRING_DATA *)str);Executed by:
executed 16141763 times by 11 tests: (void)lh_ERR_STRING_DATA_insert(int_error_hash, (ERR_STRING_DATA *)str);Executed by:
| 16141763 | ||||||||||||
| 299 | (ERR_STRING_DATA *)str); executed 16141763 times by 11 tests: (void)lh_ERR_STRING_DATA_insert(int_error_hash, (ERR_STRING_DATA *)str);Executed by:
| 16141763 | ||||||||||||
| 300 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 301 | return executed 496776 times by 11 tests: 1;return 1;Executed by:
executed 496776 times by 11 tests: return 1;Executed by:
| 496776 | ||||||||||||
| 302 | } | - | ||||||||||||
| 303 | - | |||||||||||||
| 304 | int ERR_load_ERR_strings(void) | - | ||||||||||||
| 305 | { | - | ||||||||||||
| 306 | - | |||||||||||||
| 307 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-124194 | ||||||||||||
| 308 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 309 | - | |||||||||||||
| 310 | err_load_strings(ERR_str_libraries); | - | ||||||||||||
| 311 | err_load_strings(ERR_str_reasons); | - | ||||||||||||
| 312 | err_patch(2, ERR_str_functs); | - | ||||||||||||
| 313 | err_load_strings(ERR_str_functs); | - | ||||||||||||
| 314 | build_SYS_str_reasons(); | - | ||||||||||||
| 315 | - | |||||||||||||
| 316 | return executed 124194 times by 11 tests: 1;return 1;Executed by:
executed 124194 times by 11 tests: return 1;Executed by:
| 124194 | ||||||||||||
| 317 | } | - | ||||||||||||
| 318 | - | |||||||||||||
| 319 | int ERR_load_strings(int lib, ERR_STRING_DATA *str) | - | ||||||||||||
| 320 | { | - | ||||||||||||
| 321 | if (ERR_load_ERR_strings() == 0
| 0-736 | ||||||||||||
| 322 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 323 | - | |||||||||||||
| 324 | err_patch(lib, str); | - | ||||||||||||
| 325 | err_load_strings(str); | - | ||||||||||||
| 326 | return executed 736 times by 1 test: 1;return 1;Executed by:
executed 736 times by 1 test: return 1;Executed by:
| 736 | ||||||||||||
| 327 | } | - | ||||||||||||
| 328 | - | |||||||||||||
| 329 | int ERR_load_strings_const(const ERR_STRING_DATA *str) | - | ||||||||||||
| 330 | { | - | ||||||||||||
| 331 | if (ERR_load_ERR_strings() == 0
| 0-121384 | ||||||||||||
| 332 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 333 | err_load_strings(str); | - | ||||||||||||
| 334 | return executed 121384 times by 11 tests: 1;return 1;Executed by:
executed 121384 times by 11 tests: return 1;Executed by:
| 121384 | ||||||||||||
| 335 | } | - | ||||||||||||
| 336 | - | |||||||||||||
| 337 | int ERR_unload_strings(int lib, ERR_STRING_DATA *str) | - | ||||||||||||
| 338 | { | - | ||||||||||||
| 339 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-736 | ||||||||||||
| 340 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 341 | - | |||||||||||||
| 342 | CRYPTO_THREAD_write_lock(err_string_lock); | - | ||||||||||||
| 343 | - | |||||||||||||
| 344 | - | |||||||||||||
| 345 | - | |||||||||||||
| 346 | - | |||||||||||||
| 347 | for (; str->error
| 736-1119 | ||||||||||||
| 348 | ( executed 1119 times by 1 test: void)lh_ERR_STRING_DATA_delete(int_error_hash, str);(void)lh_ERR_STRING_DATA_delete(int_error_hash, str);Executed by:
executed 1119 times by 1 test: (void)lh_ERR_STRING_DATA_delete(int_error_hash, str);Executed by:
| 1119 | ||||||||||||
| 349 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 350 | - | |||||||||||||
| 351 | return executed 736 times by 1 test: 1;return 1;Executed by:
executed 736 times by 1 test: return 1;Executed by:
| 736 | ||||||||||||
| 352 | } | - | ||||||||||||
| 353 | - | |||||||||||||
| 354 | void err_free_strings_int(void) | - | ||||||||||||
| 355 | { | - | ||||||||||||
| 356 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-2620 | ||||||||||||
| 357 | return; never executed: return; | 0 | ||||||||||||
| 358 | } executed 2620 times by 11 tests: end of blockExecuted by:
| 2620 | ||||||||||||
| 359 | - | |||||||||||||
| 360 | - | |||||||||||||
| 361 | - | |||||||||||||
| 362 | void ERR_put_error(int lib, int func, int reason, const char *file, int line) | - | ||||||||||||
| 363 | { | - | ||||||||||||
| 364 | ERR_STATE *es; | - | ||||||||||||
| 365 | es = ERR_get_state(); | - | ||||||||||||
| 366 | if (es ==
| 0-1802120 | ||||||||||||
| 367 | ((void *)0)
| 0-1802120 | ||||||||||||
| 368 | ) | - | ||||||||||||
| 369 | return; never executed: return; | 0 | ||||||||||||
| 370 | - | |||||||||||||
| 371 | es->top = (es->top + 1) % 16; | - | ||||||||||||
| 372 | if (es->top == es->bottom
| 226501-1575619 | ||||||||||||
| 373 | es->bottom = (es->bottom + 1) % 16; executed 1575619 times by 1 test: es->bottom = (es->bottom + 1) % 16;Executed by:
| 1575619 | ||||||||||||
| 374 | es->err_flags[es->top] = 0; | - | ||||||||||||
| 375 | es->err_buffer[es->top] = ( (((unsigned int)(lib) & 0x0FF) << 24L) | (((unsigned int)(func) & 0xFFF) << 12L) | (((unsigned int)(reason) & 0xFFF) ) ); | - | ||||||||||||
| 376 | es->err_file[es->top] = file; | - | ||||||||||||
| 377 | es->err_line[es->top] = line; | - | ||||||||||||
| 378 | do { if ((
| 582688-1219432 | ||||||||||||
| 379 | ((void *)0) | - | ||||||||||||
| 380 | ; } executed 582688 times by 1 test: (es)->err_data_flags[es->top] = 0; } while (0);end of blockExecuted by:
| 582688 | ||||||||||||
| 381 | } executed 1802120 times by 1 test: end of blockExecuted by:
| 1802120 | ||||||||||||
| 382 | - | |||||||||||||
| 383 | void ERR_clear_error(void) | - | ||||||||||||
| 384 | { | - | ||||||||||||
| 385 | int i; | - | ||||||||||||
| 386 | ERR_STATE *es; | - | ||||||||||||
| 387 | - | |||||||||||||
| 388 | es = ERR_get_state(); | - | ||||||||||||
| 389 | if (es ==
| 0-1135407 | ||||||||||||
| 390 | ((void *)0)
| 0-1135407 | ||||||||||||
| 391 | ) | - | ||||||||||||
| 392 | return; never executed: return; | 0 | ||||||||||||
| 393 | - | |||||||||||||
| 394 | for (i = 0; i < 16
| 1135407-18166512 | ||||||||||||
| 395 | do { do { if ((
| 41604-18124908 | ||||||||||||
| 396 | ((void *)0) | - | ||||||||||||
| 397 | ; } executed 41604 times by 1 test: (es)->err_data_flags[i] = 0; } while (0); (es)->err_flags[i] = 0; (es)->err_buffer[i] = 0; (es)->err_file[i] = end of blockExecuted by:
| 41604 | ||||||||||||
| 398 | ((void *)0) | - | ||||||||||||
| 399 | ; (es)->err_line[i] = -1; } while (0); | - | ||||||||||||
| 400 | } executed 18166512 times by 11 tests: end of blockExecuted by:
| 18166512 | ||||||||||||
| 401 | es->top = es->bottom = 0; | - | ||||||||||||
| 402 | } executed 1135407 times by 11 tests: end of blockExecuted by:
| 1135407 | ||||||||||||
| 403 | - | |||||||||||||
| 404 | unsigned long ERR_get_error(void) | - | ||||||||||||
| 405 | { | - | ||||||||||||
| 406 | return executed 9 times by 1 test: get_error_values(1, 0, return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 407 | ((void *)0) executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 408 | , executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 409 | ((void *)0) executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 410 | , executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 411 | ((void *)0) executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 412 | , executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 413 | ((void *)0) executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 414 | ); executed 9 times by 1 test: return get_error_values(1, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 9 | ||||||||||||
| 415 | } | - | ||||||||||||
| 416 | - | |||||||||||||
| 417 | unsigned long ERR_get_error_line(const char **file, int *line) | - | ||||||||||||
| 418 | { | - | ||||||||||||
| 419 | return never executed: get_error_values(1, 0, file, line, return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) );never executed: return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 420 | ((void *)0) never executed: return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 421 | , never executed: return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 422 | ((void *)0) never executed: return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 423 | ); never executed: return get_error_values(1, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 424 | } | - | ||||||||||||
| 425 | - | |||||||||||||
| 426 | unsigned long ERR_get_error_line_data(const char **file, int *line, | - | ||||||||||||
| 427 | const char **data, int *flags) | - | ||||||||||||
| 428 | { | - | ||||||||||||
| 429 | return executed 9895 times by 1 test: get_error_values(1, 0, file, line, data, flags);return get_error_values(1, 0, file, line, data, flags);Executed by:
executed 9895 times by 1 test: return get_error_values(1, 0, file, line, data, flags);Executed by:
| 9895 | ||||||||||||
| 430 | } | - | ||||||||||||
| 431 | - | |||||||||||||
| 432 | unsigned long ERR_peek_error(void) | - | ||||||||||||
| 433 | { | - | ||||||||||||
| 434 | return executed 70029 times by 1 test: get_error_values(0, 0, return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 435 | ((void *)0) executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 436 | , executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 437 | ((void *)0) executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 438 | , executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 439 | ((void *)0) executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 440 | , executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 441 | ((void *)0) executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 442 | ); executed 70029 times by 1 test: return get_error_values(0, 0, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 70029 | ||||||||||||
| 443 | } | - | ||||||||||||
| 444 | - | |||||||||||||
| 445 | unsigned long ERR_peek_error_line(const char **file, int *line) | - | ||||||||||||
| 446 | { | - | ||||||||||||
| 447 | return never executed: get_error_values(0, 0, file, line, return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) );never executed: return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 448 | ((void *)0) never executed: return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 449 | , never executed: return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 450 | ((void *)0) never executed: return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 451 | ); never executed: return get_error_values(0, 0, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 452 | } | - | ||||||||||||
| 453 | - | |||||||||||||
| 454 | unsigned long ERR_peek_error_line_data(const char **file, int *line, | - | ||||||||||||
| 455 | const char **data, int *flags) | - | ||||||||||||
| 456 | { | - | ||||||||||||
| 457 | return never executed: get_error_values(0, 0, file, line, data, flags);return get_error_values(0, 0, file, line, data, flags);never executed: return get_error_values(0, 0, file, line, data, flags); | 0 | ||||||||||||
| 458 | } | - | ||||||||||||
| 459 | - | |||||||||||||
| 460 | unsigned long ERR_peek_last_error(void) | - | ||||||||||||
| 461 | { | - | ||||||||||||
| 462 | return executed 11467 times by 1 test: get_error_values(0, 1, return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 463 | ((void *)0) executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 464 | , executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 465 | ((void *)0) executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 466 | , executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 467 | ((void *)0) executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 468 | , executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 469 | ((void *)0) executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 470 | ); executed 11467 times by 1 test: return get_error_values(0, 1, ((void *)0) , ((void *)0) , ((void *)0) , ((void *)0) );Executed by:
| 11467 | ||||||||||||
| 471 | } | - | ||||||||||||
| 472 | - | |||||||||||||
| 473 | unsigned long ERR_peek_last_error_line(const char **file, int *line) | - | ||||||||||||
| 474 | { | - | ||||||||||||
| 475 | return never executed: get_error_values(0, 1, file, line, return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) );never executed: return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 476 | ((void *)0) never executed: return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 477 | , never executed: return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 478 | ((void *)0) never executed: return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 479 | ); never executed: return get_error_values(0, 1, file, line, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||
| 480 | } | - | ||||||||||||
| 481 | - | |||||||||||||
| 482 | unsigned long ERR_peek_last_error_line_data(const char **file, int *line, | - | ||||||||||||
| 483 | const char **data, int *flags) | - | ||||||||||||
| 484 | { | - | ||||||||||||
| 485 | return never executed: get_error_values(0, 1, file, line, data, flags);return get_error_values(0, 1, file, line, data, flags);never executed: return get_error_values(0, 1, file, line, data, flags); | 0 | ||||||||||||
| 486 | } | - | ||||||||||||
| 487 | - | |||||||||||||
| 488 | static unsigned long get_error_values(int inc, int top, const char **file, | - | ||||||||||||
| 489 | int *line, const char **data, | - | ||||||||||||
| 490 | int *flags) | - | ||||||||||||
| 491 | { | - | ||||||||||||
| 492 | int i = 0; | - | ||||||||||||
| 493 | ERR_STATE *es; | - | ||||||||||||
| 494 | unsigned long ret; | - | ||||||||||||
| 495 | - | |||||||||||||
| 496 | es = ERR_get_state(); | - | ||||||||||||
| 497 | if (es ==
| 0-91400 | ||||||||||||
| 498 | ((void *)0)
| 0-91400 | ||||||||||||
| 499 | ) | - | ||||||||||||
| 500 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 501 | - | |||||||||||||
| 502 | if (inc
| 0-81496 | ||||||||||||
| 503 | if (file
| 0 | ||||||||||||
| 504 | * never executed: file = "";*file = "";never executed: *file = ""; | 0 | ||||||||||||
| 505 | if (line
| 0 | ||||||||||||
| 506 | * never executed: line = 0;*line = 0;never executed: *line = 0; | 0 | ||||||||||||
| 507 | if (data
| 0 | ||||||||||||
| 508 | * never executed: data = "";*data = "";never executed: *data = ""; | 0 | ||||||||||||
| 509 | if (flags
| 0 | ||||||||||||
| 510 | * never executed: flags = 0;*flags = 0;never executed: *flags = 0; | 0 | ||||||||||||
| 511 | - | |||||||||||||
| 512 | return never executed: (4|64);return (4|64);never executed: return (4|64); | 0 | ||||||||||||
| 513 | } | - | ||||||||||||
| 514 | - | |||||||||||||
| 515 | if (es->bottom == es->top
| 38446-52954 | ||||||||||||
| 516 | return executed 38446 times by 1 test: 0;return 0;Executed by:
executed 38446 times by 1 test: return 0;Executed by:
| 38446 | ||||||||||||
| 517 | if (top
| 11467-41487 | ||||||||||||
| 518 | i = es->top; executed 11467 times by 1 test: i = es->top;Executed by:
| 11467 | ||||||||||||
| 519 | else | - | ||||||||||||
| 520 | i = (es->bottom + 1) % 16; executed 41487 times by 1 test: i = (es->bottom + 1) % 16;Executed by:
| 41487 | ||||||||||||
| 521 | - | |||||||||||||
| 522 | ret = es->err_buffer[i]; | - | ||||||||||||
| 523 | if (inc
| 3982-48972 | ||||||||||||
| 524 | es->bottom = i; | - | ||||||||||||
| 525 | es->err_buffer[i] = 0; | - | ||||||||||||
| 526 | } executed 3982 times by 1 test: end of blockExecuted by:
| 3982 | ||||||||||||
| 527 | - | |||||||||||||
| 528 | if (file !=
| 3978-48976 | ||||||||||||
| 529 | ((void *)0)
| 3978-48976 | ||||||||||||
| 530 | && line !=
| 0-3978 | ||||||||||||
| 531 | ((void *)0)
| 0-3978 | ||||||||||||
| 532 | ) { | - | ||||||||||||
| 533 | if (es->err_file[i] ==
| 0-3978 | ||||||||||||
| 534 | ((void *)0)
| 0-3978 | ||||||||||||
| 535 | ) { | - | ||||||||||||
| 536 | *file = "NA"; | - | ||||||||||||
| 537 | *line = 0; | - | ||||||||||||
| 538 | } never executed: else {end of block | 0 | ||||||||||||
| 539 | *file = es->err_file[i]; | - | ||||||||||||
| 540 | *line = es->err_line[i]; | - | ||||||||||||
| 541 | } executed 3978 times by 1 test: end of blockExecuted by:
| 3978 | ||||||||||||
| 542 | } | - | ||||||||||||
| 543 | - | |||||||||||||
| 544 | if (data ==
| 3978-48976 | ||||||||||||
| 545 | ((void *)0)
| 3978-48976 | ||||||||||||
| 546 | ) { | - | ||||||||||||
| 547 | if (inc
| 4-48972 | ||||||||||||
| 548 | do { if ((
| 0-4 | ||||||||||||
| 549 | ((void *)0) | - | ||||||||||||
| 550 | ; } never executed: (es)->err_data_flags[i] = 0; } while (0);end of block | 0 | ||||||||||||
| 551 | } executed 4 times by 1 test: end of blockExecuted by:
| 4 | ||||||||||||
| 552 | } executed 48976 times by 1 test: else {end of blockExecuted by:
| 48976 | ||||||||||||
| 553 | if (es->err_data[i] ==
| 490-3488 | ||||||||||||
| 554 | ((void *)0)
| 490-3488 | ||||||||||||
| 555 | ) { | - | ||||||||||||
| 556 | *data = ""; | - | ||||||||||||
| 557 | if (flags !=
| 0-3488 | ||||||||||||
| 558 | ((void *)0)
| 0-3488 | ||||||||||||
| 559 | ) | - | ||||||||||||
| 560 | * executed 3488 times by 1 test: flags = 0;*flags = 0;Executed by:
executed 3488 times by 1 test: *flags = 0;Executed by:
| 3488 | ||||||||||||
| 561 | } executed 3488 times by 1 test: else {end of blockExecuted by:
| 3488 | ||||||||||||
| 562 | *data = es->err_data[i]; | - | ||||||||||||
| 563 | if (flags !=
| 0-490 | ||||||||||||
| 564 | ((void *)0)
| 0-490 | ||||||||||||
| 565 | ) | - | ||||||||||||
| 566 | * executed 490 times by 1 test: flags = es->err_data_flags[i];*flags = es->err_data_flags[i];Executed by:
executed 490 times by 1 test: *flags = es->err_data_flags[i];Executed by:
| 490 | ||||||||||||
| 567 | } executed 490 times by 1 test: end of blockExecuted by:
| 490 | ||||||||||||
| 568 | } | - | ||||||||||||
| 569 | return executed 52954 times by 1 test: ret;return ret;Executed by:
executed 52954 times by 1 test: return ret;Executed by:
| 52954 | ||||||||||||
| 570 | } | - | ||||||||||||
| 571 | - | |||||||||||||
| 572 | void ERR_error_string_n(unsigned long e, char *buf, size_t len) | - | ||||||||||||
| 573 | { | - | ||||||||||||
| 574 | char lsbuf[64], fsbuf[64], rsbuf[64]; | - | ||||||||||||
| 575 | const char *ls, *fs, *rs; | - | ||||||||||||
| 576 | unsigned long l, f, r; | - | ||||||||||||
| 577 | - | |||||||||||||
| 578 | if (len == 0
| 0-3978 | ||||||||||||
| 579 | return; never executed: return; | 0 | ||||||||||||
| 580 | - | |||||||||||||
| 581 | l = (int)(((e) >> 24L) & 0x0FFL); | - | ||||||||||||
| 582 | ls = ERR_lib_error_string(e); | - | ||||||||||||
| 583 | if (ls ==
| 0-3978 | ||||||||||||
| 584 | ((void *)0)
| 0-3978 | ||||||||||||
| 585 | ) { | - | ||||||||||||
| 586 | BIO_snprintf(lsbuf, sizeof(lsbuf), "lib(%lu)", l); | - | ||||||||||||
| 587 | ls = lsbuf; | - | ||||||||||||
| 588 | } never executed: end of block | 0 | ||||||||||||
| 589 | - | |||||||||||||
| 590 | fs = ERR_func_error_string(e); | - | ||||||||||||
| 591 | f = (int)(((e) >> 12L) & 0xFFFL); | - | ||||||||||||
| 592 | if (fs ==
| 0-3978 | ||||||||||||
| 593 | ((void *)0)
| 0-3978 | ||||||||||||
| 594 | ) { | - | ||||||||||||
| 595 | BIO_snprintf(fsbuf, sizeof(fsbuf), "func(%lu)", f); | - | ||||||||||||
| 596 | fs = fsbuf; | - | ||||||||||||
| 597 | } never executed: end of block | 0 | ||||||||||||
| 598 | - | |||||||||||||
| 599 | rs = ERR_reason_error_string(e); | - | ||||||||||||
| 600 | r = (int)( (e) & 0xFFFL); | - | ||||||||||||
| 601 | if (rs ==
| 0-3978 | ||||||||||||
| 602 | ((void *)0)
| 0-3978 | ||||||||||||
| 603 | ) { | - | ||||||||||||
| 604 | BIO_snprintf(rsbuf, sizeof(rsbuf), "reason(%lu)", r); | - | ||||||||||||
| 605 | rs = rsbuf; | - | ||||||||||||
| 606 | } never executed: end of block | 0 | ||||||||||||
| 607 | - | |||||||||||||
| 608 | BIO_snprintf(buf, len, "error:%08lX:%s:%s:%s", e, ls, fs, rs); | - | ||||||||||||
| 609 | if (strlen(buf) == len - 1
| 0-3978 | ||||||||||||
| 610 | - | |||||||||||||
| 611 | BIO_snprintf(buf, len, "err:%lx:%lx:%lx:%lx", e, l, f, r); | - | ||||||||||||
| 612 | } never executed: end of block | 0 | ||||||||||||
| 613 | } executed 3978 times by 1 test: end of blockExecuted by:
| 3978 | ||||||||||||
| 614 | - | |||||||||||||
| 615 | - | |||||||||||||
| 616 | - | |||||||||||||
| 617 | - | |||||||||||||
| 618 | - | |||||||||||||
| 619 | char *ERR_error_string(unsigned long e, char *ret) | - | ||||||||||||
| 620 | { | - | ||||||||||||
| 621 | static char buf[256]; | - | ||||||||||||
| 622 | - | |||||||||||||
| 623 | if (ret ==
| 0 | ||||||||||||
| 624 | ((void *)0)
| 0 | ||||||||||||
| 625 | ) | - | ||||||||||||
| 626 | ret = buf; never executed: ret = buf; | 0 | ||||||||||||
| 627 | ERR_error_string_n(e, ret, (int)sizeof(buf)); | - | ||||||||||||
| 628 | return never executed: ret;return ret;never executed: return ret; | 0 | ||||||||||||
| 629 | } | - | ||||||||||||
| 630 | - | |||||||||||||
| 631 | const char *ERR_lib_error_string(unsigned long e) | - | ||||||||||||
| 632 | { | - | ||||||||||||
| 633 | ERR_STRING_DATA d, *p; | - | ||||||||||||
| 634 | unsigned long l; | - | ||||||||||||
| 635 | - | |||||||||||||
| 636 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-3978 | ||||||||||||
| 637 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 638 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 639 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 640 | } | - | ||||||||||||
| 641 | - | |||||||||||||
| 642 | l = (int)(((e) >> 24L) & 0x0FFL); | - | ||||||||||||
| 643 | d.error = ( (((unsigned int)(l) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ); | - | ||||||||||||
| 644 | p = int_err_get_item(&d); | - | ||||||||||||
| 645 | return executed 3978 times by 1 test: ((return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
executed 3978 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-3978 | ||||||||||||
| 646 | ((void *)0)
executed 3978 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-3978 | ||||||||||||
| 647 | )
executed 3978 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-3978 | ||||||||||||
| 648 | ((void *)0) executed 3978 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 3978 | ||||||||||||
| 649 | : p->string); executed 3978 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 3978 | ||||||||||||
| 650 | } | - | ||||||||||||
| 651 | - | |||||||||||||
| 652 | const char *ERR_func_error_string(unsigned long e) | - | ||||||||||||
| 653 | { | - | ||||||||||||
| 654 | ERR_STRING_DATA d, *p; | - | ||||||||||||
| 655 | unsigned long l, f; | - | ||||||||||||
| 656 | - | |||||||||||||
| 657 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-64765 | ||||||||||||
| 658 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 659 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 660 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 661 | } | - | ||||||||||||
| 662 | - | |||||||||||||
| 663 | l = (int)(((e) >> 24L) & 0x0FFL); | - | ||||||||||||
| 664 | f = (int)(((e) >> 12L) & 0xFFFL); | - | ||||||||||||
| 665 | d.error = ( (((unsigned int)(l) & 0x0FF) << 24L) | (((unsigned int)(f) & 0xFFF) << 12L) | (((unsigned int)(0) & 0xFFF) ) ); | - | ||||||||||||
| 666 | p = int_err_get_item(&d); | - | ||||||||||||
| 667 | return executed 64765 times by 11 tests: ((return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
executed 64765 times by 11 tests: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 4073-64765 | ||||||||||||
| 668 | ((void *)0)
executed 64765 times by 11 tests: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 4073-64765 | ||||||||||||
| 669 | )
executed 64765 times by 11 tests: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 4073-64765 | ||||||||||||
| 670 | ((void *)0) executed 64765 times by 11 tests: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 64765 | ||||||||||||
| 671 | : p->string); executed 64765 times by 11 tests: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 64765 | ||||||||||||
| 672 | } | - | ||||||||||||
| 673 | - | |||||||||||||
| 674 | const char *ERR_reason_error_string(unsigned long e) | - | ||||||||||||
| 675 | { | - | ||||||||||||
| 676 | ERR_STRING_DATA d, *p = | - | ||||||||||||
| 677 | ((void *)0) | - | ||||||||||||
| 678 | ; | - | ||||||||||||
| 679 | unsigned long l, r; | - | ||||||||||||
| 680 | - | |||||||||||||
| 681 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-4073 | ||||||||||||
| 682 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 683 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 684 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 685 | } | - | ||||||||||||
| 686 | - | |||||||||||||
| 687 | l = (int)(((e) >> 24L) & 0x0FFL); | - | ||||||||||||
| 688 | r = (int)( (e) & 0xFFFL); | - | ||||||||||||
| 689 | d.error = ( (((unsigned int)(l) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(r) & 0xFFF) ) ); | - | ||||||||||||
| 690 | p = int_err_get_item(&d); | - | ||||||||||||
| 691 | if (!p
| 1052-3021 | ||||||||||||
| 692 | d.error = ( (((unsigned int)(0) & 0x0FF) << 24L) | (((unsigned int)(0) & 0xFFF) << 12L) | (((unsigned int)(r) & 0xFFF) ) ); | - | ||||||||||||
| 693 | p = int_err_get_item(&d); | - | ||||||||||||
| 694 | } executed 1052 times by 1 test: end of blockExecuted by:
| 1052 | ||||||||||||
| 695 | return executed 4073 times by 1 test: ((return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
executed 4073 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-4073 | ||||||||||||
| 696 | ((void *)0)
executed 4073 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-4073 | ||||||||||||
| 697 | )
executed 4073 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 0-4073 | ||||||||||||
| 698 | ((void *)0) executed 4073 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 4073 | ||||||||||||
| 699 | : p->string); executed 4073 times by 1 test: return ((p == ((void *)0) ) ? ((void *)0) : p->string);Executed by:
| 4073 | ||||||||||||
| 700 | } | - | ||||||||||||
| 701 | - | |||||||||||||
| 702 | void err_delete_thread_state(void) | - | ||||||||||||
| 703 | { | - | ||||||||||||
| 704 | ERR_STATE *state = CRYPTO_THREAD_get_local(&err_thread_local); | - | ||||||||||||
| 705 | if (state ==
| 0-2074 | ||||||||||||
| 706 | ((void *)0)
| 0-2074 | ||||||||||||
| 707 | ) | - | ||||||||||||
| 708 | return; never executed: return; | 0 | ||||||||||||
| 709 | - | |||||||||||||
| 710 | CRYPTO_THREAD_set_local(&err_thread_local, | - | ||||||||||||
| 711 | ((void *)0) | - | ||||||||||||
| 712 | ); | - | ||||||||||||
| 713 | ERR_STATE_free(state); | - | ||||||||||||
| 714 | } executed 2074 times by 11 tests: end of blockExecuted by:
| 2074 | ||||||||||||
| 715 | - | |||||||||||||
| 716 | - | |||||||||||||
| 717 | void ERR_remove_thread_state(void *dummy) | - | ||||||||||||
| 718 | { | - | ||||||||||||
| 719 | } | - | ||||||||||||
| 720 | - | |||||||||||||
| 721 | - | |||||||||||||
| 722 | - | |||||||||||||
| 723 | void ERR_remove_state(unsigned long pid) | - | ||||||||||||
| 724 | { | - | ||||||||||||
| 725 | } | - | ||||||||||||
| 726 | - | |||||||||||||
| 727 | - | |||||||||||||
| 728 | static int err_do_init(void); static int err_do_init_ossl_ret_ = 0; static void err_do_init_ossl_(void) { err_do_init_ossl_ret_ = err_do_init(); } executed 2074 times by 11 tests: static int err_do_init(void)end of blockExecuted by:
| 2074 | ||||||||||||
| 729 | { | - | ||||||||||||
| 730 | set_err_thread_local = 1; | - | ||||||||||||
| 731 | return executed 2074 times by 11 tests: CRYPTO_THREAD_init_local(&err_thread_local, return CRYPTO_THREAD_init_local(&err_thread_local, ((void *)0) );Executed by:
executed 2074 times by 11 tests: return CRYPTO_THREAD_init_local(&err_thread_local, ((void *)0) );Executed by:
| 2074 | ||||||||||||
| 732 | ((void *)0) executed 2074 times by 11 tests: return CRYPTO_THREAD_init_local(&err_thread_local, ((void *)0) );Executed by:
| 2074 | ||||||||||||
| 733 | ); executed 2074 times by 11 tests: return CRYPTO_THREAD_init_local(&err_thread_local, ((void *)0) );Executed by:
| 2074 | ||||||||||||
| 734 | } | - | ||||||||||||
| 735 | - | |||||||||||||
| 736 | ERR_STATE *ERR_get_state(void) | - | ||||||||||||
| 737 | { | - | ||||||||||||
| 738 | ERR_STATE *state; | - | ||||||||||||
| 739 | - | |||||||||||||
| 740 | if (!OPENSSL_init_crypto(0x00040000L,
| 0-3790084 | ||||||||||||
| 741 | ((void *)0)
| 0-3790084 | ||||||||||||
| 742 | )
| 0-3790084 | ||||||||||||
| 743 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 744 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 745 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 746 | - | |||||||||||||
| 747 | if (!(CRYPTO_THREAD_run_once(&err_init, err_do_init_ossl_)
| 0-3790084 | ||||||||||||
| 748 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 749 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 750 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 751 | - | |||||||||||||
| 752 | state = CRYPTO_THREAD_get_local(&err_thread_local); | - | ||||||||||||
| 753 | if (state == (ERR_STATE*)-1
| 0-3790084 | ||||||||||||
| 754 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 755 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 756 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 757 | - | |||||||||||||
| 758 | if (state ==
| 2074-3788010 | ||||||||||||
| 759 | ((void *)0)
| 2074-3788010 | ||||||||||||
| 760 | ) { | - | ||||||||||||
| 761 | if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1)
| 0-2074 | ||||||||||||
| 762 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 763 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 764 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 765 | - | |||||||||||||
| 766 | if ((
| 0-2074 | ||||||||||||
| 767 | ((void *)0)
| 0-2074 | ||||||||||||
| 768 | ) { | - | ||||||||||||
| 769 | CRYPTO_THREAD_set_local(&err_thread_local, | - | ||||||||||||
| 770 | ((void *)0) | - | ||||||||||||
| 771 | ); | - | ||||||||||||
| 772 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 773 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 774 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 775 | } | - | ||||||||||||
| 776 | - | |||||||||||||
| 777 | if (!ossl_init_thread_start(0x02)
| 0-2074 | ||||||||||||
| 778 | || !CRYPTO_THREAD_set_local(&err_thread_local, state)
| 0-2074 | ||||||||||||
| 779 | ERR_STATE_free(state); | - | ||||||||||||
| 780 | CRYPTO_THREAD_set_local(&err_thread_local, | - | ||||||||||||
| 781 | ((void *)0) | - | ||||||||||||
| 782 | ); | - | ||||||||||||
| 783 | return never executed: return ((void *)0) ;never executed: return ((void *)0) ; | 0 | ||||||||||||
| 784 | ((void *)0) never executed: return ((void *)0) ; | 0 | ||||||||||||
| 785 | ; never executed: return ((void *)0) ; | 0 | ||||||||||||
| 786 | } | - | ||||||||||||
| 787 | - | |||||||||||||
| 788 | - | |||||||||||||
| 789 | OPENSSL_init_crypto(0x00000002L, | - | ||||||||||||
| 790 | ((void *)0) | - | ||||||||||||
| 791 | ); | - | ||||||||||||
| 792 | } executed 2074 times by 11 tests: end of blockExecuted by:
| 2074 | ||||||||||||
| 793 | - | |||||||||||||
| 794 | return executed 3790084 times by 11 tests: state;return state;Executed by:
executed 3790084 times by 11 tests: return state;Executed by:
| 3790084 | ||||||||||||
| 795 | } | - | ||||||||||||
| 796 | - | |||||||||||||
| 797 | - | |||||||||||||
| 798 | - | |||||||||||||
| 799 | - | |||||||||||||
| 800 | - | |||||||||||||
| 801 | int err_shelve_state(void **state) | - | ||||||||||||
| 802 | { | - | ||||||||||||
| 803 | if (!OPENSSL_init_crypto(0x00040000L,
| 0 | ||||||||||||
| 804 | ((void *)0)
| 0 | ||||||||||||
| 805 | )
| 0 | ||||||||||||
| 806 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 807 | - | |||||||||||||
| 808 | if (!(CRYPTO_THREAD_run_once(&err_init, err_do_init_ossl_)
| 0 | ||||||||||||
| 809 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 810 | - | |||||||||||||
| 811 | *state = CRYPTO_THREAD_get_local(&err_thread_local); | - | ||||||||||||
| 812 | if (!CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)-1)
| 0 | ||||||||||||
| 813 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 814 | - | |||||||||||||
| 815 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 816 | } | - | ||||||||||||
| 817 | - | |||||||||||||
| 818 | - | |||||||||||||
| 819 | - | |||||||||||||
| 820 | - | |||||||||||||
| 821 | - | |||||||||||||
| 822 | void err_unshelve_state(void* state) | - | ||||||||||||
| 823 | { | - | ||||||||||||
| 824 | if (state != (void*)-1
| 0 | ||||||||||||
| 825 | CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)state); never executed: CRYPTO_THREAD_set_local(&err_thread_local, (ERR_STATE*)state); | 0 | ||||||||||||
| 826 | } never executed: end of block | 0 | ||||||||||||
| 827 | - | |||||||||||||
| 828 | int ERR_get_next_error_library(void) | - | ||||||||||||
| 829 | { | - | ||||||||||||
| 830 | int ret; | - | ||||||||||||
| 831 | - | |||||||||||||
| 832 | if (!(CRYPTO_THREAD_run_once(&err_string_init, do_err_strings_init_ossl_)
| 0-368 | ||||||||||||
| 833 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 834 | - | |||||||||||||
| 835 | CRYPTO_THREAD_write_lock(err_string_lock); | - | ||||||||||||
| 836 | ret = int_err_library_number++; | - | ||||||||||||
| 837 | CRYPTO_THREAD_unlock(err_string_lock); | - | ||||||||||||
| 838 | return executed 368 times by 1 test: ret;return ret;Executed by:
executed 368 times by 1 test: return ret;Executed by:
| 368 | ||||||||||||
| 839 | } | - | ||||||||||||
| 840 | - | |||||||||||||
| 841 | void ERR_set_error_data(char *data, int flags) | - | ||||||||||||
| 842 | { | - | ||||||||||||
| 843 | ERR_STATE *es; | - | ||||||||||||
| 844 | int i; | - | ||||||||||||
| 845 | - | |||||||||||||
| 846 | es = ERR_get_state(); | - | ||||||||||||
| 847 | if (es ==
| 0-631004 | ||||||||||||
| 848 | ((void *)0)
| 0-631004 | ||||||||||||
| 849 | ) | - | ||||||||||||
| 850 | return; never executed: return; | 0 | ||||||||||||
| 851 | - | |||||||||||||
| 852 | i = es->top; | - | ||||||||||||
| 853 | - | |||||||||||||
| 854 | do { if ((
| 0-631004 | ||||||||||||
| 855 | ((void *)0) | - | ||||||||||||
| 856 | ; } never executed: (es)->err_data_flags[i] = 0; } while (0);end of block | 0 | ||||||||||||
| 857 | es->err_data[i] = data; | - | ||||||||||||
| 858 | es->err_data_flags[i] = flags; | - | ||||||||||||
| 859 | } executed 631004 times by 1 test: end of blockExecuted by:
| 631004 | ||||||||||||
| 860 | - | |||||||||||||
| 861 | void ERR_add_error_data(int num, ...) | - | ||||||||||||
| 862 | { | - | ||||||||||||
| 863 | va_list args; | - | ||||||||||||
| 864 | - | |||||||||||||
| 865 | __builtin_va_start( | - | ||||||||||||
| 866 | args | - | ||||||||||||
| 867 | , | - | ||||||||||||
| 868 | num | - | ||||||||||||
| 869 | ) | - | ||||||||||||
| 870 | ; | - | ||||||||||||
| 871 | ERR_add_error_vdata(num, args); | - | ||||||||||||
| 872 | - | |||||||||||||
| 873 | __builtin_va_end( | - | ||||||||||||
| 874 | args | - | ||||||||||||
| 875 | ) | - | ||||||||||||
| 876 | ; | - | ||||||||||||
| 877 | } executed 631004 times by 1 test: end of blockExecuted by:
| 631004 | ||||||||||||
| 878 | - | |||||||||||||
| 879 | void ERR_add_error_vdata(int num, va_list args) | - | ||||||||||||
| 880 | { | - | ||||||||||||
| 881 | int i, n, s; | - | ||||||||||||
| 882 | char *str, *p, *a; | - | ||||||||||||
| 883 | - | |||||||||||||
| 884 | s = 80; | - | ||||||||||||
| 885 | if ((
| 0-631004 | ||||||||||||
| 886 | ((void *)0)
| 0-631004 | ||||||||||||
| 887 | ) { | - | ||||||||||||
| 888 | - | |||||||||||||
| 889 | return; never executed: return; | 0 | ||||||||||||
| 890 | } | - | ||||||||||||
| 891 | str[0] = '\0'; | - | ||||||||||||
| 892 | - | |||||||||||||
| 893 | n = 0; | - | ||||||||||||
| 894 | for (i = 0; i < num
| 631004-2128056 | ||||||||||||
| 895 | a = | - | ||||||||||||
| 896 | __builtin_va_arg( | - | ||||||||||||
| 897 | args | - | ||||||||||||
| 898 | , | - | ||||||||||||
| 899 | char * | - | ||||||||||||
| 900 | ) | - | ||||||||||||
| 901 | ; | - | ||||||||||||
| 902 | if (a ==
| 73-2127983 | ||||||||||||
| 903 | ((void *)0)
| 73-2127983 | ||||||||||||
| 904 | ) | - | ||||||||||||
| 905 | a = "<NULL>"; executed 73 times by 1 test: a = "<NULL>";Executed by:
| 73 | ||||||||||||
| 906 | n += strlen(a); | - | ||||||||||||
| 907 | if (n > s
| 218-2127838 | ||||||||||||
| 908 | s = n + 20; | - | ||||||||||||
| 909 | p = CRYPTO_realloc(str, s + 1, __FILE__, 794); | - | ||||||||||||
| 910 | if (p ==
| 0-218 | ||||||||||||
| 911 | ((void *)0)
| 0-218 | ||||||||||||
| 912 | ) { | - | ||||||||||||
| 913 | CRYPTO_free(str, __FILE__, 796); | - | ||||||||||||
| 914 | return; never executed: return; | 0 | ||||||||||||
| 915 | } | - | ||||||||||||
| 916 | str = p; | - | ||||||||||||
| 917 | } executed 218 times by 1 test: end of blockExecuted by:
| 218 | ||||||||||||
| 918 | OPENSSL_strlcat(str, a, (size_t)s + 1); | - | ||||||||||||
| 919 | } executed 2128056 times by 1 test: end of blockExecuted by:
| 2128056 | ||||||||||||
| 920 | ERR_set_error_data(str, 0x01 | 0x02); | - | ||||||||||||
| 921 | } executed 631004 times by 1 test: end of blockExecuted by:
| 631004 | ||||||||||||
| 922 | - | |||||||||||||
| 923 | int ERR_set_mark(void) | - | ||||||||||||
| 924 | { | - | ||||||||||||
| 925 | ERR_STATE *es; | - | ||||||||||||
| 926 | - | |||||||||||||
| 927 | es = ERR_get_state(); | - | ||||||||||||
| 928 | if (es ==
| 0-65103 | ||||||||||||
| 929 | ((void *)0)
| 0-65103 | ||||||||||||
| 930 | ) | - | ||||||||||||
| 931 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 932 | - | |||||||||||||
| 933 | if (es->bottom == es->top
| 9043-56060 | ||||||||||||
| 934 | return executed 56060 times by 1 test: 0;return 0;Executed by:
executed 56060 times by 1 test: return 0;Executed by:
| 56060 | ||||||||||||
| 935 | es->err_flags[es->top] |= 0x01; | - | ||||||||||||
| 936 | return executed 9043 times by 1 test: 1;return 1;Executed by:
executed 9043 times by 1 test: return 1;Executed by:
| 9043 | ||||||||||||
| 937 | } | - | ||||||||||||
| 938 | - | |||||||||||||
| 939 | int ERR_pop_to_mark(void) | - | ||||||||||||
| 940 | { | - | ||||||||||||
| 941 | ERR_STATE *es; | - | ||||||||||||
| 942 | - | |||||||||||||
| 943 | es = ERR_get_state(); | - | ||||||||||||
| 944 | if (es ==
| 0-65039 | ||||||||||||
| 945 | ((void *)0)
| 0-65039 | ||||||||||||
| 946 | ) | - | ||||||||||||
| 947 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 948 | - | |||||||||||||
| 949 | while (es->bottom != es->top
| 56373-79617 | ||||||||||||
| 950 | && (
| 8666-70951 | ||||||||||||
| 951 | do { do { if ((
| 6629-64322 | ||||||||||||
| 952 | ((void *)0) | - | ||||||||||||
| 953 | ; } executed 6629 times by 1 test: (es)->err_data_flags[es->top] = 0; } while (0); (es)->err_flags[es->top] = 0; (es)->err_buffer[es->top] = 0; (es)->err_file[es->top] = end of blockExecuted by:
| 6629 | ||||||||||||
| 954 | ((void *)0) | - | ||||||||||||
| 955 | ; (es)->err_line[es->top] = -1; } while (0); | - | ||||||||||||
| 956 | es->top = es->top > 0
| 808-70143 | ||||||||||||
| 957 | } executed 70951 times by 1 test: end of blockExecuted by:
| 70951 | ||||||||||||
| 958 | - | |||||||||||||
| 959 | if (es->bottom == es->top
| 8666-56373 | ||||||||||||
| 960 | return executed 56373 times by 1 test: 0;return 0;Executed by:
executed 56373 times by 1 test: return 0;Executed by:
| 56373 | ||||||||||||
| 961 | es->err_flags[es->top] &= ~0x01; | - | ||||||||||||
| 962 | return executed 8666 times by 1 test: 1;return 1;Executed by:
executed 8666 times by 1 test: return 1;Executed by:
| 8666 | ||||||||||||
| 963 | } | - | ||||||||||||
| 964 | - | |||||||||||||
| 965 | int ERR_clear_last_mark(void) | - | ||||||||||||
| 966 | { | - | ||||||||||||
| 967 | ERR_STATE *es; | - | ||||||||||||
| 968 | int top; | - | ||||||||||||
| 969 | - | |||||||||||||
| 970 | es = ERR_get_state(); | - | ||||||||||||
| 971 | if (es ==
| 0 | ||||||||||||
| 972 | ((void *)0)
| 0 | ||||||||||||
| 973 | ) | - | ||||||||||||
| 974 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 975 | - | |||||||||||||
| 976 | top = es->top; | - | ||||||||||||
| 977 | while (es->bottom != top
| 0 | ||||||||||||
| 978 | && (
| 0 | ||||||||||||
| 979 | top = top > 0
| 0 | ||||||||||||
| 980 | } never executed: end of block | 0 | ||||||||||||
| 981 | - | |||||||||||||
| 982 | if (es->bottom == top
| 0 | ||||||||||||
| 983 | return never executed: 0;return 0;never executed: return 0; | 0 | ||||||||||||
| 984 | es->err_flags[top] &= ~0x01; | - | ||||||||||||
| 985 | return never executed: 1;return 1;never executed: return 1; | 0 | ||||||||||||
| 986 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |