| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/openssl/src/ssl/ssl_sess.c | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||||||||
| 2 | static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); | - | ||||||||||||||||||||||||||||||
| 3 | static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s); | - | ||||||||||||||||||||||||||||||
| 4 | static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); | - | ||||||||||||||||||||||||||||||
| 5 | SSL_SESSION *SSL_get_session(const SSL *ssl) | - | ||||||||||||||||||||||||||||||
| 6 | - | |||||||||||||||||||||||||||||||
| 7 | { | - | ||||||||||||||||||||||||||||||
| 8 |     return executed 3875 times by 1 test:   ssl->session;return ssl->session;Executed by: 
 executed 3875 times by 1 test:  return ssl->session;Executed by: 
  | 3875 | ||||||||||||||||||||||||||||||
| 9 | } | - | ||||||||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||||||||
| 11 | SSL_SESSION *SSL_get1_session(SSL *ssl) | - | ||||||||||||||||||||||||||||||
| 12 | - | |||||||||||||||||||||||||||||||
| 13 | { | - | ||||||||||||||||||||||||||||||
| 14 | SSL_SESSION *sess; | - | ||||||||||||||||||||||||||||||
| 15 | - | |||||||||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||||||||
| 18 | - | |||||||||||||||||||||||||||||||
| 19 | - | |||||||||||||||||||||||||||||||
| 20 | CRYPTO_THREAD_read_lock(ssl->lock); | - | ||||||||||||||||||||||||||||||
| 21 | sess = ssl->session; | - | ||||||||||||||||||||||||||||||
| 22 |     if (sess
  | 52-1158 | ||||||||||||||||||||||||||||||
| 23 |         SSL_SESSION_up_ref(sess); executed 1158 times by 1 test:  SSL_SESSION_up_ref(sess);Executed by: 
  | 1158 | ||||||||||||||||||||||||||||||
| 24 | CRYPTO_THREAD_unlock(ssl->lock); | - | ||||||||||||||||||||||||||||||
| 25 |     return executed 1210 times by 1 test:   sess;return sess;Executed by: 
 executed 1210 times by 1 test:  return sess;Executed by: 
  | 1210 | ||||||||||||||||||||||||||||||
| 26 | } | - | ||||||||||||||||||||||||||||||
| 27 | - | |||||||||||||||||||||||||||||||
| 28 | int SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) | - | ||||||||||||||||||||||||||||||
| 29 | { | - | ||||||||||||||||||||||||||||||
| 30 |     return never executed:   CRYPTO_set_ex_data(&s->ex_data, idx, arg);return CRYPTO_set_ex_data(&s->ex_data, idx, arg);never executed:  return CRYPTO_set_ex_data(&s->ex_data, idx, arg); | 0 | ||||||||||||||||||||||||||||||
| 31 | } | - | ||||||||||||||||||||||||||||||
| 32 | - | |||||||||||||||||||||||||||||||
| 33 | void *SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) | - | ||||||||||||||||||||||||||||||
| 34 | { | - | ||||||||||||||||||||||||||||||
| 35 |     return never executed:   CRYPTO_get_ex_data(&s->ex_data, idx);return CRYPTO_get_ex_data(&s->ex_data, idx);never executed:  return CRYPTO_get_ex_data(&s->ex_data, idx); | 0 | ||||||||||||||||||||||||||||||
| 36 | } | - | ||||||||||||||||||||||||||||||
| 37 | - | |||||||||||||||||||||||||||||||
| 38 | SSL_SESSION *SSL_SESSION_new(void) | - | ||||||||||||||||||||||||||||||
| 39 | { | - | ||||||||||||||||||||||||||||||
| 40 | SSL_SESSION *ss; | - | ||||||||||||||||||||||||||||||
| 41 | - | |||||||||||||||||||||||||||||||
| 42 |     if (!OPENSSL_init_ssl(0x00200000L, 
  | 0-9017 | ||||||||||||||||||||||||||||||
| 43 |                                                         ((void *)0)
  | 0-9017 | ||||||||||||||||||||||||||||||
| 44 |                                                             )
  | 0-9017 | ||||||||||||||||||||||||||||||
| 45 |         return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 46 |               ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 47 |                   ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 48 | - | |||||||||||||||||||||||||||||||
| 49 | ss = CRYPTO_zalloc(sizeof(*ss), __FILE__, 72); | - | ||||||||||||||||||||||||||||||
| 50 |     if (ss == 
  | 0-9017 | ||||||||||||||||||||||||||||||
| 51 |              ((void *)0)
  | 0-9017 | ||||||||||||||||||||||||||||||
| 52 | ) { | - | ||||||||||||||||||||||||||||||
| 53 | ERR_put_error(20,(189),((1|64)),__FILE__,74); | - | ||||||||||||||||||||||||||||||
| 54 |         return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 55 |               ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 56 |                   ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 57 | } | - | ||||||||||||||||||||||||||||||
| 58 | - | |||||||||||||||||||||||||||||||
| 59 | ss->verify_result = 1; | - | ||||||||||||||||||||||||||||||
| 60 | ss->references = 1; | - | ||||||||||||||||||||||||||||||
| 61 | ss->timeout = 60 * 5 + 4; | - | ||||||||||||||||||||||||||||||
| 62 | ss->time = (unsigned long)time( | - | ||||||||||||||||||||||||||||||
| 63 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 64 | ); | - | ||||||||||||||||||||||||||||||
| 65 | ss->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||||||||||||||
| 66 |     if (ss->lock == 
  | 0-9017 | ||||||||||||||||||||||||||||||
| 67 |                    ((void *)0)
  | 0-9017 | ||||||||||||||||||||||||||||||
| 68 | ) { | - | ||||||||||||||||||||||||||||||
| 69 | ERR_put_error(20,(189),((1|64)),__FILE__,84); | - | ||||||||||||||||||||||||||||||
| 70 | CRYPTO_free(ss, __FILE__, 85); | - | ||||||||||||||||||||||||||||||
| 71 |         return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 72 |               ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 73 |                   ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 74 | } | - | ||||||||||||||||||||||||||||||
| 75 | - | |||||||||||||||||||||||||||||||
| 76 |     if (!CRYPTO_new_ex_data(2, ss, &ss->ex_data)
  | 0-9017 | ||||||||||||||||||||||||||||||
| 77 | CRYPTO_THREAD_lock_free(ss->lock); | - | ||||||||||||||||||||||||||||||
| 78 | CRYPTO_free(ss, __FILE__, 91); | - | ||||||||||||||||||||||||||||||
| 79 |         return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 80 |               ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 81 |                   ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 82 | } | - | ||||||||||||||||||||||||||||||
| 83 |     return executed 9017 times by 1 test:   ss;return ss;Executed by: 
 executed 9017 times by 1 test:  return ss;Executed by: 
  | 9017 | ||||||||||||||||||||||||||||||
| 84 | } | - | ||||||||||||||||||||||||||||||
| 85 | - | |||||||||||||||||||||||||||||||
| 86 | SSL_SESSION *SSL_SESSION_dup(SSL_SESSION *src) | - | ||||||||||||||||||||||||||||||
| 87 | { | - | ||||||||||||||||||||||||||||||
| 88 |     return executed 904 times by 1 test:   ssl_session_dup(src, 1);return ssl_session_dup(src, 1);Executed by: 
 executed 904 times by 1 test:  return ssl_session_dup(src, 1);Executed by: 
  | 904 | ||||||||||||||||||||||||||||||
| 89 | } | - | ||||||||||||||||||||||||||||||
| 90 | - | |||||||||||||||||||||||||||||||
| 91 | - | |||||||||||||||||||||||||||||||
| 92 | - | |||||||||||||||||||||||||||||||
| 93 | - | |||||||||||||||||||||||||||||||
| 94 | - | |||||||||||||||||||||||||||||||
| 95 | SSL_SESSION *ssl_session_dup(SSL_SESSION *src, int ticket) | - | ||||||||||||||||||||||||||||||
| 96 | { | - | ||||||||||||||||||||||||||||||
| 97 | SSL_SESSION *dest; | - | ||||||||||||||||||||||||||||||
| 98 | - | |||||||||||||||||||||||||||||||
| 99 | dest = CRYPTO_malloc(sizeof(*src), __FILE__, 110); | - | ||||||||||||||||||||||||||||||
| 100 |     if (dest == 
  | 0-2469 | ||||||||||||||||||||||||||||||
| 101 |                ((void *)0)
  | 0-2469 | ||||||||||||||||||||||||||||||
| 102 | ) { | - | ||||||||||||||||||||||||||||||
| 103 |         goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 104 | } | - | ||||||||||||||||||||||||||||||
| 105 | memcpy(dest, src, sizeof(*dest)); | - | ||||||||||||||||||||||||||||||
| 106 | - | |||||||||||||||||||||||||||||||
| 107 | - | |||||||||||||||||||||||||||||||
| 108 | - | |||||||||||||||||||||||||||||||
| 109 | - | |||||||||||||||||||||||||||||||
| 110 | - | |||||||||||||||||||||||||||||||
| 111 | - | |||||||||||||||||||||||||||||||
| 112 | dest->psk_identity_hint = | - | ||||||||||||||||||||||||||||||
| 113 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 114 | ; | - | ||||||||||||||||||||||||||||||
| 115 | dest->psk_identity = | - | ||||||||||||||||||||||||||||||
| 116 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 117 | ; | - | ||||||||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||||||||
| 119 | dest->ciphers = | - | ||||||||||||||||||||||||||||||
| 120 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 121 | ; | - | ||||||||||||||||||||||||||||||
| 122 | dest->ext.hostname = | - | ||||||||||||||||||||||||||||||
| 123 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 124 | ; | - | ||||||||||||||||||||||||||||||
| 125 | - | |||||||||||||||||||||||||||||||
| 126 | dest->ext.ecpointformats = | - | ||||||||||||||||||||||||||||||
| 127 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 128 | ; | - | ||||||||||||||||||||||||||||||
| 129 | dest->ext.supportedgroups = | - | ||||||||||||||||||||||||||||||
| 130 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 131 | ; | - | ||||||||||||||||||||||||||||||
| 132 | - | |||||||||||||||||||||||||||||||
| 133 | dest->ext.tick = | - | ||||||||||||||||||||||||||||||
| 134 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 135 | ; | - | ||||||||||||||||||||||||||||||
| 136 | dest->ext.alpn_selected = | - | ||||||||||||||||||||||||||||||
| 137 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 138 | ; | - | ||||||||||||||||||||||||||||||
| 139 | - | |||||||||||||||||||||||||||||||
| 140 | dest->srp_username = | - | ||||||||||||||||||||||||||||||
| 141 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 142 | ; | - | ||||||||||||||||||||||||||||||
| 143 | - | |||||||||||||||||||||||||||||||
| 144 | dest->peer_chain = | - | ||||||||||||||||||||||||||||||
| 145 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 146 | ; | - | ||||||||||||||||||||||||||||||
| 147 | dest->peer = | - | ||||||||||||||||||||||||||||||
| 148 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 149 | ; | - | ||||||||||||||||||||||||||||||
| 150 | dest->ticket_appdata = | - | ||||||||||||||||||||||||||||||
| 151 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 152 | ; | - | ||||||||||||||||||||||||||||||
| 153 | memset(&dest->ex_data, 0, sizeof(dest->ex_data)); | - | ||||||||||||||||||||||||||||||
| 154 | - | |||||||||||||||||||||||||||||||
| 155 | - | |||||||||||||||||||||||||||||||
| 156 | dest->prev = | - | ||||||||||||||||||||||||||||||
| 157 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 158 | ; | - | ||||||||||||||||||||||||||||||
| 159 | dest->next = | - | ||||||||||||||||||||||||||||||
| 160 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 161 | ; | - | ||||||||||||||||||||||||||||||
| 162 | - | |||||||||||||||||||||||||||||||
| 163 | dest->references = 1; | - | ||||||||||||||||||||||||||||||
| 164 | - | |||||||||||||||||||||||||||||||
| 165 | dest->lock = CRYPTO_THREAD_lock_new(); | - | ||||||||||||||||||||||||||||||
| 166 |     if (dest->lock == 
  | 0-2469 | ||||||||||||||||||||||||||||||
| 167 |                      ((void *)0)
  | 0-2469 | ||||||||||||||||||||||||||||||
| 168 | ) | - | ||||||||||||||||||||||||||||||
| 169 |         goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||||||||
| 171 |     if (!CRYPTO_new_ex_data(2, dest, &dest->ex_data)
  | 0-2469 | ||||||||||||||||||||||||||||||
| 172 |         goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 173 | - | |||||||||||||||||||||||||||||||
| 174 |     if (src->peer != 
  | 979-1490 | ||||||||||||||||||||||||||||||
| 175 |                     ((void *)0)
  | 979-1490 | ||||||||||||||||||||||||||||||
| 176 | ) { | - | ||||||||||||||||||||||||||||||
| 177 |         if (!X509_up_ref(src->peer)
  | 0-979 | ||||||||||||||||||||||||||||||
| 178 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 179 | dest->peer = src->peer; | - | ||||||||||||||||||||||||||||||
| 180 |     } executed 979 times by 1 test:  end of blockExecuted by: 
  | 979 | ||||||||||||||||||||||||||||||
| 181 | - | |||||||||||||||||||||||||||||||
| 182 |     if (src->peer_chain != 
  | 1009-1460 | ||||||||||||||||||||||||||||||
| 183 |                           ((void *)0)
  | 1009-1460 | ||||||||||||||||||||||||||||||
| 184 | ) { | - | ||||||||||||||||||||||||||||||
| 185 | dest->peer_chain = X509_chain_up_ref(src->peer_chain); | - | ||||||||||||||||||||||||||||||
| 186 |         if (dest->peer_chain == 
  | 0-1009 | ||||||||||||||||||||||||||||||
| 187 |                                ((void *)0)
  | 0-1009 | ||||||||||||||||||||||||||||||
| 188 | ) | - | ||||||||||||||||||||||||||||||
| 189 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 190 |     } executed 1009 times by 1 test:  end of blockExecuted by: 
  | 1009 | ||||||||||||||||||||||||||||||
| 191 | - | |||||||||||||||||||||||||||||||
| 192 |     if (src->psk_identity_hint
  | 0-2469 | ||||||||||||||||||||||||||||||
| 193 | dest->psk_identity_hint = CRYPTO_strdup(src->psk_identity_hint, __FILE__, 166); | - | ||||||||||||||||||||||||||||||
| 194 |         if (dest->psk_identity_hint == 
  | 0 | ||||||||||||||||||||||||||||||
| 195 |                                       ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 196 | ) { | - | ||||||||||||||||||||||||||||||
| 197 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 198 | } | - | ||||||||||||||||||||||||||||||
| 199 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 200 |     if (src->psk_identity
  | 0-2469 | ||||||||||||||||||||||||||||||
| 201 | dest->psk_identity = CRYPTO_strdup(src->psk_identity, __FILE__, 172); | - | ||||||||||||||||||||||||||||||
| 202 |         if (dest->psk_identity == 
  | 0 | ||||||||||||||||||||||||||||||
| 203 |                                  ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 204 | ) { | - | ||||||||||||||||||||||||||||||
| 205 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 206 | } | - | ||||||||||||||||||||||||||||||
| 207 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 208 | - | |||||||||||||||||||||||||||||||
| 209 | - | |||||||||||||||||||||||||||||||
| 210 |     if (src->ciphers != 
  | 983-1486 | ||||||||||||||||||||||||||||||
| 211 |                        ((void *)0)
  | 983-1486 | ||||||||||||||||||||||||||||||
| 212 | ) { | - | ||||||||||||||||||||||||||||||
| 213 | dest->ciphers = sk_SSL_CIPHER_dup(src->ciphers); | - | ||||||||||||||||||||||||||||||
| 214 |         if (dest->ciphers == 
  | 0-1486 | ||||||||||||||||||||||||||||||
| 215 |                             ((void *)0)
  | 0-1486 | ||||||||||||||||||||||||||||||
| 216 | ) | - | ||||||||||||||||||||||||||||||
| 217 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 218 |     } executed 1486 times by 1 test:  end of blockExecuted by: 
  | 1486 | ||||||||||||||||||||||||||||||
| 219 | - | |||||||||||||||||||||||||||||||
| 220 |     if (!CRYPTO_dup_ex_data(2,
  | 0-2469 | ||||||||||||||||||||||||||||||
| 221 |                             &dest->ex_data, &src->ex_data)
  | 0-2469 | ||||||||||||||||||||||||||||||
| 222 |         goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 223 | } | - | ||||||||||||||||||||||||||||||
| 224 | - | |||||||||||||||||||||||||||||||
| 225 |     if (src->ext.hostname
  | 64-2405 | ||||||||||||||||||||||||||||||
| 226 | dest->ext.hostname = CRYPTO_strdup(src->ext.hostname, __FILE__, 191); | - | ||||||||||||||||||||||||||||||
| 227 |         if (dest->ext.hostname == 
  | 0-64 | ||||||||||||||||||||||||||||||
| 228 |                                  ((void *)0)
  | 0-64 | ||||||||||||||||||||||||||||||
| 229 | ) { | - | ||||||||||||||||||||||||||||||
| 230 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 231 | } | - | ||||||||||||||||||||||||||||||
| 232 |     } executed 64 times by 1 test:  end of blockExecuted by: 
  | 64 | ||||||||||||||||||||||||||||||
| 233 | - | |||||||||||||||||||||||||||||||
| 234 |     if (src->ext.ecpointformats
  | 633-1836 | ||||||||||||||||||||||||||||||
| 235 | dest->ext.ecpointformats = | - | ||||||||||||||||||||||||||||||
| 236 | CRYPTO_memdup((src->ext.ecpointformats), src->ext.ecpointformats_len, | - | ||||||||||||||||||||||||||||||
| 237 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 238 | , | - | ||||||||||||||||||||||||||||||
| 239 | 200 | - | ||||||||||||||||||||||||||||||
| 240 | ) | - | ||||||||||||||||||||||||||||||
| 241 | ; | - | ||||||||||||||||||||||||||||||
| 242 |         if (dest->ext.ecpointformats == 
  | 0-633 | ||||||||||||||||||||||||||||||
| 243 |                                        ((void *)0)
  | 0-633 | ||||||||||||||||||||||||||||||
| 244 | ) | - | ||||||||||||||||||||||||||||||
| 245 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 246 |     } executed 633 times by 1 test:  end of blockExecuted by: 
  | 633 | ||||||||||||||||||||||||||||||
| 247 |     if (src->ext.supportedgroups
  | 981-1488 | ||||||||||||||||||||||||||||||
| 248 | dest->ext.supportedgroups = | - | ||||||||||||||||||||||||||||||
| 249 | CRYPTO_memdup((src->ext.supportedgroups), src->ext.supportedgroups_len * sizeof(*src->ext.supportedgroups), | - | ||||||||||||||||||||||||||||||
| 250 | - | |||||||||||||||||||||||||||||||
| 251 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 252 | , | - | ||||||||||||||||||||||||||||||
| 253 | - | |||||||||||||||||||||||||||||||
| 254 | 208 | - | ||||||||||||||||||||||||||||||
| 255 | ) | - | ||||||||||||||||||||||||||||||
| 256 | - | |||||||||||||||||||||||||||||||
| 257 | ; | - | ||||||||||||||||||||||||||||||
| 258 |         if (dest->ext.supportedgroups == 
  | 0-1488 | ||||||||||||||||||||||||||||||
| 259 |                                         ((void *)0)
  | 0-1488 | ||||||||||||||||||||||||||||||
| 260 | ) | - | ||||||||||||||||||||||||||||||
| 261 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 262 |     } executed 1488 times by 1 test:  end of blockExecuted by: 
  | 1488 | ||||||||||||||||||||||||||||||
| 263 | - | |||||||||||||||||||||||||||||||
| 264 | - | |||||||||||||||||||||||||||||||
| 265 |     if (ticket != 0
 
  | 0-1565 | ||||||||||||||||||||||||||||||
| 266 |                                        ((void *)0)
  | 0-904 | ||||||||||||||||||||||||||||||
| 267 | ) { | - | ||||||||||||||||||||||||||||||
| 268 | dest->ext.tick = | - | ||||||||||||||||||||||||||||||
| 269 | CRYPTO_memdup((src->ext.tick), src->ext.ticklen, __FILE__, 216); | - | ||||||||||||||||||||||||||||||
| 270 |         if (dest->ext.tick == 
  | 0 | ||||||||||||||||||||||||||||||
| 271 |                              ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 272 | ) | - | ||||||||||||||||||||||||||||||
| 273 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 274 |     } never executed:   else {end of block | 0 | ||||||||||||||||||||||||||||||
| 275 | dest->ext.tick_lifetime_hint = 0; | - | ||||||||||||||||||||||||||||||
| 276 | dest->ext.ticklen = 0; | - | ||||||||||||||||||||||||||||||
| 277 |     } executed 2469 times by 1 test:  end of blockExecuted by: 
  | 2469 | ||||||||||||||||||||||||||||||
| 278 | - | |||||||||||||||||||||||||||||||
| 279 |     if (src->ext.alpn_selected != 
  | 64-2405 | ||||||||||||||||||||||||||||||
| 280 |                                  ((void *)0)
  | 64-2405 | ||||||||||||||||||||||||||||||
| 281 | ) { | - | ||||||||||||||||||||||||||||||
| 282 | dest->ext.alpn_selected = CRYPTO_memdup((src->ext.alpn_selected), src->ext.alpn_selected_len, | - | ||||||||||||||||||||||||||||||
| 283 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 284 | , | - | ||||||||||||||||||||||||||||||
| 285 | 226 | - | ||||||||||||||||||||||||||||||
| 286 | ) | - | ||||||||||||||||||||||||||||||
| 287 | ; | - | ||||||||||||||||||||||||||||||
| 288 |         if (dest->ext.alpn_selected == 
  | 0-64 | ||||||||||||||||||||||||||||||
| 289 |                                       ((void *)0)
  | 0-64 | ||||||||||||||||||||||||||||||
| 290 | ) | - | ||||||||||||||||||||||||||||||
| 291 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 292 |     } executed 64 times by 1 test:  end of blockExecuted by: 
  | 64 | ||||||||||||||||||||||||||||||
| 293 | - | |||||||||||||||||||||||||||||||
| 294 | - | |||||||||||||||||||||||||||||||
| 295 |     if (src->srp_username
  | 4-2465 | ||||||||||||||||||||||||||||||
| 296 | dest->srp_username = CRYPTO_strdup(src->srp_username, __FILE__, 233); | - | ||||||||||||||||||||||||||||||
| 297 |         if (dest->srp_username == 
  | 0-4 | ||||||||||||||||||||||||||||||
| 298 |                                  ((void *)0)
  | 0-4 | ||||||||||||||||||||||||||||||
| 299 | ) { | - | ||||||||||||||||||||||||||||||
| 300 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 301 | } | - | ||||||||||||||||||||||||||||||
| 302 |     } executed 4 times by 1 test:  end of blockExecuted by: 
  | 4 | ||||||||||||||||||||||||||||||
| 303 | - | |||||||||||||||||||||||||||||||
| 304 | - | |||||||||||||||||||||||||||||||
| 305 |     if (src->ticket_appdata != 
  | 13-2456 | ||||||||||||||||||||||||||||||
| 306 |                               ((void *)0)
  | 13-2456 | ||||||||||||||||||||||||||||||
| 307 | ) { | - | ||||||||||||||||||||||||||||||
| 308 | dest->ticket_appdata = | - | ||||||||||||||||||||||||||||||
| 309 | CRYPTO_memdup((src->ticket_appdata), src->ticket_appdata_len, __FILE__, 242); | - | ||||||||||||||||||||||||||||||
| 310 |         if (dest->ticket_appdata == 
  | 0-13 | ||||||||||||||||||||||||||||||
| 311 |                                    ((void *)0)
  | 0-13 | ||||||||||||||||||||||||||||||
| 312 | ) | - | ||||||||||||||||||||||||||||||
| 313 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 314 |     } executed 13 times by 1 test:  end of blockExecuted by: 
  | 13 | ||||||||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||||||||
| 316 |     return executed 2469 times by 1 test:   dest;return dest;Executed by: 
 executed 2469 times by 1 test:  return dest;Executed by: 
  | 2469 | ||||||||||||||||||||||||||||||
| 317 | err: | - | ||||||||||||||||||||||||||||||
| 318 | ERR_put_error(20,(348),((1|64)),__FILE__,249); | - | ||||||||||||||||||||||||||||||
| 319 | SSL_SESSION_free(dest); | - | ||||||||||||||||||||||||||||||
| 320 |     return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 321 |           ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 322 |               ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 323 | } | - | ||||||||||||||||||||||||||||||
| 324 | - | |||||||||||||||||||||||||||||||
| 325 | const unsigned char *SSL_SESSION_get_id(const SSL_SESSION *s, unsigned int *len) | - | ||||||||||||||||||||||||||||||
| 326 | { | - | ||||||||||||||||||||||||||||||
| 327 |     if (len
  | 97-1362 | ||||||||||||||||||||||||||||||
| 328 |         * executed 1362 times by 1 test:  len = (unsigned int)s->session_id_length;*len = (unsigned int)s->session_id_length;Executed by: 
 executed 1362 times by 1 test:  *len = (unsigned int)s->session_id_length;Executed by: 
  | 1362 | ||||||||||||||||||||||||||||||
| 329 |     return executed 1459 times by 1 test:   s->session_id;return s->session_id;Executed by: 
 executed 1459 times by 1 test:  return s->session_id;Executed by: 
  | 1459 | ||||||||||||||||||||||||||||||
| 330 | } | - | ||||||||||||||||||||||||||||||
| 331 | const unsigned char *SSL_SESSION_get0_id_context(const SSL_SESSION *s, | - | ||||||||||||||||||||||||||||||
| 332 | unsigned int *len) | - | ||||||||||||||||||||||||||||||
| 333 | { | - | ||||||||||||||||||||||||||||||
| 334 |     if (len != 
  | 0 | ||||||||||||||||||||||||||||||
| 335 |               ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 336 | ) | - | ||||||||||||||||||||||||||||||
| 337 |         * never executed:  len = (unsigned int)s->sid_ctx_length;*len = (unsigned int)s->sid_ctx_length;never executed:  *len = (unsigned int)s->sid_ctx_length; | 0 | ||||||||||||||||||||||||||||||
| 338 |     return never executed:   s->sid_ctx;return s->sid_ctx;never executed:  return s->sid_ctx; | 0 | ||||||||||||||||||||||||||||||
| 339 | } | - | ||||||||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||||||||
| 341 | unsigned int SSL_SESSION_get_compress_id(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 342 | { | - | ||||||||||||||||||||||||||||||
| 343 |     return never executed:   s->compress_meth;return s->compress_meth;never executed:  return s->compress_meth; | 0 | ||||||||||||||||||||||||||||||
| 344 | } | - | ||||||||||||||||||||||||||||||
| 345 | static int def_generate_session_id(SSL *ssl, unsigned char *id, | - | ||||||||||||||||||||||||||||||
| 346 | unsigned int *id_len) | - | ||||||||||||||||||||||||||||||
| 347 | { | - | ||||||||||||||||||||||||||||||
| 348 | unsigned int retry = 0; | - | ||||||||||||||||||||||||||||||
| 349 | do | - | ||||||||||||||||||||||||||||||
| 350 |         if (RAND_bytes(id, *id_len) <= 0
  | 0-1686 | ||||||||||||||||||||||||||||||
| 351 |             return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 352 |     while (SSL_has_matching_session_id(ssl, id, *id_len)
  | 0-1686 | ||||||||||||||||||||||||||||||
| 353 |            (++
 
  | 0 | ||||||||||||||||||||||||||||||
| 354 |     if (retry < 10
  | 0-1686 | ||||||||||||||||||||||||||||||
| 355 |         return executed 1686 times by 1 test:   1;return 1;Executed by: 
 executed 1686 times by 1 test:  return 1;Executed by: 
  | 1686 | ||||||||||||||||||||||||||||||
| 356 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 357 | } | - | ||||||||||||||||||||||||||||||
| 358 | - | |||||||||||||||||||||||||||||||
| 359 | int ssl_generate_session_id(SSL *s, SSL_SESSION *ss) | - | ||||||||||||||||||||||||||||||
| 360 | { | - | ||||||||||||||||||||||||||||||
| 361 | unsigned int tmp; | - | ||||||||||||||||||||||||||||||
| 362 | GEN_SESSION_CB cb = def_generate_session_id; | - | ||||||||||||||||||||||||||||||
| 363 | - | |||||||||||||||||||||||||||||||
| 364 | switch (s->version) { | - | ||||||||||||||||||||||||||||||
| 365 |     case never executed:   0x0300:case 0x0300:never executed:  case 0x0300: | 0 | ||||||||||||||||||||||||||||||
| 366 |     case executed 282 times by 1 test:   0x0301:case 0x0301:Executed by: 
 executed 282 times by 1 test:  case 0x0301:Executed by: 
  | 282 | ||||||||||||||||||||||||||||||
| 367 |     case executed 289 times by 1 test:   0x0302:case 0x0302:Executed by: 
 executed 289 times by 1 test:  case 0x0302:Executed by: 
  | 289 | ||||||||||||||||||||||||||||||
| 368 |     case executed 1157 times by 1 test:   0x0303:case 0x0303:Executed by: 
 executed 1157 times by 1 test:  case 0x0303:Executed by: 
  | 1157 | ||||||||||||||||||||||||||||||
| 369 |     case executed 1033 times by 1 test:   0x0304:case 0x0304:Executed by: 
 executed 1033 times by 1 test:  case 0x0304:Executed by: 
  | 1033 | ||||||||||||||||||||||||||||||
| 370 |     case never executed:   0x0100:case 0x0100:never executed:  case 0x0100: | 0 | ||||||||||||||||||||||||||||||
| 371 |     case executed 42 times by 1 test:   0xFEFF:case 0xFEFF:Executed by: 
 executed 42 times by 1 test:  case 0xFEFF:Executed by: 
  | 42 | ||||||||||||||||||||||||||||||
| 372 |     case executed 128 times by 1 test:   0xFEFD:case 0xFEFD:Executed by: 
 executed 128 times by 1 test:  case 0xFEFD:Executed by: 
  | 128 | ||||||||||||||||||||||||||||||
| 373 | ss->session_id_length = 32; | - | ||||||||||||||||||||||||||||||
| 374 |         break; executed 2931 times by 1 test:  break;Executed by: 
  | 2931 | ||||||||||||||||||||||||||||||
| 375 |     default never executed:  :default:never executed:  default: | 0 | ||||||||||||||||||||||||||||||
| 376 | ossl_statem_fatal((s), (80), (547), (259), | - | ||||||||||||||||||||||||||||||
| 377 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 378 | , | - | ||||||||||||||||||||||||||||||
| 379 | 326 | - | ||||||||||||||||||||||||||||||
| 380 | ) | - | ||||||||||||||||||||||||||||||
| 381 | ; | - | ||||||||||||||||||||||||||||||
| 382 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 383 | } | - | ||||||||||||||||||||||||||||||
| 384 |     if (s->ext.ticket_expected
  | 1245-1686 | ||||||||||||||||||||||||||||||
| 385 | ss->session_id_length = 0; | - | ||||||||||||||||||||||||||||||
| 386 |         return executed 1245 times by 1 test:   1;return 1;Executed by: 
 executed 1245 times by 1 test:  return 1;Executed by: 
  | 1245 | ||||||||||||||||||||||||||||||
| 387 | } | - | ||||||||||||||||||||||||||||||
| 388 | - | |||||||||||||||||||||||||||||||
| 389 | - | |||||||||||||||||||||||||||||||
| 390 | CRYPTO_THREAD_read_lock(s->lock); | - | ||||||||||||||||||||||||||||||
| 391 | CRYPTO_THREAD_read_lock(s->session_ctx->lock); | - | ||||||||||||||||||||||||||||||
| 392 |     if (s->generate_session_id
  | 0-1686 | ||||||||||||||||||||||||||||||
| 393 |         cb = s->generate_session_id; never executed:  cb = s->generate_session_id; | 0 | ||||||||||||||||||||||||||||||
| 394 |     else if (s->session_ctx->generate_session_id
  | 0-1686 | ||||||||||||||||||||||||||||||
| 395 |         cb = s->session_ctx->generate_session_id; never executed:  cb = s->session_ctx->generate_session_id; | 0 | ||||||||||||||||||||||||||||||
| 396 | CRYPTO_THREAD_unlock(s->session_ctx->lock); | - | ||||||||||||||||||||||||||||||
| 397 | CRYPTO_THREAD_unlock(s->lock); | - | ||||||||||||||||||||||||||||||
| 398 | - | |||||||||||||||||||||||||||||||
| 399 | memset(ss->session_id, 0, ss->session_id_length); | - | ||||||||||||||||||||||||||||||
| 400 | tmp = (int)ss->session_id_length; | - | ||||||||||||||||||||||||||||||
| 401 |     if (!cb(s, ss->session_id, &tmp)
  | 0-1686 | ||||||||||||||||||||||||||||||
| 402 | - | |||||||||||||||||||||||||||||||
| 403 | ossl_statem_fatal((s), (80), (547), (301), | - | ||||||||||||||||||||||||||||||
| 404 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 405 | , | - | ||||||||||||||||||||||||||||||
| 406 | 365 | - | ||||||||||||||||||||||||||||||
| 407 | ) | - | ||||||||||||||||||||||||||||||
| 408 | ; | - | ||||||||||||||||||||||||||||||
| 409 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 410 | } | - | ||||||||||||||||||||||||||||||
| 411 | - | |||||||||||||||||||||||||||||||
| 412 | - | |||||||||||||||||||||||||||||||
| 413 | - | |||||||||||||||||||||||||||||||
| 414 | - | |||||||||||||||||||||||||||||||
| 415 |     if (tmp == 0
 
  | 0-1686 | ||||||||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||||||||
| 417 | ossl_statem_fatal((s), (80), (547), (303), | - | ||||||||||||||||||||||||||||||
| 418 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 419 | , | - | ||||||||||||||||||||||||||||||
| 420 | 375 | - | ||||||||||||||||||||||||||||||
| 421 | ) | - | ||||||||||||||||||||||||||||||
| 422 | ; | - | ||||||||||||||||||||||||||||||
| 423 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 424 | } | - | ||||||||||||||||||||||||||||||
| 425 | ss->session_id_length = tmp; | - | ||||||||||||||||||||||||||||||
| 426 | - | |||||||||||||||||||||||||||||||
| 427 |     if (SSL_has_matching_session_id(s, ss->session_id,
  | 0-1686 | ||||||||||||||||||||||||||||||
| 428 |                                     (unsigned int)ss->session_id_length)
  | 0-1686 | ||||||||||||||||||||||||||||||
| 429 | ossl_statem_fatal((s), (80), (547), (302), | - | ||||||||||||||||||||||||||||||
| 430 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 431 | , | - | ||||||||||||||||||||||||||||||
| 432 | 383 | - | ||||||||||||||||||||||||||||||
| 433 | ) | - | ||||||||||||||||||||||||||||||
| 434 | ; | - | ||||||||||||||||||||||||||||||
| 435 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 436 | } | - | ||||||||||||||||||||||||||||||
| 437 | - | |||||||||||||||||||||||||||||||
| 438 |     return executed 1686 times by 1 test:   1;return 1;Executed by: 
 executed 1686 times by 1 test:  return 1;Executed by: 
  | 1686 | ||||||||||||||||||||||||||||||
| 439 | } | - | ||||||||||||||||||||||||||||||
| 440 | - | |||||||||||||||||||||||||||||||
| 441 | int ssl_get_new_session(SSL *s, int session) | - | ||||||||||||||||||||||||||||||
| 442 | { | - | ||||||||||||||||||||||||||||||
| 443 | - | |||||||||||||||||||||||||||||||
| 444 | - | |||||||||||||||||||||||||||||||
| 445 | SSL_SESSION *ss = | - | ||||||||||||||||||||||||||||||
| 446 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 447 | ; | - | ||||||||||||||||||||||||||||||
| 448 | - | |||||||||||||||||||||||||||||||
| 449 |     if ((
 
  | 0-6965 | ||||||||||||||||||||||||||||||
| 450 |                                    ((void *)0)
  | 0-6965 | ||||||||||||||||||||||||||||||
| 451 | ) { | - | ||||||||||||||||||||||||||||||
| 452 | ossl_statem_fatal((s), (80), (181), ((1|64)), | - | ||||||||||||||||||||||||||||||
| 453 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 454 | , | - | ||||||||||||||||||||||||||||||
| 455 | 398 | - | ||||||||||||||||||||||||||||||
| 456 | ) | - | ||||||||||||||||||||||||||||||
| 457 | ; | - | ||||||||||||||||||||||||||||||
| 458 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 459 | } | - | ||||||||||||||||||||||||||||||
| 460 | - | |||||||||||||||||||||||||||||||
| 461 | - | |||||||||||||||||||||||||||||||
| 462 |     if (s->session_ctx->session_timeout == 0
  | 0-6965 | ||||||||||||||||||||||||||||||
| 463 |         ss->timeout = SSL_get_default_timeout(s); never executed:  ss->timeout = SSL_get_default_timeout(s); | 0 | ||||||||||||||||||||||||||||||
| 464 | else | - | ||||||||||||||||||||||||||||||
| 465 |         ss->timeout = s->session_ctx->session_timeout; executed 6965 times by 1 test:  ss->timeout = s->session_ctx->session_timeout;Executed by: 
  | 6965 | ||||||||||||||||||||||||||||||
| 466 | - | |||||||||||||||||||||||||||||||
| 467 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||
| 468 | s->session = | - | ||||||||||||||||||||||||||||||
| 469 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 470 | ; | - | ||||||||||||||||||||||||||||||
| 471 | - | |||||||||||||||||||||||||||||||
| 472 |     if (session
  | 2879-4086 | ||||||||||||||||||||||||||||||
| 473 |         if ((!(s->method->ssl3_enc->enc_flags & 0x8)
 
 
 
 
  | 0-2709 | ||||||||||||||||||||||||||||||
| 474 | - | |||||||||||||||||||||||||||||||
| 475 | - | |||||||||||||||||||||||||||||||
| 476 | - | |||||||||||||||||||||||||||||||
| 477 | - | |||||||||||||||||||||||||||||||
| 478 | ss->session_id_length = 0; | - | ||||||||||||||||||||||||||||||
| 479 |         } executed 982 times by 1 test:   else if (!ssl_generate_session_id(s, ss)end of blockExecuted by: 
 
  | 0-1897 | ||||||||||||||||||||||||||||||
| 480 | - | |||||||||||||||||||||||||||||||
| 481 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||||||||
| 482 |             return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 483 | } | - | ||||||||||||||||||||||||||||||
| 484 | - | |||||||||||||||||||||||||||||||
| 485 |     } executed 2879 times by 1 test:   else {end of blockExecuted by: 
  | 2879 | ||||||||||||||||||||||||||||||
| 486 | ss->session_id_length = 0; | - | ||||||||||||||||||||||||||||||
| 487 |     } executed 4086 times by 1 test:  end of blockExecuted by: 
  | 4086 | ||||||||||||||||||||||||||||||
| 488 | - | |||||||||||||||||||||||||||||||
| 489 |     if (s->sid_ctx_length > sizeof(ss->sid_ctx)
  | 0-6965 | ||||||||||||||||||||||||||||||
| 490 | ossl_statem_fatal((s), (80), (181), ((4|64)), | - | ||||||||||||||||||||||||||||||
| 491 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 492 | , | - | ||||||||||||||||||||||||||||||
| 493 | 430 | - | ||||||||||||||||||||||||||||||
| 494 | ) | - | ||||||||||||||||||||||||||||||
| 495 | ; | - | ||||||||||||||||||||||||||||||
| 496 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||||||||
| 497 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 498 | } | - | ||||||||||||||||||||||||||||||
| 499 | memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length); | - | ||||||||||||||||||||||||||||||
| 500 | ss->sid_ctx_length = s->sid_ctx_length; | - | ||||||||||||||||||||||||||||||
| 501 | s->session = ss; | - | ||||||||||||||||||||||||||||||
| 502 | ss->ssl_version = s->version; | - | ||||||||||||||||||||||||||||||
| 503 | ss->verify_result = 0; | - | ||||||||||||||||||||||||||||||
| 504 | - | |||||||||||||||||||||||||||||||
| 505 | - | |||||||||||||||||||||||||||||||
| 506 |     if (s->s3->flags & 0x0200
  | 1303-5662 | ||||||||||||||||||||||||||||||
| 507 |         ss->flags |= 0x1; executed 1303 times by 1 test:  ss->flags |= 0x1;Executed by: 
  | 1303 | ||||||||||||||||||||||||||||||
| 508 | - | |||||||||||||||||||||||||||||||
| 509 |     return executed 6965 times by 1 test:   1;return 1;Executed by: 
 executed 6965 times by 1 test:  return 1;Executed by: 
  | 6965 | ||||||||||||||||||||||||||||||
| 510 | } | - | ||||||||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||||||||
| 512 | SSL_SESSION *lookup_sess_in_cache(SSL *s, const unsigned char *sess_id, | - | ||||||||||||||||||||||||||||||
| 513 | size_t sess_id_len) | - | ||||||||||||||||||||||||||||||
| 514 | { | - | ||||||||||||||||||||||||||||||
| 515 | SSL_SESSION *ret = | - | ||||||||||||||||||||||||||||||
| 516 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 517 | ; | - | ||||||||||||||||||||||||||||||
| 518 | - | |||||||||||||||||||||||||||||||
| 519 |     if ((
 
  | 19-262 | ||||||||||||||||||||||||||||||
| 520 |          & 0x0100) == 0
  | 19-262 | ||||||||||||||||||||||||||||||
| 521 | SSL_SESSION data; | - | ||||||||||||||||||||||||||||||
| 522 | - | |||||||||||||||||||||||||||||||
| 523 | data.ssl_version = s->version; | - | ||||||||||||||||||||||||||||||
| 524 |         if (!((sess_id_len <= 32) != 0)
  | 0-262 | ||||||||||||||||||||||||||||||
| 525 |             return never executed:   return ((void *)0) ;never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 526 |                   ((void *)0) never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 527 |                       ; never executed:  return ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 528 | - | |||||||||||||||||||||||||||||||
| 529 | memcpy(data.session_id, sess_id, sess_id_len); | - | ||||||||||||||||||||||||||||||
| 530 | data.session_id_length = sess_id_len; | - | ||||||||||||||||||||||||||||||
| 531 | - | |||||||||||||||||||||||||||||||
| 532 | CRYPTO_THREAD_read_lock(s->session_ctx->lock); | - | ||||||||||||||||||||||||||||||
| 533 | ret = lh_SSL_SESSION_retrieve(s->session_ctx->sessions, &data); | - | ||||||||||||||||||||||||||||||
| 534 |         if (ret != 
  | 51-211 | ||||||||||||||||||||||||||||||
| 535 |                   ((void *)0)
  | 51-211 | ||||||||||||||||||||||||||||||
| 536 | ) { | - | ||||||||||||||||||||||||||||||
| 537 | - | |||||||||||||||||||||||||||||||
| 538 | SSL_SESSION_up_ref(ret); | - | ||||||||||||||||||||||||||||||
| 539 |         } executed 51 times by 1 test:  end of blockExecuted by: 
  | 51 | ||||||||||||||||||||||||||||||
| 540 | CRYPTO_THREAD_unlock(s->session_ctx->lock); | - | ||||||||||||||||||||||||||||||
| 541 |         if (ret == 
  | 51-211 | ||||||||||||||||||||||||||||||
| 542 |                   ((void *)0)
  | 51-211 | ||||||||||||||||||||||||||||||
| 543 | ) | - | ||||||||||||||||||||||||||||||
| 544 | - | |||||||||||||||||||||||||||||||
| 545 |            __atomic_fetch_add (( executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 546 |            (&s->session_ctx->stats.sess_miss) executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 547 |            ), ( executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 548 |            1 executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 549 |            ), ( executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 550 |            memory_order_relaxed executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 551 |            )) executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 552 |                                                          ; executed 211 times by 1 test:  __atomic_fetch_add (( (&s->session_ctx->stats.sess_miss) ), ( 1 ), ( memory_order_relaxed )) ;Executed by: 
  | 211 | ||||||||||||||||||||||||||||||
| 553 |     } executed 262 times by 1 test:  end of blockExecuted by: 
  | 262 | ||||||||||||||||||||||||||||||
| 554 | - | |||||||||||||||||||||||||||||||
| 555 |     if (ret == 
  | 51-230 | ||||||||||||||||||||||||||||||
| 556 |               ((void *)0)
  | 51-230 | ||||||||||||||||||||||||||||||
| 557 |                    && s->session_ctx->get_session_cb != 
  | 21-209 | ||||||||||||||||||||||||||||||
| 558 |                                                         ((void *)0)
  | 21-209 | ||||||||||||||||||||||||||||||
| 559 | ) { | - | ||||||||||||||||||||||||||||||
| 560 | int copy = 1; | - | ||||||||||||||||||||||||||||||
| 561 | - | |||||||||||||||||||||||||||||||
| 562 | ret = s->session_ctx->get_session_cb(s, sess_id, sess_id_len, ©); | - | ||||||||||||||||||||||||||||||
| 563 | - | |||||||||||||||||||||||||||||||
| 564 |         if (ret != 
  | 3-18 | ||||||||||||||||||||||||||||||
| 565 |                   ((void *)0)
  | 3-18 | ||||||||||||||||||||||||||||||
| 566 | ) { | - | ||||||||||||||||||||||||||||||
| 567 | - | |||||||||||||||||||||||||||||||
| 568 | __atomic_fetch_add (( | - | ||||||||||||||||||||||||||||||
| 569 | (&s->session_ctx->stats.sess_cb_hit) | - | ||||||||||||||||||||||||||||||
| 570 | ), ( | - | ||||||||||||||||||||||||||||||
| 571 | 1 | - | ||||||||||||||||||||||||||||||
| 572 | ), ( | - | ||||||||||||||||||||||||||||||
| 573 | memory_order_relaxed | - | ||||||||||||||||||||||||||||||
| 574 | )) | - | ||||||||||||||||||||||||||||||
| 575 | ; | - | ||||||||||||||||||||||||||||||
| 576 |             if (copy
  | 1-2 | ||||||||||||||||||||||||||||||
| 577 |                 SSL_SESSION_up_ref(ret); executed 2 times by 1 test:  SSL_SESSION_up_ref(ret);Executed by: 
  | 2 | ||||||||||||||||||||||||||||||
| 578 | - | |||||||||||||||||||||||||||||||
| 579 | - | |||||||||||||||||||||||||||||||
| 580 | - | |||||||||||||||||||||||||||||||
| 581 | - | |||||||||||||||||||||||||||||||
| 582 | - | |||||||||||||||||||||||||||||||
| 583 |             if ((
 
  | 1-2 | ||||||||||||||||||||||||||||||
| 584 |                  0x0200) == 0
  | 1-2 | ||||||||||||||||||||||||||||||
| 585 | - | |||||||||||||||||||||||||||||||
| 586 | - | |||||||||||||||||||||||||||||||
| 587 | - | |||||||||||||||||||||||||||||||
| 588 | - | |||||||||||||||||||||||||||||||
| 589 | - | |||||||||||||||||||||||||||||||
| 590 | (void)SSL_CTX_add_session(s->session_ctx, ret); | - | ||||||||||||||||||||||||||||||
| 591 |             } executed 1 time by 1 test:  end of blockExecuted by: 
  | 1 | ||||||||||||||||||||||||||||||
| 592 |         } executed 3 times by 1 test:  end of blockExecuted by: 
  | 3 | ||||||||||||||||||||||||||||||
| 593 |     } executed 21 times by 1 test:  end of blockExecuted by: 
  | 21 | ||||||||||||||||||||||||||||||
| 594 | - | |||||||||||||||||||||||||||||||
| 595 |     return executed 281 times by 1 test:   ret;return ret;Executed by: 
 executed 281 times by 1 test:  return ret;Executed by: 
  | 281 | ||||||||||||||||||||||||||||||
| 596 | } | - | ||||||||||||||||||||||||||||||
| 597 | int ssl_get_prev_session(SSL *s, CLIENTHELLO_MSG *hello) | - | ||||||||||||||||||||||||||||||
| 598 | { | - | ||||||||||||||||||||||||||||||
| 599 | - | |||||||||||||||||||||||||||||||
| 600 | - | |||||||||||||||||||||||||||||||
| 601 | SSL_SESSION *ret = | - | ||||||||||||||||||||||||||||||
| 602 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 603 | ; | - | ||||||||||||||||||||||||||||||
| 604 | int fatal = 0; | - | ||||||||||||||||||||||||||||||
| 605 | int try_session_cache = 0; | - | ||||||||||||||||||||||||||||||
| 606 | SSL_TICKET_STATUS r; | - | ||||||||||||||||||||||||||||||
| 607 | - | |||||||||||||||||||||||||||||||
| 608 |     if ((!(s->method->ssl3_enc->enc_flags & 0x8)
 
 
 
 
  | 0-2874 | ||||||||||||||||||||||||||||||
| 609 | - | |||||||||||||||||||||||||||||||
| 610 | - | |||||||||||||||||||||||||||||||
| 611 | - | |||||||||||||||||||||||||||||||
| 612 | - | |||||||||||||||||||||||||||||||
| 613 | s->ext.ticket_expected = 1; | - | ||||||||||||||||||||||||||||||
| 614 |         if (!tls_parse_extension(s, TLSEXT_IDX_psk_kex_modes,
  | 4-1129 | ||||||||||||||||||||||||||||||
| 615 |                                  0x0080, hello->pre_proc_exts,
  | 4-1129 | ||||||||||||||||||||||||||||||
| 616 |                                  
  | 4-1129 | ||||||||||||||||||||||||||||||
| 617 |                                 ((void *)0)
  | 4-1129 | ||||||||||||||||||||||||||||||
| 618 |                                     , 0)
  | 4-1129 | ||||||||||||||||||||||||||||||
| 619 |                 || !tls_parse_extension(s, TLSEXT_IDX_psk, 0x0080,
  | 13-1116 | ||||||||||||||||||||||||||||||
| 620 |                                         hello->pre_proc_exts, 
  | 13-1116 | ||||||||||||||||||||||||||||||
| 621 |                                                              ((void *)0)
  | 13-1116 | ||||||||||||||||||||||||||||||
| 622 |                                                                  , 0)
  | 13-1116 | ||||||||||||||||||||||||||||||
| 623 |             return executed 17 times by 1 test:   -1;return -1;Executed by: 
 executed 17 times by 1 test:  return -1;Executed by: 
  | 17 | ||||||||||||||||||||||||||||||
| 624 | - | |||||||||||||||||||||||||||||||
| 625 | ret = s->session; | - | ||||||||||||||||||||||||||||||
| 626 |     } executed 1116 times by 1 test:   else {end of blockExecuted by: 
  | 1116 | ||||||||||||||||||||||||||||||
| 627 | - | |||||||||||||||||||||||||||||||
| 628 | r = tls_get_ticket_from_client(s, hello, &ret); | - | ||||||||||||||||||||||||||||||
| 629 | switch (r) { | - | ||||||||||||||||||||||||||||||
| 630 |         case never executed:   0:case 0:never executed:  case 0: | 0 | ||||||||||||||||||||||||||||||
| 631 |         case never executed:   1:case 1:never executed:  case 1: | 0 | ||||||||||||||||||||||||||||||
| 632 | fatal = 1; | - | ||||||||||||||||||||||||||||||
| 633 | ossl_statem_fatal((s), (80), (217), ((4|64)), | - | ||||||||||||||||||||||||||||||
| 634 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 635 | , | - | ||||||||||||||||||||||||||||||
| 636 | 559 | - | ||||||||||||||||||||||||||||||
| 637 | ) | - | ||||||||||||||||||||||||||||||
| 638 | ; | - | ||||||||||||||||||||||||||||||
| 639 |             goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 640 |         case executed 599 times by 1 test:   2:case 2:Executed by: 
 executed 599 times by 1 test:  case 2:Executed by: 
  | 599 | ||||||||||||||||||||||||||||||
| 641 |         case executed 1138 times by 1 test:   3:case 3:Executed by: 
 executed 1138 times by 1 test:  case 3:Executed by: 
  | 1138 | ||||||||||||||||||||||||||||||
| 642 |             if (hello->session_id_len > 0
  | 227-1510 | ||||||||||||||||||||||||||||||
| 643 | try_session_cache = 1; | - | ||||||||||||||||||||||||||||||
| 644 | ret = lookup_sess_in_cache(s, hello->session_id, | - | ||||||||||||||||||||||||||||||
| 645 | hello->session_id_len); | - | ||||||||||||||||||||||||||||||
| 646 |             } executed 227 times by 1 test:  end of blockExecuted by: 
  | 227 | ||||||||||||||||||||||||||||||
| 647 |             break; executed 1737 times by 1 test:  break;Executed by: 
  | 1737 | ||||||||||||||||||||||||||||||
| 648 |         case executed 86 times by 1 test:   4:case 4:Executed by: 
 executed 86 times by 1 test:  case 4:Executed by: 
  | 86 | ||||||||||||||||||||||||||||||
| 649 |         case executed 97 times by 1 test:   5:case 5:Executed by: 
 executed 97 times by 1 test:  case 5:Executed by: 
  | 97 | ||||||||||||||||||||||||||||||
| 650 |         case executed 2 times by 1 test:   6:case 6:Executed by: 
 executed 2 times by 1 test:  case 6:Executed by: 
  | 2 | ||||||||||||||||||||||||||||||
| 651 |             break; executed 185 times by 1 test:  break;Executed by: 
  | 185 | ||||||||||||||||||||||||||||||
| 652 | } | - | ||||||||||||||||||||||||||||||
| 653 |     } executed 1922 times by 1 test:  end of blockExecuted by: 
  | 1922 | ||||||||||||||||||||||||||||||
| 654 | - | |||||||||||||||||||||||||||||||
| 655 |     if (ret == 
  | 247-2791 | ||||||||||||||||||||||||||||||
| 656 |               ((void *)0)
  | 247-2791 | ||||||||||||||||||||||||||||||
| 657 | ) | - | ||||||||||||||||||||||||||||||
| 658 |         goto executed 2791 times by 1 test:   err;goto err;Executed by: 
 executed 2791 times by 1 test:  goto err;Executed by: 
  | 2791 | ||||||||||||||||||||||||||||||
| 659 | - | |||||||||||||||||||||||||||||||
| 660 | - | |||||||||||||||||||||||||||||||
| 661 | - | |||||||||||||||||||||||||||||||
| 662 | - | |||||||||||||||||||||||||||||||
| 663 |     if (ret->ssl_version != s->version
  | 17-230 | ||||||||||||||||||||||||||||||
| 664 |         goto executed 17 times by 1 test:   err;goto err;Executed by: 
 executed 17 times by 1 test:  goto err;Executed by: 
  | 17 | ||||||||||||||||||||||||||||||
| 665 | - | |||||||||||||||||||||||||||||||
| 666 |     if (ret->sid_ctx_length != s->sid_ctx_length
  | 1-229 | ||||||||||||||||||||||||||||||
| 667 |         || memcmp(ret->sid_ctx, s->sid_ctx, ret->sid_ctx_length)
  | 0-229 | ||||||||||||||||||||||||||||||
| 668 | - | |||||||||||||||||||||||||||||||
| 669 | - | |||||||||||||||||||||||||||||||
| 670 | - | |||||||||||||||||||||||||||||||
| 671 | - | |||||||||||||||||||||||||||||||
| 672 |         goto executed 1 time by 1 test:   err;goto err;Executed by: 
 executed 1 time by 1 test:  goto err;Executed by: 
  | 1 | ||||||||||||||||||||||||||||||
| 673 | } | - | ||||||||||||||||||||||||||||||
| 674 | - | |||||||||||||||||||||||||||||||
| 675 |     if ((
 
 
  | 0-229 | ||||||||||||||||||||||||||||||
| 676 | ossl_statem_fatal((s), (80), (217), (277), | - | ||||||||||||||||||||||||||||||
| 677 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 678 | , | - | ||||||||||||||||||||||||||||||
| 679 | 606 | - | ||||||||||||||||||||||||||||||
| 680 | ) | - | ||||||||||||||||||||||||||||||
| 681 | ; | - | ||||||||||||||||||||||||||||||
| 682 | fatal = 1; | - | ||||||||||||||||||||||||||||||
| 683 |         goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||||||||
| 684 | } | - | ||||||||||||||||||||||||||||||
| 685 | - | |||||||||||||||||||||||||||||||
| 686 |     if (ret->timeout < (long)(time(
  | 1-228 | ||||||||||||||||||||||||||||||
| 687 |                                   ((void *)0)
  | 1-228 | ||||||||||||||||||||||||||||||
| 688 |                                       ) - ret->time)
  | 1-228 | ||||||||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||||||||
| 690 | __atomic_fetch_add (( | - | ||||||||||||||||||||||||||||||
| 691 | (&s->session_ctx->stats.sess_timeout) | - | ||||||||||||||||||||||||||||||
| 692 | ), ( | - | ||||||||||||||||||||||||||||||
| 693 | 1 | - | ||||||||||||||||||||||||||||||
| 694 | ), ( | - | ||||||||||||||||||||||||||||||
| 695 | memory_order_relaxed | - | ||||||||||||||||||||||||||||||
| 696 | )) | - | ||||||||||||||||||||||||||||||
| 697 | ; | - | ||||||||||||||||||||||||||||||
| 698 |         if (try_session_cache
  | 0-1 | ||||||||||||||||||||||||||||||
| 699 | - | |||||||||||||||||||||||||||||||
| 700 | SSL_CTX_remove_session(s->session_ctx, ret); | - | ||||||||||||||||||||||||||||||
| 701 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 702 |         goto executed 1 time by 1 test:   err;goto err;Executed by: 
 executed 1 time by 1 test:  goto err;Executed by: 
  | 1 | ||||||||||||||||||||||||||||||
| 703 | } | - | ||||||||||||||||||||||||||||||
| 704 | - | |||||||||||||||||||||||||||||||
| 705 | - | |||||||||||||||||||||||||||||||
| 706 |     if (ret->flags & 0x1
  | 89-139 | ||||||||||||||||||||||||||||||
| 707 | - | |||||||||||||||||||||||||||||||
| 708 |         if (!(s->s3->flags & 0x0200)
  | 2-87 | ||||||||||||||||||||||||||||||
| 709 | ossl_statem_fatal((s), (47), (217), (104), | - | ||||||||||||||||||||||||||||||
| 710 | __FILE__ | - | ||||||||||||||||||||||||||||||
| 711 | , | - | ||||||||||||||||||||||||||||||
| 712 | 625 | - | ||||||||||||||||||||||||||||||
| 713 | ) | - | ||||||||||||||||||||||||||||||
| 714 | ; | - | ||||||||||||||||||||||||||||||
| 715 | fatal = 1; | - | ||||||||||||||||||||||||||||||
| 716 |             goto executed 2 times by 1 test:   err;goto err;Executed by: 
 executed 2 times by 1 test:  goto err;Executed by: 
  | 2 | ||||||||||||||||||||||||||||||
| 717 | } | - | ||||||||||||||||||||||||||||||
| 718 |     } executed 87 times by 1 test:   else if (s->s3->flags & 0x0200end of blockExecuted by: 
 
  | 3-136 | ||||||||||||||||||||||||||||||
| 719 | - | |||||||||||||||||||||||||||||||
| 720 |         goto executed 3 times by 1 test:   err;goto err;Executed by: 
 executed 3 times by 1 test:  goto err;Executed by: 
  | 3 | ||||||||||||||||||||||||||||||
| 721 | } | - | ||||||||||||||||||||||||||||||
| 722 | - | |||||||||||||||||||||||||||||||
| 723 |     if (!(!(s->method->ssl3_enc->enc_flags & 0x8)
 
 
 
 
  | 0-207 | ||||||||||||||||||||||||||||||
| 724 | - | |||||||||||||||||||||||||||||||
| 725 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||
| 726 | s->session = ret; | - | ||||||||||||||||||||||||||||||
| 727 |     } executed 89 times by 1 test:  end of blockExecuted by: 
  | 89 | ||||||||||||||||||||||||||||||
| 728 | - | |||||||||||||||||||||||||||||||
| 729 | - | |||||||||||||||||||||||||||||||
| 730 | __atomic_fetch_add (( | - | ||||||||||||||||||||||||||||||
| 731 | (&s->session_ctx->stats.sess_hit) | - | ||||||||||||||||||||||||||||||
| 732 | ), ( | - | ||||||||||||||||||||||||||||||
| 733 | 1 | - | ||||||||||||||||||||||||||||||
| 734 | ), ( | - | ||||||||||||||||||||||||||||||
| 735 | memory_order_relaxed | - | ||||||||||||||||||||||||||||||
| 736 | )) | - | ||||||||||||||||||||||||||||||
| 737 | ; | - | ||||||||||||||||||||||||||||||
| 738 | s->verify_result = s->session->verify_result; | - | ||||||||||||||||||||||||||||||
| 739 |     return executed 223 times by 1 test:   1;return 1;Executed by: 
 executed 223 times by 1 test:  return 1;Executed by: 
  | 223 | ||||||||||||||||||||||||||||||
| 740 | - | |||||||||||||||||||||||||||||||
| 741 | err: | - | ||||||||||||||||||||||||||||||
| 742 |     if (ret != 
  | 24-2791 | ||||||||||||||||||||||||||||||
| 743 |               ((void *)0)
  | 24-2791 | ||||||||||||||||||||||||||||||
| 744 | ) { | - | ||||||||||||||||||||||||||||||
| 745 | SSL_SESSION_free(ret); | - | ||||||||||||||||||||||||||||||
| 746 | - | |||||||||||||||||||||||||||||||
| 747 |         if ((!(s->method->ssl3_enc->enc_flags & 0x8)
 
 
 
 
  | 0-21 | ||||||||||||||||||||||||||||||
| 748 |             s->session =  never executed:  s->session = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 749 |                         ((void *)0) never executed:  s->session = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 750 |                             ; never executed:  s->session = ((void *)0) ; | 0 | ||||||||||||||||||||||||||||||
| 751 | - | |||||||||||||||||||||||||||||||
| 752 |         if (!try_session_cache
  | 0-24 | ||||||||||||||||||||||||||||||
| 753 | - | |||||||||||||||||||||||||||||||
| 754 | - | |||||||||||||||||||||||||||||||
| 755 | - | |||||||||||||||||||||||||||||||
| 756 | - | |||||||||||||||||||||||||||||||
| 757 | s->ext.ticket_expected = 1; | - | ||||||||||||||||||||||||||||||
| 758 |         } executed 24 times by 1 test:  end of blockExecuted by: 
  | 24 | ||||||||||||||||||||||||||||||
| 759 |     } executed 24 times by 1 test:  end of blockExecuted by: 
  | 24 | ||||||||||||||||||||||||||||||
| 760 |     if (fatal
  | 2-2813 | ||||||||||||||||||||||||||||||
| 761 |         return executed 2 times by 1 test:   -1;return -1;Executed by: 
 executed 2 times by 1 test:  return -1;Executed by: 
  | 2 | ||||||||||||||||||||||||||||||
| 762 | - | |||||||||||||||||||||||||||||||
| 763 |     return executed 2813 times by 1 test:   0;return 0;Executed by: 
 executed 2813 times by 1 test:  return 0;Executed by: 
  | 2813 | ||||||||||||||||||||||||||||||
| 764 | } | - | ||||||||||||||||||||||||||||||
| 765 | - | |||||||||||||||||||||||||||||||
| 766 | int SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c) | - | ||||||||||||||||||||||||||||||
| 767 | { | - | ||||||||||||||||||||||||||||||
| 768 | int ret = 0; | - | ||||||||||||||||||||||||||||||
| 769 | SSL_SESSION *s; | - | ||||||||||||||||||||||||||||||
| 770 | - | |||||||||||||||||||||||||||||||
| 771 | - | |||||||||||||||||||||||||||||||
| 772 | - | |||||||||||||||||||||||||||||||
| 773 | - | |||||||||||||||||||||||||||||||
| 774 | - | |||||||||||||||||||||||||||||||
| 775 | - | |||||||||||||||||||||||||||||||
| 776 | SSL_SESSION_up_ref(c); | - | ||||||||||||||||||||||||||||||
| 777 | - | |||||||||||||||||||||||||||||||
| 778 | - | |||||||||||||||||||||||||||||||
| 779 | - | |||||||||||||||||||||||||||||||
| 780 | - | |||||||||||||||||||||||||||||||
| 781 | CRYPTO_THREAD_write_lock(ctx->lock); | - | ||||||||||||||||||||||||||||||
| 782 | s = lh_SSL_SESSION_insert(ctx->sessions, c); | - | ||||||||||||||||||||||||||||||
| 783 | - | |||||||||||||||||||||||||||||||
| 784 | - | |||||||||||||||||||||||||||||||
| 785 | - | |||||||||||||||||||||||||||||||
| 786 | - | |||||||||||||||||||||||||||||||
| 787 | - | |||||||||||||||||||||||||||||||
| 788 | - | |||||||||||||||||||||||||||||||
| 789 |     if (s != 
  | 7-341 | ||||||||||||||||||||||||||||||
| 790 |             ((void *)0)
  | 7-341 | ||||||||||||||||||||||||||||||
| 791 |                  && s != c
  | 0-7 | ||||||||||||||||||||||||||||||
| 792 | - | |||||||||||||||||||||||||||||||
| 793 | SSL_SESSION_list_remove(ctx, s); | - | ||||||||||||||||||||||||||||||
| 794 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||||||||
| 795 | - | |||||||||||||||||||||||||||||||
| 796 | - | |||||||||||||||||||||||||||||||
| 797 | - | |||||||||||||||||||||||||||||||
| 798 | - | |||||||||||||||||||||||||||||||
| 799 | - | |||||||||||||||||||||||||||||||
| 800 | - | |||||||||||||||||||||||||||||||
| 801 | s = | - | ||||||||||||||||||||||||||||||
| 802 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 803 | ; | - | ||||||||||||||||||||||||||||||
| 804 |     } never executed:   else if (s == end of block
  | 0-341 | ||||||||||||||||||||||||||||||
| 805 |                    ((void *)0)
  | 7-341 | ||||||||||||||||||||||||||||||
| 806 | && | - | ||||||||||||||||||||||||||||||
| 807 |                lh_SSL_SESSION_retrieve(ctx->sessions, c) == 
  | 0-341 | ||||||||||||||||||||||||||||||
| 808 |                                                            ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 809 | ) { | - | ||||||||||||||||||||||||||||||
| 810 | - | |||||||||||||||||||||||||||||||
| 811 | - | |||||||||||||||||||||||||||||||
| 812 | - | |||||||||||||||||||||||||||||||
| 813 | - | |||||||||||||||||||||||||||||||
| 814 | - | |||||||||||||||||||||||||||||||
| 815 | - | |||||||||||||||||||||||||||||||
| 816 | s = c; | - | ||||||||||||||||||||||||||||||
| 817 |     } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 818 | - | |||||||||||||||||||||||||||||||
| 819 | - | |||||||||||||||||||||||||||||||
| 820 |     if (s == 
  | 7-341 | ||||||||||||||||||||||||||||||
| 821 |             ((void *)0)
  | 7-341 | ||||||||||||||||||||||||||||||
| 822 | ) | - | ||||||||||||||||||||||||||||||
| 823 |         SSL_SESSION_list_add(ctx, c); executed 341 times by 1 test:  SSL_SESSION_list_add(ctx, c);Executed by: 
  | 341 | ||||||||||||||||||||||||||||||
| 824 | - | |||||||||||||||||||||||||||||||
| 825 |     if (s != 
  | 7-341 | ||||||||||||||||||||||||||||||
| 826 |             ((void *)0)
  | 7-341 | ||||||||||||||||||||||||||||||
| 827 | ) { | - | ||||||||||||||||||||||||||||||
| 828 | - | |||||||||||||||||||||||||||||||
| 829 | - | |||||||||||||||||||||||||||||||
| 830 | - | |||||||||||||||||||||||||||||||
| 831 | - | |||||||||||||||||||||||||||||||
| 832 | - | |||||||||||||||||||||||||||||||
| 833 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||||||||
| 834 | ret = 0; | - | ||||||||||||||||||||||||||||||
| 835 |     } executed 7 times by 1 test:   else {end of blockExecuted by: 
  | 7 | ||||||||||||||||||||||||||||||
| 836 | - | |||||||||||||||||||||||||||||||
| 837 | - | |||||||||||||||||||||||||||||||
| 838 | - | |||||||||||||||||||||||||||||||
| 839 | - | |||||||||||||||||||||||||||||||
| 840 | ret = 1; | - | ||||||||||||||||||||||||||||||
| 841 | - | |||||||||||||||||||||||||||||||
| 842 |         if (SSL_CTX_ctrl(ctx,43,0,
  | 0-341 | ||||||||||||||||||||||||||||||
| 843 |            ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 844 |            ) > 0
  | 0-341 | ||||||||||||||||||||||||||||||
| 845 |             while (SSL_CTX_ctrl(ctx,20,0,
  | 0-341 | ||||||||||||||||||||||||||||||
| 846 |                   ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 847 |                   ) > SSL_CTX_ctrl(ctx,43,0,
  | 0-341 | ||||||||||||||||||||||||||||||
| 848 |                                              ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 849 |                                              )
  | 0-341 | ||||||||||||||||||||||||||||||
| 850 |                 if (!remove_session_lock(ctx, ctx->session_cache_tail, 0)
  | 0 | ||||||||||||||||||||||||||||||
| 851 |                     break; never executed:  break; | 0 | ||||||||||||||||||||||||||||||
| 852 | else | - | ||||||||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||||||||
| 854 |                    __atomic_fetch_add (( never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 855 |                    (&ctx->stats.sess_cache_full) never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 856 |                    ), ( never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 857 |                    1 never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 858 |                    ), ( never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 859 |                    memory_order_relaxed never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 860 |                    )) never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 861 |                                                             ; never executed:  __atomic_fetch_add (( (&ctx->stats.sess_cache_full) ), ( 1 ), ( memory_order_relaxed )) ; | 0 | ||||||||||||||||||||||||||||||
| 862 | } | - | ||||||||||||||||||||||||||||||
| 863 |         } executed 341 times by 1 test:  end of blockExecuted by: 
  | 341 | ||||||||||||||||||||||||||||||
| 864 |     } executed 341 times by 1 test:  end of blockExecuted by: 
  | 341 | ||||||||||||||||||||||||||||||
| 865 | CRYPTO_THREAD_unlock(ctx->lock); | - | ||||||||||||||||||||||||||||||
| 866 |     return executed 348 times by 1 test:   ret;return ret;Executed by: 
 executed 348 times by 1 test:  return ret;Executed by: 
  | 348 | ||||||||||||||||||||||||||||||
| 867 | } | - | ||||||||||||||||||||||||||||||
| 868 | - | |||||||||||||||||||||||||||||||
| 869 | int SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c) | - | ||||||||||||||||||||||||||||||
| 870 | { | - | ||||||||||||||||||||||||||||||
| 871 |     return executed 3936 times by 1 test:   remove_session_lock(ctx, c, 1);return remove_session_lock(ctx, c, 1);Executed by: 
 executed 3936 times by 1 test:  return remove_session_lock(ctx, c, 1);Executed by: 
  | 3936 | ||||||||||||||||||||||||||||||
| 872 | } | - | ||||||||||||||||||||||||||||||
| 873 | - | |||||||||||||||||||||||||||||||
| 874 | static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck) | - | ||||||||||||||||||||||||||||||
| 875 | { | - | ||||||||||||||||||||||||||||||
| 876 | SSL_SESSION *r; | - | ||||||||||||||||||||||||||||||
| 877 | int ret = 0; | - | ||||||||||||||||||||||||||||||
| 878 | - | |||||||||||||||||||||||||||||||
| 879 |     if ((
 
  | 3-3933 | ||||||||||||||||||||||||||||||
| 880 |              ((void *)0)
  | 3-3933 | ||||||||||||||||||||||||||||||
| 881 |                  )
 
 
  | 3-3933 | ||||||||||||||||||||||||||||||
| 882 |         if (lck
  | 0-1744 | ||||||||||||||||||||||||||||||
| 883 |             CRYPTO_THREAD_write_lock(ctx->lock); executed 1744 times by 1 test:  CRYPTO_THREAD_write_lock(ctx->lock);Executed by: 
  | 1744 | ||||||||||||||||||||||||||||||
| 884 |         if ((
 
  | 86-1658 | ||||||||||||||||||||||||||||||
| 885 |                                                               ((void *)0)
  | 86-1658 | ||||||||||||||||||||||||||||||
| 886 | ) { | - | ||||||||||||||||||||||||||||||
| 887 | ret = 1; | - | ||||||||||||||||||||||||||||||
| 888 | r = lh_SSL_SESSION_delete(ctx->sessions, r); | - | ||||||||||||||||||||||||||||||
| 889 | SSL_SESSION_list_remove(ctx, r); | - | ||||||||||||||||||||||||||||||
| 890 |         } executed 86 times by 1 test:  end of blockExecuted by: 
  | 86 | ||||||||||||||||||||||||||||||
| 891 | c->not_resumable = 1; | - | ||||||||||||||||||||||||||||||
| 892 | - | |||||||||||||||||||||||||||||||
| 893 |         if (lck
  | 0-1744 | ||||||||||||||||||||||||||||||
| 894 |             CRYPTO_THREAD_unlock(ctx->lock); executed 1744 times by 1 test:  CRYPTO_THREAD_unlock(ctx->lock);Executed by: 
  | 1744 | ||||||||||||||||||||||||||||||
| 895 | - | |||||||||||||||||||||||||||||||
| 896 |         if (ctx->remove_session_cb != 
  | 35-1709 | ||||||||||||||||||||||||||||||
| 897 |                                      ((void *)0)
  | 35-1709 | ||||||||||||||||||||||||||||||
| 898 | ) | - | ||||||||||||||||||||||||||||||
| 899 |             ctx->remove_session_cb(ctx, c); executed 35 times by 1 test:  ctx->remove_session_cb(ctx, c);Executed by: 
  | 35 | ||||||||||||||||||||||||||||||
| 900 | - | |||||||||||||||||||||||||||||||
| 901 |         if (ret
  | 86-1658 | ||||||||||||||||||||||||||||||
| 902 |             SSL_SESSION_free(r); executed 86 times by 1 test:  SSL_SESSION_free(r);Executed by: 
  | 86 | ||||||||||||||||||||||||||||||
| 903 |     } executed 1744 times by 1 test:   elseend of blockExecuted by: 
  | 1744 | ||||||||||||||||||||||||||||||
| 904 |         ret = 0; executed 2192 times by 1 test:  ret = 0;Executed by: 
  | 2192 | ||||||||||||||||||||||||||||||
| 905 |     return executed 3936 times by 1 test:   ret;return ret;Executed by: 
 executed 3936 times by 1 test:  return ret;Executed by: 
  | 3936 | ||||||||||||||||||||||||||||||
| 906 | } | - | ||||||||||||||||||||||||||||||
| 907 | - | |||||||||||||||||||||||||||||||
| 908 | void SSL_SESSION_free(SSL_SESSION *ss) | - | ||||||||||||||||||||||||||||||
| 909 | { | - | ||||||||||||||||||||||||||||||
| 910 | int i; | - | ||||||||||||||||||||||||||||||
| 911 | - | |||||||||||||||||||||||||||||||
| 912 |     if (ss == 
  | 13653-40225 | ||||||||||||||||||||||||||||||
| 913 |              ((void *)0)
  | 13653-40225 | ||||||||||||||||||||||||||||||
| 914 | ) | - | ||||||||||||||||||||||||||||||
| 915 |         return; executed 40225 times by 2 tests:  return;Executed by: 
  | 40225 | ||||||||||||||||||||||||||||||
| 916 | CRYPTO_DOWN_REF(&ss->references, &i, ss->lock); | - | ||||||||||||||||||||||||||||||
| 917 | ; | - | ||||||||||||||||||||||||||||||
| 918 |     if (i > 0
  | 2167-11486 | ||||||||||||||||||||||||||||||
| 919 |         return; executed 2167 times by 1 test:  return;Executed by: 
  | 2167 | ||||||||||||||||||||||||||||||
| 920 | ; | - | ||||||||||||||||||||||||||||||
| 921 | - | |||||||||||||||||||||||||||||||
| 922 | CRYPTO_free_ex_data(2, ss, &ss->ex_data); | - | ||||||||||||||||||||||||||||||
| 923 | - | |||||||||||||||||||||||||||||||
| 924 | OPENSSL_cleanse(ss->master_key, sizeof(ss->master_key)); | - | ||||||||||||||||||||||||||||||
| 925 | OPENSSL_cleanse(ss->session_id, sizeof(ss->session_id)); | - | ||||||||||||||||||||||||||||||
| 926 | X509_free(ss->peer); | - | ||||||||||||||||||||||||||||||
| 927 | sk_X509_pop_free(ss->peer_chain, X509_free); | - | ||||||||||||||||||||||||||||||
| 928 | sk_SSL_CIPHER_free(ss->ciphers); | - | ||||||||||||||||||||||||||||||
| 929 | CRYPTO_free(ss->ext.hostname, __FILE__, 794); | - | ||||||||||||||||||||||||||||||
| 930 | CRYPTO_free(ss->ext.tick, __FILE__, 795); | - | ||||||||||||||||||||||||||||||
| 931 | - | |||||||||||||||||||||||||||||||
| 932 | CRYPTO_free(ss->ext.ecpointformats, __FILE__, 797); | - | ||||||||||||||||||||||||||||||
| 933 | ss->ext.ecpointformats = | - | ||||||||||||||||||||||||||||||
| 934 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 935 | ; | - | ||||||||||||||||||||||||||||||
| 936 | ss->ext.ecpointformats_len = 0; | - | ||||||||||||||||||||||||||||||
| 937 | CRYPTO_free(ss->ext.supportedgroups, __FILE__, 800); | - | ||||||||||||||||||||||||||||||
| 938 | ss->ext.supportedgroups = | - | ||||||||||||||||||||||||||||||
| 939 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 940 | ; | - | ||||||||||||||||||||||||||||||
| 941 | ss->ext.supportedgroups_len = 0; | - | ||||||||||||||||||||||||||||||
| 942 | - | |||||||||||||||||||||||||||||||
| 943 | - | |||||||||||||||||||||||||||||||
| 944 | CRYPTO_free(ss->psk_identity_hint, __FILE__, 805); | - | ||||||||||||||||||||||||||||||
| 945 | CRYPTO_free(ss->psk_identity, __FILE__, 806); | - | ||||||||||||||||||||||||||||||
| 946 | - | |||||||||||||||||||||||||||||||
| 947 | - | |||||||||||||||||||||||||||||||
| 948 | CRYPTO_free(ss->srp_username, __FILE__, 809); | - | ||||||||||||||||||||||||||||||
| 949 | - | |||||||||||||||||||||||||||||||
| 950 | CRYPTO_free(ss->ext.alpn_selected, __FILE__, 811); | - | ||||||||||||||||||||||||||||||
| 951 | CRYPTO_free(ss->ticket_appdata, __FILE__, 812); | - | ||||||||||||||||||||||||||||||
| 952 | CRYPTO_THREAD_lock_free(ss->lock); | - | ||||||||||||||||||||||||||||||
| 953 | CRYPTO_clear_free(ss, sizeof(*ss), __FILE__, 814); | - | ||||||||||||||||||||||||||||||
| 954 | } executed 11486 times by 1 test:  end of blockExecuted by: 
  | 11486 | ||||||||||||||||||||||||||||||
| 955 | - | |||||||||||||||||||||||||||||||
| 956 | int SSL_SESSION_up_ref(SSL_SESSION *ss) | - | ||||||||||||||||||||||||||||||
| 957 | { | - | ||||||||||||||||||||||||||||||
| 958 | int i; | - | ||||||||||||||||||||||||||||||
| 959 | - | |||||||||||||||||||||||||||||||
| 960 |     if (CRYPTO_UP_REF(&ss->references, &i, ss->lock) <= 0
  | 0-2167 | ||||||||||||||||||||||||||||||
| 961 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 962 | - | |||||||||||||||||||||||||||||||
| 963 | ; | - | ||||||||||||||||||||||||||||||
| 964 | ; | - | ||||||||||||||||||||||||||||||
| 965 |     return executed 2167 times by 1 test:   ((return ((i > 1) ? 1 : 0);Executed by: 
 
 
 executed 2167 times by 1 test:  return ((i > 1) ? 1 : 0);Executed by: 
  | 0-2167 | ||||||||||||||||||||||||||||||
| 966 | } | - | ||||||||||||||||||||||||||||||
| 967 | - | |||||||||||||||||||||||||||||||
| 968 | int SSL_set_session(SSL *s, SSL_SESSION *session) | - | ||||||||||||||||||||||||||||||
| 969 | { | - | ||||||||||||||||||||||||||||||
| 970 | ssl_clear_bad_session(s); | - | ||||||||||||||||||||||||||||||
| 971 |     if (s->ctx->method != s->method
  | 33-372 | ||||||||||||||||||||||||||||||
| 972 |         if (!SSL_set_ssl_method(s, s->ctx->method)
  | 0-33 | ||||||||||||||||||||||||||||||
| 973 |             return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 974 |     } executed 33 times by 1 test:  end of blockExecuted by: 
  | 33 | ||||||||||||||||||||||||||||||
| 975 | - | |||||||||||||||||||||||||||||||
| 976 |     if (session != 
  | 152-253 | ||||||||||||||||||||||||||||||
| 977 |                   ((void *)0)
  | 152-253 | ||||||||||||||||||||||||||||||
| 978 | ) { | - | ||||||||||||||||||||||||||||||
| 979 | SSL_SESSION_up_ref(session); | - | ||||||||||||||||||||||||||||||
| 980 | s->verify_result = session->verify_result; | - | ||||||||||||||||||||||||||||||
| 981 |     } executed 253 times by 1 test:  end of blockExecuted by: 
  | 253 | ||||||||||||||||||||||||||||||
| 982 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||||||||
| 983 | s->session = session; | - | ||||||||||||||||||||||||||||||
| 984 | - | |||||||||||||||||||||||||||||||
| 985 |     return executed 405 times by 1 test:   1;return 1;Executed by: 
 executed 405 times by 1 test:  return 1;Executed by: 
  | 405 | ||||||||||||||||||||||||||||||
| 986 | } | - | ||||||||||||||||||||||||||||||
| 987 | - | |||||||||||||||||||||||||||||||
| 988 | int SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, | - | ||||||||||||||||||||||||||||||
| 989 | unsigned int sid_len) | - | ||||||||||||||||||||||||||||||
| 990 | { | - | ||||||||||||||||||||||||||||||
| 991 |     if (sid_len > 32
  | 0 | ||||||||||||||||||||||||||||||
| 992 | ERR_put_error(20,(423),(408),__FILE__,852) | - | ||||||||||||||||||||||||||||||
| 993 | ; | - | ||||||||||||||||||||||||||||||
| 994 |       return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 995 | } | - | ||||||||||||||||||||||||||||||
| 996 | s->session_id_length = sid_len; | - | ||||||||||||||||||||||||||||||
| 997 |     if (sid != s->session_id
  | 0 | ||||||||||||||||||||||||||||||
| 998 |         memcpy(s->session_id, sid, sid_len); never executed:  memcpy(s->session_id, sid, sid_len); | 0 | ||||||||||||||||||||||||||||||
| 999 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1000 | } | - | ||||||||||||||||||||||||||||||
| 1001 | - | |||||||||||||||||||||||||||||||
| 1002 | long SSL_SESSION_set_timeout(SSL_SESSION *s, long t) | - | ||||||||||||||||||||||||||||||
| 1003 | { | - | ||||||||||||||||||||||||||||||
| 1004 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1005 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1006 | ) | - | ||||||||||||||||||||||||||||||
| 1007 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1008 | s->timeout = t; | - | ||||||||||||||||||||||||||||||
| 1009 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1010 | } | - | ||||||||||||||||||||||||||||||
| 1011 | - | |||||||||||||||||||||||||||||||
| 1012 | long SSL_SESSION_get_timeout(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1013 | { | - | ||||||||||||||||||||||||||||||
| 1014 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1015 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1016 | ) | - | ||||||||||||||||||||||||||||||
| 1017 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1018 |     return never executed:   s->timeout;return s->timeout;never executed:  return s->timeout; | 0 | ||||||||||||||||||||||||||||||
| 1019 | } | - | ||||||||||||||||||||||||||||||
| 1020 | - | |||||||||||||||||||||||||||||||
| 1021 | long SSL_SESSION_get_time(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1022 | { | - | ||||||||||||||||||||||||||||||
| 1023 |     if (s == 
  | 0-6 | ||||||||||||||||||||||||||||||
| 1024 |             ((void *)0)
  | 0-6 | ||||||||||||||||||||||||||||||
| 1025 | ) | - | ||||||||||||||||||||||||||||||
| 1026 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1027 |     return executed 6 times by 1 test:   s->time;return s->time;Executed by: 
 executed 6 times by 1 test:  return s->time;Executed by: 
  | 6 | ||||||||||||||||||||||||||||||
| 1028 | } | - | ||||||||||||||||||||||||||||||
| 1029 | - | |||||||||||||||||||||||||||||||
| 1030 | long SSL_SESSION_set_time(SSL_SESSION *s, long t) | - | ||||||||||||||||||||||||||||||
| 1031 | { | - | ||||||||||||||||||||||||||||||
| 1032 |     if (s == 
  | 0-5 | ||||||||||||||||||||||||||||||
| 1033 |             ((void *)0)
  | 0-5 | ||||||||||||||||||||||||||||||
| 1034 | ) | - | ||||||||||||||||||||||||||||||
| 1035 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1036 | s->time = t; | - | ||||||||||||||||||||||||||||||
| 1037 |     return executed 5 times by 1 test:   t;return t;Executed by: 
 executed 5 times by 1 test:  return t;Executed by: 
  | 5 | ||||||||||||||||||||||||||||||
| 1038 | } | - | ||||||||||||||||||||||||||||||
| 1039 | - | |||||||||||||||||||||||||||||||
| 1040 | int SSL_SESSION_get_protocol_version(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1041 | { | - | ||||||||||||||||||||||||||||||
| 1042 |     return never executed:   s->ssl_version;return s->ssl_version;never executed:  return s->ssl_version; | 0 | ||||||||||||||||||||||||||||||
| 1043 | } | - | ||||||||||||||||||||||||||||||
| 1044 | - | |||||||||||||||||||||||||||||||
| 1045 | int SSL_SESSION_set_protocol_version(SSL_SESSION *s, int version) | - | ||||||||||||||||||||||||||||||
| 1046 | { | - | ||||||||||||||||||||||||||||||
| 1047 | s->ssl_version = version; | - | ||||||||||||||||||||||||||||||
| 1048 |     return executed 36 times by 1 test:   1;return 1;Executed by: 
 executed 36 times by 1 test:  return 1;Executed by: 
  | 36 | ||||||||||||||||||||||||||||||
| 1049 | } | - | ||||||||||||||||||||||||||||||
| 1050 | - | |||||||||||||||||||||||||||||||
| 1051 | const SSL_CIPHER *SSL_SESSION_get0_cipher(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1052 | { | - | ||||||||||||||||||||||||||||||
| 1053 |     return executed 97 times by 1 test:   s->cipher;return s->cipher;Executed by: 
 executed 97 times by 1 test:  return s->cipher;Executed by: 
  | 97 | ||||||||||||||||||||||||||||||
| 1054 | } | - | ||||||||||||||||||||||||||||||
| 1055 | - | |||||||||||||||||||||||||||||||
| 1056 | int SSL_SESSION_set_cipher(SSL_SESSION *s, const SSL_CIPHER *cipher) | - | ||||||||||||||||||||||||||||||
| 1057 | { | - | ||||||||||||||||||||||||||||||
| 1058 | s->cipher = cipher; | - | ||||||||||||||||||||||||||||||
| 1059 |     return executed 35 times by 1 test:   1;return 1;Executed by: 
 executed 35 times by 1 test:  return 1;Executed by: 
  | 35 | ||||||||||||||||||||||||||||||
| 1060 | } | - | ||||||||||||||||||||||||||||||
| 1061 | - | |||||||||||||||||||||||||||||||
| 1062 | const char *SSL_SESSION_get0_hostname(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1063 | { | - | ||||||||||||||||||||||||||||||
| 1064 |     return never executed:   s->ext.hostname;return s->ext.hostname;never executed:  return s->ext.hostname; | 0 | ||||||||||||||||||||||||||||||
| 1065 | } | - | ||||||||||||||||||||||||||||||
| 1066 | - | |||||||||||||||||||||||||||||||
| 1067 | int SSL_SESSION_set1_hostname(SSL_SESSION *s, const char *hostname) | - | ||||||||||||||||||||||||||||||
| 1068 | { | - | ||||||||||||||||||||||||||||||
| 1069 | CRYPTO_free(s->ext.hostname, __FILE__, 920); | - | ||||||||||||||||||||||||||||||
| 1070 |     if (hostname == 
  | 0-4 | ||||||||||||||||||||||||||||||
| 1071 |                    ((void *)0)
  | 0-4 | ||||||||||||||||||||||||||||||
| 1072 | ) { | - | ||||||||||||||||||||||||||||||
| 1073 | s->ext.hostname = | - | ||||||||||||||||||||||||||||||
| 1074 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1075 | ; | - | ||||||||||||||||||||||||||||||
| 1076 |         return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1077 | } | - | ||||||||||||||||||||||||||||||
| 1078 | s->ext.hostname = CRYPTO_strdup(hostname, __FILE__, 925); | - | ||||||||||||||||||||||||||||||
| 1079 | - | |||||||||||||||||||||||||||||||
| 1080 |     return executed 4 times by 1 test:   s->ext.hostname != return s->ext.hostname != ((void *)0) ;Executed by: 
 executed 4 times by 1 test:  return s->ext.hostname != ((void *)0) ;Executed by: 
  | 4 | ||||||||||||||||||||||||||||||
| 1081 |                              ((void *)0) executed 4 times by 1 test:  return s->ext.hostname != ((void *)0) ;Executed by: 
  | 4 | ||||||||||||||||||||||||||||||
| 1082 |                                  ; executed 4 times by 1 test:  return s->ext.hostname != ((void *)0) ;Executed by: 
  | 4 | ||||||||||||||||||||||||||||||
| 1083 | } | - | ||||||||||||||||||||||||||||||
| 1084 | - | |||||||||||||||||||||||||||||||
| 1085 | int SSL_SESSION_has_ticket(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1086 | { | - | ||||||||||||||||||||||||||||||
| 1087 |     return never executed:   (return (s->ext.ticklen > 0) ? 1 : 0;
 
 never executed:  return (s->ext.ticklen > 0) ? 1 : 0; | 0 | ||||||||||||||||||||||||||||||
| 1088 | } | - | ||||||||||||||||||||||||||||||
| 1089 | - | |||||||||||||||||||||||||||||||
| 1090 | unsigned long SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1091 | { | - | ||||||||||||||||||||||||||||||
| 1092 |     return never executed:   s->ext.tick_lifetime_hint;return s->ext.tick_lifetime_hint;never executed:  return s->ext.tick_lifetime_hint; | 0 | ||||||||||||||||||||||||||||||
| 1093 | } | - | ||||||||||||||||||||||||||||||
| 1094 | - | |||||||||||||||||||||||||||||||
| 1095 | void SSL_SESSION_get0_ticket(const SSL_SESSION *s, const unsigned char **tick, | - | ||||||||||||||||||||||||||||||
| 1096 | size_t *len) | - | ||||||||||||||||||||||||||||||
| 1097 | { | - | ||||||||||||||||||||||||||||||
| 1098 | *len = s->ext.ticklen; | - | ||||||||||||||||||||||||||||||
| 1099 |     if (tick != 
  | 0-1158 | ||||||||||||||||||||||||||||||
| 1100 |                ((void *)0)
  | 0-1158 | ||||||||||||||||||||||||||||||
| 1101 | ) | - | ||||||||||||||||||||||||||||||
| 1102 |         * executed 1158 times by 1 test:  tick = s->ext.tick;*tick = s->ext.tick;Executed by: 
 executed 1158 times by 1 test:  *tick = s->ext.tick;Executed by: 
  | 1158 | ||||||||||||||||||||||||||||||
| 1103 | } executed 1158 times by 1 test:  end of blockExecuted by: 
  | 1158 | ||||||||||||||||||||||||||||||
| 1104 | - | |||||||||||||||||||||||||||||||
| 1105 | uint32_t SSL_SESSION_get_max_early_data(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1106 | { | - | ||||||||||||||||||||||||||||||
| 1107 |     return never executed:   s->ext.max_early_data;return s->ext.max_early_data;never executed:  return s->ext.max_early_data; | 0 | ||||||||||||||||||||||||||||||
| 1108 | } | - | ||||||||||||||||||||||||||||||
| 1109 | - | |||||||||||||||||||||||||||||||
| 1110 | int SSL_SESSION_set_max_early_data(SSL_SESSION *s, uint32_t max_early_data) | - | ||||||||||||||||||||||||||||||
| 1111 | { | - | ||||||||||||||||||||||||||||||
| 1112 | s->ext.max_early_data = max_early_data; | - | ||||||||||||||||||||||||||||||
| 1113 | - | |||||||||||||||||||||||||||||||
| 1114 |     return executed 17 times by 1 test:   1;return 1;Executed by: 
 executed 17 times by 1 test:  return 1;Executed by: 
  | 17 | ||||||||||||||||||||||||||||||
| 1115 | } | - | ||||||||||||||||||||||||||||||
| 1116 | - | |||||||||||||||||||||||||||||||
| 1117 | void SSL_SESSION_get0_alpn_selected(const SSL_SESSION *s, | - | ||||||||||||||||||||||||||||||
| 1118 | const unsigned char **alpn, | - | ||||||||||||||||||||||||||||||
| 1119 | size_t *len) | - | ||||||||||||||||||||||||||||||
| 1120 | { | - | ||||||||||||||||||||||||||||||
| 1121 | *alpn = s->ext.alpn_selected; | - | ||||||||||||||||||||||||||||||
| 1122 | *len = s->ext.alpn_selected_len; | - | ||||||||||||||||||||||||||||||
| 1123 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 1124 | - | |||||||||||||||||||||||||||||||
| 1125 | int SSL_SESSION_set1_alpn_selected(SSL_SESSION *s, const unsigned char *alpn, | - | ||||||||||||||||||||||||||||||
| 1126 | size_t len) | - | ||||||||||||||||||||||||||||||
| 1127 | { | - | ||||||||||||||||||||||||||||||
| 1128 | CRYPTO_free(s->ext.alpn_selected, __FILE__, 971); | - | ||||||||||||||||||||||||||||||
| 1129 |     if (alpn == 
  | 0-5 | ||||||||||||||||||||||||||||||
| 1130 |                ((void *)0)
  | 0-5 | ||||||||||||||||||||||||||||||
| 1131 |                     || len == 0
  | 0-5 | ||||||||||||||||||||||||||||||
| 1132 | s->ext.alpn_selected = | - | ||||||||||||||||||||||||||||||
| 1133 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1134 | ; | - | ||||||||||||||||||||||||||||||
| 1135 | s->ext.alpn_selected_len = 0; | - | ||||||||||||||||||||||||||||||
| 1136 |         return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1137 | } | - | ||||||||||||||||||||||||||||||
| 1138 | s->ext.alpn_selected = CRYPTO_memdup((alpn), len, __FILE__, 977); | - | ||||||||||||||||||||||||||||||
| 1139 |     if (s->ext.alpn_selected == 
  | 0-5 | ||||||||||||||||||||||||||||||
| 1140 |                                ((void *)0)
  | 0-5 | ||||||||||||||||||||||||||||||
| 1141 | ) { | - | ||||||||||||||||||||||||||||||
| 1142 | s->ext.alpn_selected_len = 0; | - | ||||||||||||||||||||||||||||||
| 1143 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1144 | } | - | ||||||||||||||||||||||||||||||
| 1145 | s->ext.alpn_selected_len = len; | - | ||||||||||||||||||||||||||||||
| 1146 | - | |||||||||||||||||||||||||||||||
| 1147 |     return executed 5 times by 1 test:   1;return 1;Executed by: 
 executed 5 times by 1 test:  return 1;Executed by: 
  | 5 | ||||||||||||||||||||||||||||||
| 1148 | } | - | ||||||||||||||||||||||||||||||
| 1149 | - | |||||||||||||||||||||||||||||||
| 1150 | X509 *SSL_SESSION_get0_peer(SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1151 | { | - | ||||||||||||||||||||||||||||||
| 1152 |     return executed 6 times by 1 test:   s->peer;return s->peer;Executed by: 
 executed 6 times by 1 test:  return s->peer;Executed by: 
  | 6 | ||||||||||||||||||||||||||||||
| 1153 | } | - | ||||||||||||||||||||||||||||||
| 1154 | - | |||||||||||||||||||||||||||||||
| 1155 | int SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||||||||
| 1156 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||||||||
| 1157 | { | - | ||||||||||||||||||||||||||||||
| 1158 |     if (sid_ctx_len > 32
  | 0 | ||||||||||||||||||||||||||||||
| 1159 | ERR_put_error(20,(312),(273),__FILE__,997) | - | ||||||||||||||||||||||||||||||
| 1160 | ; | - | ||||||||||||||||||||||||||||||
| 1161 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1162 | } | - | ||||||||||||||||||||||||||||||
| 1163 | s->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||||||||
| 1164 |     if (sid_ctx != s->sid_ctx
  | 0 | ||||||||||||||||||||||||||||||
| 1165 |         memcpy(s->sid_ctx, sid_ctx, sid_ctx_len); never executed:  memcpy(s->sid_ctx, sid_ctx, sid_ctx_len); | 0 | ||||||||||||||||||||||||||||||
| 1166 | - | |||||||||||||||||||||||||||||||
| 1167 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1168 | } | - | ||||||||||||||||||||||||||||||
| 1169 | - | |||||||||||||||||||||||||||||||
| 1170 | int SSL_SESSION_is_resumable(const SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1171 | { | - | ||||||||||||||||||||||||||||||
| 1172 | - | |||||||||||||||||||||||||||||||
| 1173 | - | |||||||||||||||||||||||||||||||
| 1174 | - | |||||||||||||||||||||||||||||||
| 1175 | - | |||||||||||||||||||||||||||||||
| 1176 |     return executed 951 times by 1 test:   !s->not_resumablereturn !s->not_resumable && (s->session_id_length > 0 || s->ext.ticklen > 0);Executed by: 
 
 executed 951 times by 1 test:  return !s->not_resumable && (s->session_id_length > 0 || s->ext.ticklen > 0);Executed by: 
  | 0-951 | ||||||||||||||||||||||||||||||
| 1177 |            && (s->session_id_length > 0
 
 executed 951 times by 1 test:  return !s->not_resumable && (s->session_id_length > 0 || s->ext.ticklen > 0);Executed by: 
  | 0-951 | ||||||||||||||||||||||||||||||
| 1178 | } | - | ||||||||||||||||||||||||||||||
| 1179 | - | |||||||||||||||||||||||||||||||
| 1180 | long SSL_CTX_set_timeout(SSL_CTX *s, long t) | - | ||||||||||||||||||||||||||||||
| 1181 | { | - | ||||||||||||||||||||||||||||||
| 1182 | long l; | - | ||||||||||||||||||||||||||||||
| 1183 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1184 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1185 | ) | - | ||||||||||||||||||||||||||||||
| 1186 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1187 | l = s->session_timeout; | - | ||||||||||||||||||||||||||||||
| 1188 | s->session_timeout = t; | - | ||||||||||||||||||||||||||||||
| 1189 |     return never executed:   l;return l;never executed:  return l; | 0 | ||||||||||||||||||||||||||||||
| 1190 | } | - | ||||||||||||||||||||||||||||||
| 1191 | - | |||||||||||||||||||||||||||||||
| 1192 | long SSL_CTX_get_timeout(const SSL_CTX *s) | - | ||||||||||||||||||||||||||||||
| 1193 | { | - | ||||||||||||||||||||||||||||||
| 1194 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1195 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1196 | ) | - | ||||||||||||||||||||||||||||||
| 1197 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1198 |     return never executed:   s->session_timeout;return s->session_timeout;never executed:  return s->session_timeout; | 0 | ||||||||||||||||||||||||||||||
| 1199 | } | - | ||||||||||||||||||||||||||||||
| 1200 | - | |||||||||||||||||||||||||||||||
| 1201 | int SSL_set_session_secret_cb(SSL *s, | - | ||||||||||||||||||||||||||||||
| 1202 | tls_session_secret_cb_fn tls_session_secret_cb, | - | ||||||||||||||||||||||||||||||
| 1203 | void *arg) | - | ||||||||||||||||||||||||||||||
| 1204 | { | - | ||||||||||||||||||||||||||||||
| 1205 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1206 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1207 | ) | - | ||||||||||||||||||||||||||||||
| 1208 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1209 | s->ext.session_secret_cb = tls_session_secret_cb; | - | ||||||||||||||||||||||||||||||
| 1210 | s->ext.session_secret_cb_arg = arg; | - | ||||||||||||||||||||||||||||||
| 1211 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1212 | } | - | ||||||||||||||||||||||||||||||
| 1213 | - | |||||||||||||||||||||||||||||||
| 1214 | int SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb, | - | ||||||||||||||||||||||||||||||
| 1215 | void *arg) | - | ||||||||||||||||||||||||||||||
| 1216 | { | - | ||||||||||||||||||||||||||||||
| 1217 |     if (s == 
  | 0 | ||||||||||||||||||||||||||||||
| 1218 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1219 | ) | - | ||||||||||||||||||||||||||||||
| 1220 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1221 | s->ext.session_ticket_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1222 | s->ext.session_ticket_cb_arg = arg; | - | ||||||||||||||||||||||||||||||
| 1223 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1224 | } | - | ||||||||||||||||||||||||||||||
| 1225 | - | |||||||||||||||||||||||||||||||
| 1226 | int SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) | - | ||||||||||||||||||||||||||||||
| 1227 | { | - | ||||||||||||||||||||||||||||||
| 1228 |     if (s->version >= 0x0301
  | 0-1 | ||||||||||||||||||||||||||||||
| 1229 | CRYPTO_free(s->ext.session_ticket, __FILE__, 1058); | - | ||||||||||||||||||||||||||||||
| 1230 | s->ext.session_ticket = | - | ||||||||||||||||||||||||||||||
| 1231 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1232 | ; | - | ||||||||||||||||||||||||||||||
| 1233 | s->ext.session_ticket = | - | ||||||||||||||||||||||||||||||
| 1234 | CRYPTO_malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len, __FILE__, 1061); | - | ||||||||||||||||||||||||||||||
| 1235 |         if (s->ext.session_ticket == 
  | 0-1 | ||||||||||||||||||||||||||||||
| 1236 |                                     ((void *)0)
  | 0-1 | ||||||||||||||||||||||||||||||
| 1237 | ) { | - | ||||||||||||||||||||||||||||||
| 1238 | ERR_put_error(20,(294),((1|64)),__FILE__,1063); | - | ||||||||||||||||||||||||||||||
| 1239 |             return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1240 | } | - | ||||||||||||||||||||||||||||||
| 1241 | - | |||||||||||||||||||||||||||||||
| 1242 |         if (ext_data != 
  | 0-1 | ||||||||||||||||||||||||||||||
| 1243 |                        ((void *)0)
  | 0-1 | ||||||||||||||||||||||||||||||
| 1244 | ) { | - | ||||||||||||||||||||||||||||||
| 1245 | s->ext.session_ticket->length = ext_len; | - | ||||||||||||||||||||||||||||||
| 1246 | s->ext.session_ticket->data = s->ext.session_ticket + 1; | - | ||||||||||||||||||||||||||||||
| 1247 | memcpy(s->ext.session_ticket->data, ext_data, ext_len); | - | ||||||||||||||||||||||||||||||
| 1248 |         } executed 1 time by 1 test:   else {end of blockExecuted by: 
  | 1 | ||||||||||||||||||||||||||||||
| 1249 | s->ext.session_ticket->length = 0; | - | ||||||||||||||||||||||||||||||
| 1250 | s->ext.session_ticket->data = | - | ||||||||||||||||||||||||||||||
| 1251 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1252 | ; | - | ||||||||||||||||||||||||||||||
| 1253 |         } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 1254 | - | |||||||||||||||||||||||||||||||
| 1255 |         return executed 1 time by 1 test:   1;return 1;Executed by: 
 executed 1 time by 1 test:  return 1;Executed by: 
  | 1 | ||||||||||||||||||||||||||||||
| 1256 | } | - | ||||||||||||||||||||||||||||||
| 1257 | - | |||||||||||||||||||||||||||||||
| 1258 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1259 | } | - | ||||||||||||||||||||||||||||||
| 1260 | - | |||||||||||||||||||||||||||||||
| 1261 | typedef struct timeout_param_st { | - | ||||||||||||||||||||||||||||||
| 1262 | SSL_CTX *ctx; | - | ||||||||||||||||||||||||||||||
| 1263 | long time; | - | ||||||||||||||||||||||||||||||
| 1264 | struct lhash_st_SSL_SESSION *cache; | - | ||||||||||||||||||||||||||||||
| 1265 | } TIMEOUT_PARAM; | - | ||||||||||||||||||||||||||||||
| 1266 | - | |||||||||||||||||||||||||||||||
| 1267 | static void timeout_cb(SSL_SESSION *s, TIMEOUT_PARAM *p) | - | ||||||||||||||||||||||||||||||
| 1268 | { | - | ||||||||||||||||||||||||||||||
| 1269 |     if ((
 
 
 
  | 0-255 | ||||||||||||||||||||||||||||||
| 1270 | - | |||||||||||||||||||||||||||||||
| 1271 | - | |||||||||||||||||||||||||||||||
| 1272 | - | |||||||||||||||||||||||||||||||
| 1273 | - | |||||||||||||||||||||||||||||||
| 1274 | (void)lh_SSL_SESSION_delete(p->cache, s); | - | ||||||||||||||||||||||||||||||
| 1275 | SSL_SESSION_list_remove(p->ctx, s); | - | ||||||||||||||||||||||||||||||
| 1276 | s->not_resumable = 1; | - | ||||||||||||||||||||||||||||||
| 1277 |         if (p->ctx->remove_session_cb != 
  | 1-254 | ||||||||||||||||||||||||||||||
| 1278 |                                         ((void *)0)
  | 1-254 | ||||||||||||||||||||||||||||||
| 1279 | ) | - | ||||||||||||||||||||||||||||||
| 1280 |             p->ctx->remove_session_cb(p->ctx, s); executed 1 time by 1 test:  p->ctx->remove_session_cb(p->ctx, s);Executed by: 
  | 1 | ||||||||||||||||||||||||||||||
| 1281 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||||||||
| 1282 |     } executed 255 times by 1 test:  end of blockExecuted by: 
  | 255 | ||||||||||||||||||||||||||||||
| 1283 | } executed 255 times by 1 test:  end of blockExecuted by: 
  | 255 | ||||||||||||||||||||||||||||||
| 1284 | - | |||||||||||||||||||||||||||||||
| 1285 | static inline void lh_SSL_SESSION_doall_TIMEOUT_PARAM(struct lhash_st_SSL_SESSION *lh, void (*fn)(SSL_SESSION *, TIMEOUT_PARAM *), TIMEOUT_PARAM *arg) { OPENSSL_LH_doall_arg((OPENSSL_LHASH *)lh, (OPENSSL_LH_DOALL_FUNCARG)fn, (void *)arg); } executed 8017 times by 2 tests:   struct lhash_st_SSL_SESSION;end of blockExecuted by: 
  | 8017 | ||||||||||||||||||||||||||||||
| 1286 | - | |||||||||||||||||||||||||||||||
| 1287 | void SSL_CTX_flush_sessions(SSL_CTX *s, long t) | - | ||||||||||||||||||||||||||||||
| 1288 | { | - | ||||||||||||||||||||||||||||||
| 1289 | unsigned long i; | - | ||||||||||||||||||||||||||||||
| 1290 | TIMEOUT_PARAM tp; | - | ||||||||||||||||||||||||||||||
| 1291 | - | |||||||||||||||||||||||||||||||
| 1292 | tp.ctx = s; | - | ||||||||||||||||||||||||||||||
| 1293 | tp.cache = s->sessions; | - | ||||||||||||||||||||||||||||||
| 1294 |     if (tp.cache == 
  | 0-8017 | ||||||||||||||||||||||||||||||
| 1295 |                    ((void *)0)
  | 0-8017 | ||||||||||||||||||||||||||||||
| 1296 | ) | - | ||||||||||||||||||||||||||||||
| 1297 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||
| 1298 | tp.time = t; | - | ||||||||||||||||||||||||||||||
| 1299 | CRYPTO_THREAD_write_lock(s->lock); | - | ||||||||||||||||||||||||||||||
| 1300 | i = lh_SSL_SESSION_get_down_load(s->sessions); | - | ||||||||||||||||||||||||||||||
| 1301 | lh_SSL_SESSION_set_down_load(s->sessions, 0); | - | ||||||||||||||||||||||||||||||
| 1302 | lh_SSL_SESSION_doall_TIMEOUT_PARAM(tp.cache, timeout_cb, &tp); | - | ||||||||||||||||||||||||||||||
| 1303 | lh_SSL_SESSION_set_down_load(s->sessions, i); | - | ||||||||||||||||||||||||||||||
| 1304 | CRYPTO_THREAD_unlock(s->lock); | - | ||||||||||||||||||||||||||||||
| 1305 | } executed 8017 times by 2 tests:  end of blockExecuted by: 
  | 8017 | ||||||||||||||||||||||||||||||
| 1306 | - | |||||||||||||||||||||||||||||||
| 1307 | int ssl_clear_bad_session(SSL *s) | - | ||||||||||||||||||||||||||||||
| 1308 | { | - | ||||||||||||||||||||||||||||||
| 1309 |     if ((
 
  | 7459-16359 | ||||||||||||||||||||||||||||||
| 1310 |                       ((void *)0)
  | 7459-16359 | ||||||||||||||||||||||||||||||
| 1311 |                           )
  | 7459-16359 | ||||||||||||||||||||||||||||||
| 1312 |         !(s->shutdown & 1)
  | 2737-4722 | ||||||||||||||||||||||||||||||
| 1313 |         !(SSL_in_init(s)
 
  | 0-4261 | ||||||||||||||||||||||||||||||
| 1314 | SSL_CTX_remove_session(s->session_ctx, s->session); | - | ||||||||||||||||||||||||||||||
| 1315 |         return executed 461 times by 1 test:   1;return 1;Executed by: 
 executed 461 times by 1 test:  return 1;Executed by: 
  | 461 | ||||||||||||||||||||||||||||||
| 1316 | } else | - | ||||||||||||||||||||||||||||||
| 1317 |         return executed 23357 times by 2 tests:   0;return 0;Executed by: 
 executed 23357 times by 2 tests:  return 0;Executed by: 
  | 23357 | ||||||||||||||||||||||||||||||
| 1318 | } | - | ||||||||||||||||||||||||||||||
| 1319 | - | |||||||||||||||||||||||||||||||
| 1320 | - | |||||||||||||||||||||||||||||||
| 1321 | static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1322 | { | - | ||||||||||||||||||||||||||||||
| 1323 |     if ((
 
  | 0-341 | ||||||||||||||||||||||||||||||
| 1324 |                    ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 1325 |                        )
 
 
  | 0-341 | ||||||||||||||||||||||||||||||
| 1326 |                                         ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 1327 |                                             )
  | 0-341 | ||||||||||||||||||||||||||||||
| 1328 |         return; never executed:  return; | 0 | ||||||||||||||||||||||||||||||
| 1329 | - | |||||||||||||||||||||||||||||||
| 1330 |     if (s->next == (SSL_SESSION *)&(ctx->session_cache_tail)
  | 119-222 | ||||||||||||||||||||||||||||||
| 1331 | - | |||||||||||||||||||||||||||||||
| 1332 |         if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head)
  | 42-180 | ||||||||||||||||||||||||||||||
| 1333 | - | |||||||||||||||||||||||||||||||
| 1334 | ctx->session_cache_head = | - | ||||||||||||||||||||||||||||||
| 1335 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1336 | ; | - | ||||||||||||||||||||||||||||||
| 1337 | ctx->session_cache_tail = | - | ||||||||||||||||||||||||||||||
| 1338 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1339 | ; | - | ||||||||||||||||||||||||||||||
| 1340 |         } executed 180 times by 1 test:   else {end of blockExecuted by: 
  | 180 | ||||||||||||||||||||||||||||||
| 1341 | ctx->session_cache_tail = s->prev; | - | ||||||||||||||||||||||||||||||
| 1342 | s->prev->next = (SSL_SESSION *)&(ctx->session_cache_tail); | - | ||||||||||||||||||||||||||||||
| 1343 |         } executed 42 times by 1 test:  end of blockExecuted by: 
  | 42 | ||||||||||||||||||||||||||||||
| 1344 | } else { | - | ||||||||||||||||||||||||||||||
| 1345 |         if (s->prev == (SSL_SESSION *)&(ctx->session_cache_head)
  | 17-102 | ||||||||||||||||||||||||||||||
| 1346 | - | |||||||||||||||||||||||||||||||
| 1347 | ctx->session_cache_head = s->next; | - | ||||||||||||||||||||||||||||||
| 1348 | s->next->prev = (SSL_SESSION *)&(ctx->session_cache_head); | - | ||||||||||||||||||||||||||||||
| 1349 |         } executed 102 times by 1 test:   else {end of blockExecuted by: 
  | 102 | ||||||||||||||||||||||||||||||
| 1350 | - | |||||||||||||||||||||||||||||||
| 1351 | s->next->prev = s->prev; | - | ||||||||||||||||||||||||||||||
| 1352 | s->prev->next = s->next; | - | ||||||||||||||||||||||||||||||
| 1353 |         } executed 17 times by 1 test:  end of blockExecuted by: 
  | 17 | ||||||||||||||||||||||||||||||
| 1354 | } | - | ||||||||||||||||||||||||||||||
| 1355 | s->prev = s->next = | - | ||||||||||||||||||||||||||||||
| 1356 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1357 | ; | - | ||||||||||||||||||||||||||||||
| 1358 | } executed 341 times by 1 test:  end of blockExecuted by: 
  | 341 | ||||||||||||||||||||||||||||||
| 1359 | - | |||||||||||||||||||||||||||||||
| 1360 | static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s) | - | ||||||||||||||||||||||||||||||
| 1361 | { | - | ||||||||||||||||||||||||||||||
| 1362 |     if ((
 
  | 0-341 | ||||||||||||||||||||||||||||||
| 1363 |                    ((void *)0)
  | 0-341 | ||||||||||||||||||||||||||||||
| 1364 |                        )
 
 
  | 0-341 | ||||||||||||||||||||||||||||||
| 1365 |                                         ((void *)0)
  | 0 | ||||||||||||||||||||||||||||||
| 1366 |                                             )
  | 0 | ||||||||||||||||||||||||||||||
| 1367 |         SSL_SESSION_list_remove(ctx, s); never executed:  SSL_SESSION_list_remove(ctx, s); | 0 | ||||||||||||||||||||||||||||||
| 1368 | - | |||||||||||||||||||||||||||||||
| 1369 |     if (ctx->session_cache_head == 
  | 161-180 | ||||||||||||||||||||||||||||||
| 1370 |                                   ((void *)0)
  | 161-180 | ||||||||||||||||||||||||||||||
| 1371 | ) { | - | ||||||||||||||||||||||||||||||
| 1372 | ctx->session_cache_head = s; | - | ||||||||||||||||||||||||||||||
| 1373 | ctx->session_cache_tail = s; | - | ||||||||||||||||||||||||||||||
| 1374 | s->prev = (SSL_SESSION *)&(ctx->session_cache_head); | - | ||||||||||||||||||||||||||||||
| 1375 | s->next = (SSL_SESSION *)&(ctx->session_cache_tail); | - | ||||||||||||||||||||||||||||||
| 1376 |     } executed 180 times by 1 test:   else {end of blockExecuted by: 
  | 180 | ||||||||||||||||||||||||||||||
| 1377 | s->next = ctx->session_cache_head; | - | ||||||||||||||||||||||||||||||
| 1378 | s->next->prev = s; | - | ||||||||||||||||||||||||||||||
| 1379 | s->prev = (SSL_SESSION *)&(ctx->session_cache_head); | - | ||||||||||||||||||||||||||||||
| 1380 | ctx->session_cache_head = s; | - | ||||||||||||||||||||||||||||||
| 1381 |     } executed 161 times by 1 test:  end of blockExecuted by: 
  | 161 | ||||||||||||||||||||||||||||||
| 1382 | } | - | ||||||||||||||||||||||||||||||
| 1383 | - | |||||||||||||||||||||||||||||||
| 1384 | void SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1385 | int (*cb) (struct ssl_st *ssl, SSL_SESSION *sess)) | - | ||||||||||||||||||||||||||||||
| 1386 | { | - | ||||||||||||||||||||||||||||||
| 1387 | ctx->new_session_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1388 | } executed 404 times by 1 test:  end of blockExecuted by: 
  | 404 | ||||||||||||||||||||||||||||||
| 1389 | - | |||||||||||||||||||||||||||||||
| 1390 | int (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx)) (SSL *ssl, SSL_SESSION *sess) { | - | ||||||||||||||||||||||||||||||
| 1391 |     return never executed:   ctx->new_session_cb;return ctx->new_session_cb;never executed:  return ctx->new_session_cb; | 0 | ||||||||||||||||||||||||||||||
| 1392 | } | - | ||||||||||||||||||||||||||||||
| 1393 | - | |||||||||||||||||||||||||||||||
| 1394 | void SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1395 | void (*cb) (SSL_CTX *ctx, SSL_SESSION *sess)) | - | ||||||||||||||||||||||||||||||
| 1396 | { | - | ||||||||||||||||||||||||||||||
| 1397 | ctx->remove_session_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1398 | } executed 194 times by 1 test:  end of blockExecuted by: 
  | 194 | ||||||||||||||||||||||||||||||
| 1399 | - | |||||||||||||||||||||||||||||||
| 1400 | void (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx)) (SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1401 | SSL_SESSION *sess) { | - | ||||||||||||||||||||||||||||||
| 1402 |     return never executed:   ctx->remove_session_cb;return ctx->remove_session_cb;never executed:  return ctx->remove_session_cb; | 0 | ||||||||||||||||||||||||||||||
| 1403 | } | - | ||||||||||||||||||||||||||||||
| 1404 | - | |||||||||||||||||||||||||||||||
| 1405 | void SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1406 | SSL_SESSION *(*cb) (struct ssl_st *ssl, | - | ||||||||||||||||||||||||||||||
| 1407 | const unsigned char *data, | - | ||||||||||||||||||||||||||||||
| 1408 | int len, int *copy)) | - | ||||||||||||||||||||||||||||||
| 1409 | { | - | ||||||||||||||||||||||||||||||
| 1410 | ctx->get_session_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1411 | } executed 186 times by 1 test:  end of blockExecuted by: 
  | 186 | ||||||||||||||||||||||||||||||
| 1412 | - | |||||||||||||||||||||||||||||||
| 1413 | SSL_SESSION *(*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx)) (SSL *ssl, | - | ||||||||||||||||||||||||||||||
| 1414 | const unsigned char | - | ||||||||||||||||||||||||||||||
| 1415 | *data, int len, | - | ||||||||||||||||||||||||||||||
| 1416 | int *copy) { | - | ||||||||||||||||||||||||||||||
| 1417 |     return never executed:   ctx->get_session_cb;return ctx->get_session_cb;never executed:  return ctx->get_session_cb; | 0 | ||||||||||||||||||||||||||||||
| 1418 | } | - | ||||||||||||||||||||||||||||||
| 1419 | - | |||||||||||||||||||||||||||||||
| 1420 | void SSL_CTX_set_info_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1421 | void (*cb) (const SSL *ssl, int type, int val)) | - | ||||||||||||||||||||||||||||||
| 1422 | { | - | ||||||||||||||||||||||||||||||
| 1423 | ctx->info_callback = cb; | - | ||||||||||||||||||||||||||||||
| 1424 | } executed 4 times by 1 test:  end of blockExecuted by: 
  | 4 | ||||||||||||||||||||||||||||||
| 1425 | - | |||||||||||||||||||||||||||||||
| 1426 | void (*SSL_CTX_get_info_callback(SSL_CTX *ctx)) (const SSL *ssl, int type, | - | ||||||||||||||||||||||||||||||
| 1427 | int val) { | - | ||||||||||||||||||||||||||||||
| 1428 |     return never executed:   ctx->info_callback;return ctx->info_callback;never executed:  return ctx->info_callback; | 0 | ||||||||||||||||||||||||||||||
| 1429 | } | - | ||||||||||||||||||||||||||||||
| 1430 | - | |||||||||||||||||||||||||||||||
| 1431 | void SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1432 | int (*cb) (SSL *ssl, X509 **x509, | - | ||||||||||||||||||||||||||||||
| 1433 | EVP_PKEY **pkey)) | - | ||||||||||||||||||||||||||||||
| 1434 | { | - | ||||||||||||||||||||||||||||||
| 1435 | ctx->client_cert_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1436 | } never executed:  end of block | 0 | ||||||||||||||||||||||||||||||
| 1437 | - | |||||||||||||||||||||||||||||||
| 1438 | int (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx)) (SSL *ssl, X509 **x509, | - | ||||||||||||||||||||||||||||||
| 1439 | EVP_PKEY **pkey) { | - | ||||||||||||||||||||||||||||||
| 1440 |     return never executed:   ctx->client_cert_cb;return ctx->client_cert_cb;never executed:  return ctx->client_cert_cb; | 0 | ||||||||||||||||||||||||||||||
| 1441 | } | - | ||||||||||||||||||||||||||||||
| 1442 | - | |||||||||||||||||||||||||||||||
| 1443 | - | |||||||||||||||||||||||||||||||
| 1444 | int SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e) | - | ||||||||||||||||||||||||||||||
| 1445 | { | - | ||||||||||||||||||||||||||||||
| 1446 |     if (!ENGINE_init(e)
  | 0 | ||||||||||||||||||||||||||||||
| 1447 | ERR_put_error(20,(290),(38),__FILE__,1246); | - | ||||||||||||||||||||||||||||||
| 1448 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1449 | } | - | ||||||||||||||||||||||||||||||
| 1450 |     if (!ENGINE_get_ssl_client_cert_function(e)
  | 0 | ||||||||||||||||||||||||||||||
| 1451 | ERR_put_error(20,(290),(331),__FILE__,1251) | - | ||||||||||||||||||||||||||||||
| 1452 | ; | - | ||||||||||||||||||||||||||||||
| 1453 | ENGINE_finish(e); | - | ||||||||||||||||||||||||||||||
| 1454 |         return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1455 | } | - | ||||||||||||||||||||||||||||||
| 1456 | ctx->client_cert_engine = e; | - | ||||||||||||||||||||||||||||||
| 1457 |     return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1458 | } | - | ||||||||||||||||||||||||||||||
| 1459 | - | |||||||||||||||||||||||||||||||
| 1460 | - | |||||||||||||||||||||||||||||||
| 1461 | void SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1462 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||
| 1463 | unsigned char *cookie, | - | ||||||||||||||||||||||||||||||
| 1464 | unsigned int *cookie_len)) | - | ||||||||||||||||||||||||||||||
| 1465 | { | - | ||||||||||||||||||||||||||||||
| 1466 | ctx->app_gen_cookie_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1467 | } executed 185 times by 1 test:  end of blockExecuted by: 
  | 185 | ||||||||||||||||||||||||||||||
| 1468 | - | |||||||||||||||||||||||||||||||
| 1469 | void SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1470 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||
| 1471 | const unsigned char *cookie, | - | ||||||||||||||||||||||||||||||
| 1472 | unsigned int cookie_len)) | - | ||||||||||||||||||||||||||||||
| 1473 | { | - | ||||||||||||||||||||||||||||||
| 1474 | ctx->app_verify_cookie_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1475 | } executed 185 times by 1 test:  end of blockExecuted by: 
  | 185 | ||||||||||||||||||||||||||||||
| 1476 | - | |||||||||||||||||||||||||||||||
| 1477 | int SSL_SESSION_set1_ticket_appdata(SSL_SESSION *ss, const void *data, size_t len) | - | ||||||||||||||||||||||||||||||
| 1478 | { | - | ||||||||||||||||||||||||||||||
| 1479 | CRYPTO_free(ss->ticket_appdata, __FILE__, 1278); | - | ||||||||||||||||||||||||||||||
| 1480 | ss->ticket_appdata_len = 0; | - | ||||||||||||||||||||||||||||||
| 1481 |     if (data == 
  | 0-29 | ||||||||||||||||||||||||||||||
| 1482 |                ((void *)0)
  | 0-29 | ||||||||||||||||||||||||||||||
| 1483 |                     || len == 0
  | 0-29 | ||||||||||||||||||||||||||||||
| 1484 | ss->ticket_appdata = | - | ||||||||||||||||||||||||||||||
| 1485 | ((void *)0) | - | ||||||||||||||||||||||||||||||
| 1486 | ; | - | ||||||||||||||||||||||||||||||
| 1487 |         return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||||||||
| 1488 | } | - | ||||||||||||||||||||||||||||||
| 1489 | ss->ticket_appdata = CRYPTO_memdup((data), len, __FILE__, 1284); | - | ||||||||||||||||||||||||||||||
| 1490 |     if (ss->ticket_appdata != 
  | 0-29 | ||||||||||||||||||||||||||||||
| 1491 |                              ((void *)0)
  | 0-29 | ||||||||||||||||||||||||||||||
| 1492 | ) { | - | ||||||||||||||||||||||||||||||
| 1493 | ss->ticket_appdata_len = len; | - | ||||||||||||||||||||||||||||||
| 1494 |         return executed 29 times by 1 test:   1;return 1;Executed by: 
 executed 29 times by 1 test:  return 1;Executed by: 
  | 29 | ||||||||||||||||||||||||||||||
| 1495 | } | - | ||||||||||||||||||||||||||||||
| 1496 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||||||||
| 1497 | } | - | ||||||||||||||||||||||||||||||
| 1498 | - | |||||||||||||||||||||||||||||||
| 1499 | int SSL_SESSION_get0_ticket_appdata(SSL_SESSION *ss, void **data, size_t *len) | - | ||||||||||||||||||||||||||||||
| 1500 | { | - | ||||||||||||||||||||||||||||||
| 1501 | *data = ss->ticket_appdata; | - | ||||||||||||||||||||||||||||||
| 1502 | *len = ss->ticket_appdata_len; | - | ||||||||||||||||||||||||||||||
| 1503 |     return executed 1014 times by 1 test:   1;return 1;Executed by: 
 executed 1014 times by 1 test:  return 1;Executed by: 
  | 1014 | ||||||||||||||||||||||||||||||
| 1504 | } | - | ||||||||||||||||||||||||||||||
| 1505 | - | |||||||||||||||||||||||||||||||
| 1506 | void SSL_CTX_set_stateless_cookie_generate_cb( | - | ||||||||||||||||||||||||||||||
| 1507 | SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1508 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||
| 1509 | unsigned char *cookie, | - | ||||||||||||||||||||||||||||||
| 1510 | size_t *cookie_len)) | - | ||||||||||||||||||||||||||||||
| 1511 | { | - | ||||||||||||||||||||||||||||||
| 1512 | ctx->gen_stateless_cookie_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1513 | } executed 177 times by 1 test:  end of blockExecuted by: 
  | 177 | ||||||||||||||||||||||||||||||
| 1514 | - | |||||||||||||||||||||||||||||||
| 1515 | void SSL_CTX_set_stateless_cookie_verify_cb( | - | ||||||||||||||||||||||||||||||
| 1516 | SSL_CTX *ctx, | - | ||||||||||||||||||||||||||||||
| 1517 | int (*cb) (SSL *ssl, | - | ||||||||||||||||||||||||||||||
| 1518 | const unsigned char *cookie, | - | ||||||||||||||||||||||||||||||
| 1519 | size_t cookie_len)) | - | ||||||||||||||||||||||||||||||
| 1520 | { | - | ||||||||||||||||||||||||||||||
| 1521 | ctx->verify_stateless_cookie_cb = cb; | - | ||||||||||||||||||||||||||||||
| 1522 | } executed 177 times by 1 test:  end of blockExecuted by: 
  | 177 | ||||||||||||||||||||||||||||||
| 1523 | - | |||||||||||||||||||||||||||||||
| 1524 | SSL_SESSION *PEM_read_bio_SSL_SESSION(BIO *bp, SSL_SESSION **x, pem_password_cb *cb, void *u){ return executed 31 times by 1 test:   PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",bp,(void **)x,cb,u);return PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",bp,(void **)x,cb,u);Executed by: 
 executed 31 times by 1 test:   } SSL_SESSION *PEM_read_SSL_SESSION(FILE *fp, SSL_SESSION **x, pem_password_cb *cb, void *u){ returnreturn PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",bp,(void **)x,cb,u);Executed by: 
 never executed:   PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",fp,(void **)x,cb,u);return PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",fp,(void **)x,cb,u);never executed:   } int PEM_write_bio_SSL_SESSION(BIO *bp, SSL_SESSION *x) { returnreturn PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS",fp,(void **)x,cb,u);executed 18 times by 1 test:   PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x,return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 0-31 | ||||||||||||||||||||||||||||||
| 1525 | (( executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  void *)0)return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1526 | , executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1527 | (( executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  void *)0)return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1528 | , executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  0,return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1529 | (( executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  void *)0)return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1530 | , executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1531 | (( executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  void *)0)return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
  | 18 | ||||||||||||||||||||||||||||||
| 1532 | ) executed 18 times by 1 test:  return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:  ;return PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 executed 18 times by 1 test:   } int PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x) { returnreturn PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",bp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );Executed by: 
 never executed:   PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x,return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0-18 | ||||||||||||||||||||||||||||||
| 1533 | (( never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  void *)0)return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1534 | , never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1535 | (( never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  void *)0)return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1536 | , never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  0,return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1537 | (( never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  void *)0)return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1538 | , never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1539 | (( never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  void *)0)return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| 1540 | ) never executed:  return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:  ;return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) );never executed:   }return PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,"SSL SESSION PARAMETERS",fp,x, ((void *)0) , ((void *)0) ,0, ((void *)0) , ((void *)0) ); | 0 | ||||||||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |