| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/libressl/src/ssl/ssl_sess.c | 
| Switch to Source code | Preprocessed file | 
| Line | Source | Count | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||||||||||||||
| 2 | - | |||||||||||||||||||||||||
| 3 | - | |||||||||||||||||||||||||
| 4 | - | |||||||||||||||||||||||||
| 5 | - | |||||||||||||||||||||||||
| 6 | static void SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s); | - | ||||||||||||||||||||||||
| 7 | static void SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s); | - | ||||||||||||||||||||||||
| 8 | static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck); | - | ||||||||||||||||||||||||
| 9 | - | |||||||||||||||||||||||||
| 10 | - | |||||||||||||||||||||||||
| 11 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 12 | SSL_get_session(const SSL *ssl) | - | ||||||||||||||||||||||||
| 13 | { | - | ||||||||||||||||||||||||
| 14 |  return never executed:   (ssl->session);return (ssl->session);never executed:  return (ssl->session); | 0 | ||||||||||||||||||||||||
| 15 | } | - | ||||||||||||||||||||||||
| 16 | - | |||||||||||||||||||||||||
| 17 | - | |||||||||||||||||||||||||
| 18 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 19 | SSL_get1_session(SSL *ssl) | - | ||||||||||||||||||||||||
| 20 | { | - | ||||||||||||||||||||||||
| 21 | SSL_SESSION *sess; | - | ||||||||||||||||||||||||
| 22 | - | |||||||||||||||||||||||||
| 23 | - | |||||||||||||||||||||||||
| 24 | - | |||||||||||||||||||||||||
| 25 | - | |||||||||||||||||||||||||
| 26 | - | |||||||||||||||||||||||||
| 27 | - | |||||||||||||||||||||||||
| 28 | CRYPTO_lock(1|8,14,__FILE__,168); | - | ||||||||||||||||||||||||
| 29 | sess = ssl->session; | - | ||||||||||||||||||||||||
| 30 |  if (sess
  | 0 | ||||||||||||||||||||||||
| 31 |   sess->references++; never executed:  sess->references++; | 0 | ||||||||||||||||||||||||
| 32 | CRYPTO_lock(2|8,14,__FILE__,172); | - | ||||||||||||||||||||||||
| 33 | - | |||||||||||||||||||||||||
| 34 |  return never executed:   (sess);return (sess);never executed:  return (sess); | 0 | ||||||||||||||||||||||||
| 35 | } | - | ||||||||||||||||||||||||
| 36 | - | |||||||||||||||||||||||||
| 37 | int | - | ||||||||||||||||||||||||
| 38 | SSL_SESSION_get_ex_new_index(long argl, void *argp, CRYPTO_EX_new *new_func, | - | ||||||||||||||||||||||||
| 39 | CRYPTO_EX_dup *dup_func, CRYPTO_EX_free *free_func) | - | ||||||||||||||||||||||||
| 40 | { | - | ||||||||||||||||||||||||
| 41 |  return never executed:   CRYPTO_get_ex_new_index(3,return CRYPTO_get_ex_new_index(3, argl, argp, new_func, dup_func, free_func);never executed:  return CRYPTO_get_ex_new_index(3, argl, argp, new_func, dup_func, free_func); | 0 | ||||||||||||||||||||||||
| 42 |      argl, argp, new_func, dup_func, free_func); never executed:  return CRYPTO_get_ex_new_index(3, argl, argp, new_func, dup_func, free_func); | 0 | ||||||||||||||||||||||||
| 43 | } | - | ||||||||||||||||||||||||
| 44 | - | |||||||||||||||||||||||||
| 45 | int | - | ||||||||||||||||||||||||
| 46 | SSL_SESSION_set_ex_data(SSL_SESSION *s, int idx, void *arg) | - | ||||||||||||||||||||||||
| 47 | { | - | ||||||||||||||||||||||||
| 48 |  return never executed:   (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg));never executed:  return (CRYPTO_set_ex_data(&s->internal->ex_data, idx, arg)); | 0 | ||||||||||||||||||||||||
| 49 | } | - | ||||||||||||||||||||||||
| 50 | - | |||||||||||||||||||||||||
| 51 | void * | - | ||||||||||||||||||||||||
| 52 | SSL_SESSION_get_ex_data(const SSL_SESSION *s, int idx) | - | ||||||||||||||||||||||||
| 53 | { | - | ||||||||||||||||||||||||
| 54 |  return never executed:   (CRYPTO_get_ex_data(&s->internal->ex_data, idx));return (CRYPTO_get_ex_data(&s->internal->ex_data, idx));never executed:  return (CRYPTO_get_ex_data(&s->internal->ex_data, idx)); | 0 | ||||||||||||||||||||||||
| 55 | } | - | ||||||||||||||||||||||||
| 56 | - | |||||||||||||||||||||||||
| 57 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 58 | SSL_SESSION_new(void) | - | ||||||||||||||||||||||||
| 59 | { | - | ||||||||||||||||||||||||
| 60 | SSL_SESSION *ss; | - | ||||||||||||||||||||||||
| 61 | - | |||||||||||||||||||||||||
| 62 |  if (!OPENSSL_init_ssl(0, 
  | 0-157 | ||||||||||||||||||||||||
| 63 |                          ((void *)0)
  | 0-157 | ||||||||||||||||||||||||
| 64 |                              )
  | 0-157 | ||||||||||||||||||||||||
| 65 | ERR_put_error(20,(0xfff),(274),__FILE__,203); | - | ||||||||||||||||||||||||
| 66 |   return never executed:  (return( ((void *)0) );never executed:  return( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 67 |         ((void *)0) never executed:  return( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 68 |             ); never executed:  return( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 69 | } | - | ||||||||||||||||||||||||
| 70 | - | |||||||||||||||||||||||||
| 71 |  if ((
 
  | 0-157 | ||||||||||||||||||||||||
| 72 |                                      ((void *)0)
  | 0-157 | ||||||||||||||||||||||||
| 73 | ) { | - | ||||||||||||||||||||||||
| 74 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,208); | - | ||||||||||||||||||||||||
| 75 |   return never executed:   (return ( ((void *)0) );never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 76 |          ((void *)0) never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 77 |              ); never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 78 | } | - | ||||||||||||||||||||||||
| 79 |  if ((
 
  | 0-157 | ||||||||||||||||||||||||
| 80 |                                                          ((void *)0)
  | 0-157 | ||||||||||||||||||||||||
| 81 | ) { | - | ||||||||||||||||||||||||
| 82 | free(ss); | - | ||||||||||||||||||||||||
| 83 | ERR_put_error(20,(0xfff),((1|64)),__FILE__,213); | - | ||||||||||||||||||||||||
| 84 |   return never executed:   (return ( ((void *)0) );never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 85 |          ((void *)0) never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 86 |              ); never executed:  return ( ((void *)0) ); | 0 | ||||||||||||||||||||||||
| 87 | } | - | ||||||||||||||||||||||||
| 88 | - | |||||||||||||||||||||||||
| 89 | ss->verify_result = 1; | - | ||||||||||||||||||||||||
| 90 | ss->references = 1; | - | ||||||||||||||||||||||||
| 91 | ss->timeout=60*5+4; | - | ||||||||||||||||||||||||
| 92 | ss->time = time( | - | ||||||||||||||||||||||||
| 93 | ((void *)0) | - | ||||||||||||||||||||||||
| 94 | ); | - | ||||||||||||||||||||||||
| 95 | ss->internal->prev = | - | ||||||||||||||||||||||||
| 96 | ((void *)0) | - | ||||||||||||||||||||||||
| 97 | ; | - | ||||||||||||||||||||||||
| 98 | ss->internal->next = | - | ||||||||||||||||||||||||
| 99 | ((void *)0) | - | ||||||||||||||||||||||||
| 100 | ; | - | ||||||||||||||||||||||||
| 101 | ss->tlsext_hostname = | - | ||||||||||||||||||||||||
| 102 | ((void *)0) | - | ||||||||||||||||||||||||
| 103 | ; | - | ||||||||||||||||||||||||
| 104 | - | |||||||||||||||||||||||||
| 105 | ss->internal->tlsext_ecpointformatlist_length = 0; | - | ||||||||||||||||||||||||
| 106 | ss->internal->tlsext_ecpointformatlist = | - | ||||||||||||||||||||||||
| 107 | ((void *)0) | - | ||||||||||||||||||||||||
| 108 | ; | - | ||||||||||||||||||||||||
| 109 | ss->internal->tlsext_supportedgroups_length = 0; | - | ||||||||||||||||||||||||
| 110 | ss->internal->tlsext_supportedgroups = | - | ||||||||||||||||||||||||
| 111 | ((void *)0) | - | ||||||||||||||||||||||||
| 112 | ; | - | ||||||||||||||||||||||||
| 113 | - | |||||||||||||||||||||||||
| 114 | CRYPTO_new_ex_data(3, ss, &ss->internal->ex_data); | - | ||||||||||||||||||||||||
| 115 | - | |||||||||||||||||||||||||
| 116 |  return executed 157 times by 5 tests:   (ss);return (ss);Executed by: 
 executed 157 times by 5 tests:  return (ss);Executed by: 
  | 157 | ||||||||||||||||||||||||
| 117 | } | - | ||||||||||||||||||||||||
| 118 | - | |||||||||||||||||||||||||
| 119 | const unsigned char * | - | ||||||||||||||||||||||||
| 120 | SSL_SESSION_get_id(const SSL_SESSION *ss, unsigned int *len) | - | ||||||||||||||||||||||||
| 121 | { | - | ||||||||||||||||||||||||
| 122 |  if (len != 
  | 0 | ||||||||||||||||||||||||
| 123 |            ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 124 | ) | - | ||||||||||||||||||||||||
| 125 |   * never executed:  len = ss->session_id_length;*len = ss->session_id_length;never executed:  *len = ss->session_id_length; | 0 | ||||||||||||||||||||||||
| 126 |  return never executed:   ss->session_id;return ss->session_id;never executed:  return ss->session_id; | 0 | ||||||||||||||||||||||||
| 127 | } | - | ||||||||||||||||||||||||
| 128 | - | |||||||||||||||||||||||||
| 129 | const unsigned char * | - | ||||||||||||||||||||||||
| 130 | SSL_SESSION_get0_id_context(const SSL_SESSION *ss, unsigned int *len) | - | ||||||||||||||||||||||||
| 131 | { | - | ||||||||||||||||||||||||
| 132 |  if (len != 
  | 0 | ||||||||||||||||||||||||
| 133 |            ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 134 | ) | - | ||||||||||||||||||||||||
| 135 |   * never executed:  len = (unsigned int)ss->sid_ctx_length;*len = (unsigned int)ss->sid_ctx_length;never executed:  *len = (unsigned int)ss->sid_ctx_length; | 0 | ||||||||||||||||||||||||
| 136 |  return never executed:   ss->sid_ctx;return ss->sid_ctx;never executed:  return ss->sid_ctx; | 0 | ||||||||||||||||||||||||
| 137 | } | - | ||||||||||||||||||||||||
| 138 | - | |||||||||||||||||||||||||
| 139 | unsigned int | - | ||||||||||||||||||||||||
| 140 | SSL_SESSION_get_compress_id(const SSL_SESSION *ss) | - | ||||||||||||||||||||||||
| 141 | { | - | ||||||||||||||||||||||||
| 142 |  return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 143 | } | - | ||||||||||||||||||||||||
| 144 | - | |||||||||||||||||||||||||
| 145 | unsigned long | - | ||||||||||||||||||||||||
| 146 | SSL_SESSION_get_ticket_lifetime_hint(const SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 147 | { | - | ||||||||||||||||||||||||
| 148 |  return never executed:   s->tlsext_tick_lifetime_hint;return s->tlsext_tick_lifetime_hint;never executed:  return s->tlsext_tick_lifetime_hint; | 0 | ||||||||||||||||||||||||
| 149 | } | - | ||||||||||||||||||||||||
| 150 | - | |||||||||||||||||||||||||
| 151 | int | - | ||||||||||||||||||||||||
| 152 | SSL_SESSION_has_ticket(const SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 153 | { | - | ||||||||||||||||||||||||
| 154 |  return never executed:   (return (s->tlsext_ticklen > 0) ? 1 : 0;
 
 never executed:  return (s->tlsext_ticklen > 0) ? 1 : 0; | 0 | ||||||||||||||||||||||||
| 155 | } | - | ||||||||||||||||||||||||
| 156 | static int | - | ||||||||||||||||||||||||
| 157 | def_generate_session_id(const SSL *ssl, unsigned char *id, unsigned int *id_len) | - | ||||||||||||||||||||||||
| 158 | { | - | ||||||||||||||||||||||||
| 159 | unsigned int retry = 0; | - | ||||||||||||||||||||||||
| 160 | - | |||||||||||||||||||||||||
| 161 | do { | - | ||||||||||||||||||||||||
| 162 | arc4random_buf(id, *id_len); | - | ||||||||||||||||||||||||
| 163 |  } executed 6 times by 2 tests:   while (SSL_has_matching_session_id(ssl, id, *id_len)end of blockExecuted by: 
 
  | 0-6 | ||||||||||||||||||||||||
| 164 |      (++
 
  | 0 | ||||||||||||||||||||||||
| 165 | - | |||||||||||||||||||||||||
| 166 |  if (retry < 10
  | 0-6 | ||||||||||||||||||||||||
| 167 |   return executed 6 times by 2 tests:   1;return 1;Executed by: 
 executed 6 times by 2 tests:  return 1;Executed by: 
  | 6 | ||||||||||||||||||||||||
| 168 |  return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 169 | } | - | ||||||||||||||||||||||||
| 170 | - | |||||||||||||||||||||||||
| 171 | int | - | ||||||||||||||||||||||||
| 172 | ssl_get_new_session(SSL *s, int session) | - | ||||||||||||||||||||||||
| 173 | { | - | ||||||||||||||||||||||||
| 174 | unsigned int tmp; | - | ||||||||||||||||||||||||
| 175 | SSL_SESSION *ss = | - | ||||||||||||||||||||||||
| 176 | ((void *)0) | - | ||||||||||||||||||||||||
| 177 | ; | - | ||||||||||||||||||||||||
| 178 | GEN_SESSION_CB cb = def_generate_session_id; | - | ||||||||||||||||||||||||
| 179 | - | |||||||||||||||||||||||||
| 180 | - | |||||||||||||||||||||||||
| 181 | - | |||||||||||||||||||||||||
| 182 |  if ((
 
  | 0-139 | ||||||||||||||||||||||||
| 183 |                                 ((void *)0)
  | 0-139 | ||||||||||||||||||||||||
| 184 | ) | - | ||||||||||||||||||||||||
| 185 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 186 | - | |||||||||||||||||||||||||
| 187 | - | |||||||||||||||||||||||||
| 188 |  if (s->initial_ctx->session_timeout == 0
  | 0-139 | ||||||||||||||||||||||||
| 189 |   ss->timeout = SSL_get_default_timeout(s); never executed:  ss->timeout = SSL_get_default_timeout(s); | 0 | ||||||||||||||||||||||||
| 190 | else | - | ||||||||||||||||||||||||
| 191 |   ss->timeout = s->initial_ctx->session_timeout; executed 139 times by 4 tests:  ss->timeout = s->initial_ctx->session_timeout;Executed by: 
  | 139 | ||||||||||||||||||||||||
| 192 | - | |||||||||||||||||||||||||
| 193 |  if (s->session != 
  | 9-130 | ||||||||||||||||||||||||
| 194 |                   ((void *)0)
  | 9-130 | ||||||||||||||||||||||||
| 195 | ) { | - | ||||||||||||||||||||||||
| 196 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||
| 197 | s->session = | - | ||||||||||||||||||||||||
| 198 | ((void *)0) | - | ||||||||||||||||||||||||
| 199 | ; | - | ||||||||||||||||||||||||
| 200 |  } executed 9 times by 1 test:  end of blockExecuted by: 
  | 9 | ||||||||||||||||||||||||
| 201 | - | |||||||||||||||||||||||||
| 202 |  if (session
  | 65-74 | ||||||||||||||||||||||||
| 203 | switch (s->version) { | - | ||||||||||||||||||||||||
| 204 |   case executed 19 times by 2 tests:   0x0301:case 0x0301:Executed by: 
 executed 19 times by 2 tests:  case 0x0301:Executed by: 
  | 19 | ||||||||||||||||||||||||
| 205 |   case never executed:   0x0302:case 0x0302:never executed:  case 0x0302: | 0 | ||||||||||||||||||||||||
| 206 |   case executed 35 times by 3 tests:   0x0303:case 0x0303:Executed by: 
 executed 35 times by 3 tests:  case 0x0303:Executed by: 
  | 35 | ||||||||||||||||||||||||
| 207 |   case executed 11 times by 1 test:   0xFEFF:case 0xFEFF:Executed by: 
 executed 11 times by 1 test:  case 0xFEFF:Executed by: 
  | 11 | ||||||||||||||||||||||||
| 208 | ss->ssl_version = s->version; | - | ||||||||||||||||||||||||
| 209 | ss->session_id_length = 32; | - | ||||||||||||||||||||||||
| 210 |    break; executed 65 times by 3 tests:  break;Executed by: 
  | 65 | ||||||||||||||||||||||||
| 211 |   default never executed:  :default:never executed:  default: | 0 | ||||||||||||||||||||||||
| 212 | SSL_error_internal(s, 259, __FILE__, 340); | - | ||||||||||||||||||||||||
| 213 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 214 |    return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 215 | } | - | ||||||||||||||||||||||||
| 216 | - | |||||||||||||||||||||||||
| 217 | - | |||||||||||||||||||||||||
| 218 |   if (s->internal->tlsext_ticket_expected
  | 6-59 | ||||||||||||||||||||||||
| 219 | ss->session_id_length = 0; | - | ||||||||||||||||||||||||
| 220 |    goto executed 59 times by 1 test:   sess_id_done;goto sess_id_done;Executed by: 
 executed 59 times by 1 test:  goto sess_id_done;Executed by: 
  | 59 | ||||||||||||||||||||||||
| 221 | } | - | ||||||||||||||||||||||||
| 222 | - | |||||||||||||||||||||||||
| 223 | - | |||||||||||||||||||||||||
| 224 | CRYPTO_lock(1|4,12,__FILE__,352); | - | ||||||||||||||||||||||||
| 225 |   if (s->internal->generate_session_id
  | 0-6 | ||||||||||||||||||||||||
| 226 |    cb = s->internal->generate_session_id; never executed:  cb = s->internal->generate_session_id; | 0 | ||||||||||||||||||||||||
| 227 |   else if (s->initial_ctx->internal->generate_session_id
  | 0-6 | ||||||||||||||||||||||||
| 228 |    cb = s->initial_ctx->internal->generate_session_id; never executed:  cb = s->initial_ctx->internal->generate_session_id; | 0 | ||||||||||||||||||||||||
| 229 | CRYPTO_lock(2|4,12,__FILE__,357); | - | ||||||||||||||||||||||||
| 230 | - | |||||||||||||||||||||||||
| 231 | - | |||||||||||||||||||||||||
| 232 | tmp = ss->session_id_length; | - | ||||||||||||||||||||||||
| 233 |   if (!cb(s, ss->session_id, &tmp)
  | 0-6 | ||||||||||||||||||||||||
| 234 | - | |||||||||||||||||||||||||
| 235 | SSL_error_internal(s, 301, __FILE__, 363); | - | ||||||||||||||||||||||||
| 236 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 237 |    return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 238 | } | - | ||||||||||||||||||||||||
| 239 | - | |||||||||||||||||||||||||
| 240 | - | |||||||||||||||||||||||||
| 241 | - | |||||||||||||||||||||||||
| 242 | - | |||||||||||||||||||||||||
| 243 | - | |||||||||||||||||||||||||
| 244 |   if (!tmp
 
 
  | 0-6 | ||||||||||||||||||||||||
| 245 | - | |||||||||||||||||||||||||
| 246 | SSL_error_internal(s, 303, __FILE__, 374); | - | ||||||||||||||||||||||||
| 247 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 248 |    return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 249 | } | - | ||||||||||||||||||||||||
| 250 | ss->session_id_length = tmp; | - | ||||||||||||||||||||||||
| 251 | - | |||||||||||||||||||||||||
| 252 | - | |||||||||||||||||||||||||
| 253 |   if (SSL_has_matching_session_id(s, ss->session_id,
  | 0-6 | ||||||||||||||||||||||||
| 254 |    ss->session_id_length)
  | 0-6 | ||||||||||||||||||||||||
| 255 | SSL_error_internal(s, 302, __FILE__, 383); | - | ||||||||||||||||||||||||
| 256 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 257 |    return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 258 | } | - | ||||||||||||||||||||||||
| 259 | - | |||||||||||||||||||||||||
| 260 | sess_id_done: code before this statement executed 6 times by 2 tests:  sess_id_done:Executed by: 
  | 6 | ||||||||||||||||||||||||
| 261 |   if (s->tlsext_hostname
  | 0-65 | ||||||||||||||||||||||||
| 262 | ss->tlsext_hostname = | - | ||||||||||||||||||||||||
| 263 |                         (__extension__ (__builtin_constant_p (
  | 0 | ||||||||||||||||||||||||
| 264 |                         s->tlsext_hostname
  | 0 | ||||||||||||||||||||||||
| 265 |                         )
 
 
  | 0 | ||||||||||||||||||||||||
| 266 |                         s->tlsext_hostname
  | 0 | ||||||||||||||||||||||||
| 267 |                         ) + 1) - (size_t)(const void *)(
  | 0 | ||||||||||||||||||||||||
| 268 |                         s->tlsext_hostname
  | 0 | ||||||||||||||||||||||||
| 269 |                         ) == 1)
 
 
  | 0 | ||||||||||||||||||||||||
| 270 |                         s->tlsext_hostname
  | 0 | ||||||||||||||||||||||||
| 271 |                         ))[0] == '\0'
  | 0 | ||||||||||||||||||||||||
| 272 | s->tlsext_hostname | - | ||||||||||||||||||||||||
| 273 |                         ) + 1; char *__retval = (char *) malloc (__len); if (__retval != ((void *)0)
 never executed:  __retval = (char *) memcpy (__retval, s->tlsext_hostname , __len); | 0 | ||||||||||||||||||||||||
| 274 |                         s->tlsext_hostname never executed:  __retval = (char *) memcpy (__retval, s->tlsext_hostname , __len); | 0 | ||||||||||||||||||||||||
| 275 |                         , __len); never executed:   __retval; })) : __strdup (__retval = (char *) memcpy (__retval, s->tlsext_hostname , __len); | 0 | ||||||||||||||||||||||||
| 276 | s->tlsext_hostname | - | ||||||||||||||||||||||||
| 277 | ))) | - | ||||||||||||||||||||||||
| 278 | ; | - | ||||||||||||||||||||||||
| 279 |    if (ss->tlsext_hostname == 
  | 0 | ||||||||||||||||||||||||
| 280 |                              ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 281 | ) { | - | ||||||||||||||||||||||||
| 282 | SSL_error_internal(s, (4|64), __FILE__, 392); | - | ||||||||||||||||||||||||
| 283 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 284 |     return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 285 | } | - | ||||||||||||||||||||||||
| 286 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 287 |  } executed 65 times by 3 tests:   else {end of blockExecuted by: 
  | 65 | ||||||||||||||||||||||||
| 288 | ss->session_id_length = 0; | - | ||||||||||||||||||||||||
| 289 |  } executed 74 times by 3 tests:  end of blockExecuted by: 
  | 74 | ||||||||||||||||||||||||
| 290 | - | |||||||||||||||||||||||||
| 291 |  if (s->sid_ctx_length > sizeof ss->sid_ctx
  | 0-139 | ||||||||||||||||||||||||
| 292 | SSL_error_internal(s, (4|64), __FILE__, 402); | - | ||||||||||||||||||||||||
| 293 | SSL_SESSION_free(ss); | - | ||||||||||||||||||||||||
| 294 |   return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 295 | } | - | ||||||||||||||||||||||||
| 296 | - | |||||||||||||||||||||||||
| 297 | memcpy(ss->sid_ctx, s->sid_ctx, s->sid_ctx_length); | - | ||||||||||||||||||||||||
| 298 | ss->sid_ctx_length = s->sid_ctx_length; | - | ||||||||||||||||||||||||
| 299 | s->session = ss; | - | ||||||||||||||||||||||||
| 300 | ss->ssl_version = s->version; | - | ||||||||||||||||||||||||
| 301 | ss->verify_result = 0; | - | ||||||||||||||||||||||||
| 302 | - | |||||||||||||||||||||||||
| 303 |  return executed 139 times by 4 tests:   (1);return (1);Executed by: 
 executed 139 times by 4 tests:  return (1);Executed by: 
  | 139 | ||||||||||||||||||||||||
| 304 | } | - | ||||||||||||||||||||||||
| 305 | int | - | ||||||||||||||||||||||||
| 306 | ssl_get_prev_session(SSL *s, const unsigned char *session_id, | - | ||||||||||||||||||||||||
| 307 | int session_id_len, CBS *ext_block) | - | ||||||||||||||||||||||||
| 308 | { | - | ||||||||||||||||||||||||
| 309 | SSL_SESSION *ret = | - | ||||||||||||||||||||||||
| 310 | ((void *)0) | - | ||||||||||||||||||||||||
| 311 | ; | - | ||||||||||||||||||||||||
| 312 | int fatal = 0; | - | ||||||||||||||||||||||||
| 313 | int try_session_cache = 1; | - | ||||||||||||||||||||||||
| 314 | int r; | - | ||||||||||||||||||||||||
| 315 | - | |||||||||||||||||||||||||
| 316 | - | |||||||||||||||||||||||||
| 317 | - | |||||||||||||||||||||||||
| 318 |  if (session_id_len > 32
  | 0-65 | ||||||||||||||||||||||||
| 319 |   goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 320 | - | |||||||||||||||||||||||||
| 321 |  if (session_id_len == 0
  | 0-65 | ||||||||||||||||||||||||
| 322 |   try_session_cache = 0; executed 65 times by 3 tests:  try_session_cache = 0;Executed by: 
  | 65 | ||||||||||||||||||||||||
| 323 | - | |||||||||||||||||||||||||
| 324 | - | |||||||||||||||||||||||||
| 325 | r = tls1_process_ticket(s, session_id, session_id_len, ext_block, &ret); | - | ||||||||||||||||||||||||
| 326 | switch (r) { | - | ||||||||||||||||||||||||
| 327 |  case never executed:   -1:case -1:never executed:  case -1: | 0 | ||||||||||||||||||||||||
| 328 | fatal = 1; | - | ||||||||||||||||||||||||
| 329 |   goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 330 |  case executed 6 times by 2 tests:   0:case 0:Executed by: 
 executed 6 times by 2 tests:  case 0:Executed by: 
  | 6 | ||||||||||||||||||||||||
| 331 |  case executed 59 times by 1 test:   1:case 1:Executed by: 
 executed 59 times by 1 test:  case 1:Executed by: 
  | 59 | ||||||||||||||||||||||||
| 332 |   break; executed 65 times by 3 tests:  break;Executed by: 
  | 65 | ||||||||||||||||||||||||
| 333 |  case never executed:   2:case 2:never executed:  case 2: | 0 | ||||||||||||||||||||||||
| 334 |  case never executed:   3:case 3:never executed:  case 3: | 0 | ||||||||||||||||||||||||
| 335 | try_session_cache = 0; | - | ||||||||||||||||||||||||
| 336 |   break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 337 |  default never executed:  :default:never executed:  default: | 0 | ||||||||||||||||||||||||
| 338 |   abort(); never executed:  abort(); | 0 | ||||||||||||||||||||||||
| 339 | } | - | ||||||||||||||||||||||||
| 340 | - | |||||||||||||||||||||||||
| 341 |  if (try_session_cache
 
  | 0-65 | ||||||||||||||||||||||||
| 342 |                                 ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 343 | && | - | ||||||||||||||||||||||||
| 344 |      !(s->initial_ctx->internal->session_cache_mode &
  | 0 | ||||||||||||||||||||||||
| 345 |       0x0100)
  | 0 | ||||||||||||||||||||||||
| 346 | SSL_SESSION data; | - | ||||||||||||||||||||||||
| 347 | data.ssl_version = s->version; | - | ||||||||||||||||||||||||
| 348 | data.session_id_length = session_id_len; | - | ||||||||||||||||||||||||
| 349 | memcpy(data.session_id, session_id, session_id_len); | - | ||||||||||||||||||||||||
| 350 | - | |||||||||||||||||||||||||
| 351 | CRYPTO_lock(1|4,12,__FILE__,479); | - | ||||||||||||||||||||||||
| 352 | ret = ((SSL_SESSION *)lh_retrieve(((_LHASH *)((void*) (1 ? s->initial_ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0))), ((void*) (1 ? &data : (SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||
| 353 |   if (ret != 
  | 0 | ||||||||||||||||||||||||
| 354 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 355 | ) { | - | ||||||||||||||||||||||||
| 356 | - | |||||||||||||||||||||||||
| 357 | CRYPTO_add_lock(&ret->references,1,14, | - | ||||||||||||||||||||||||
| 358 | __FILE__ | - | ||||||||||||||||||||||||
| 359 | , | - | ||||||||||||||||||||||||
| 360 | 484 | - | ||||||||||||||||||||||||
| 361 | ) | - | ||||||||||||||||||||||||
| 362 | ; | - | ||||||||||||||||||||||||
| 363 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 364 | CRYPTO_lock(2|4,12,__FILE__,486); | - | ||||||||||||||||||||||||
| 365 | - | |||||||||||||||||||||||||
| 366 |   if (ret == 
  | 0 | ||||||||||||||||||||||||
| 367 |             ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 368 | ) | - | ||||||||||||||||||||||||
| 369 |    s->initial_ctx->internal->stats.sess_miss++; never executed:  s->initial_ctx->internal->stats.sess_miss++; | 0 | ||||||||||||||||||||||||
| 370 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 371 | - | |||||||||||||||||||||||||
| 372 |  if (try_session_cache
 
  | 0-65 | ||||||||||||||||||||||||
| 373 |                                 ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 374 | && | - | ||||||||||||||||||||||||
| 375 |      s->initial_ctx->internal->get_session_cb != 
  | 0 | ||||||||||||||||||||||||
| 376 |                                                 ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 377 | ) { | - | ||||||||||||||||||||||||
| 378 | int copy = 1; | - | ||||||||||||||||||||||||
| 379 | - | |||||||||||||||||||||||||
| 380 |   if ((
 
  | 0 | ||||||||||||||||||||||||
| 381 |       session_id, session_id_len, ©))
  | 0 | ||||||||||||||||||||||||
| 382 | s->initial_ctx->internal->stats.sess_cb_hit++; | - | ||||||||||||||||||||||||
| 383 |    if (copy
  | 0 | ||||||||||||||||||||||||
| 384 |     CRYPTO_add_lock(&ret->references,1,14, never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 385 |                                __FILE__ never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 386 |     , never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 387 |                                510 never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 388 |     ) never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 389 |                                 ; never executed:  CRYPTO_add_lock(&ret->references,1,14, __FILE__ , 510 ) ; | 0 | ||||||||||||||||||||||||
| 390 | - | |||||||||||||||||||||||||
| 391 | - | |||||||||||||||||||||||||
| 392 | - | |||||||||||||||||||||||||
| 393 | - | |||||||||||||||||||||||||
| 394 | - | |||||||||||||||||||||||||
| 395 |    if (!(s->initial_ctx->internal->session_cache_mode &
  | 0 | ||||||||||||||||||||||||
| 396 |        0x0200)
  | 0 | ||||||||||||||||||||||||
| 397 | - | |||||||||||||||||||||||||
| 398 | - | |||||||||||||||||||||||||
| 399 | - | |||||||||||||||||||||||||
| 400 | - | |||||||||||||||||||||||||
| 401 |     SSL_CTX_add_session(s->initial_ctx, ret); never executed:  SSL_CTX_add_session(s->initial_ctx, ret); | 0 | ||||||||||||||||||||||||
| 402 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 403 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 404 | - | |||||||||||||||||||||||||
| 405 |  if (ret == 
  | 0-65 | ||||||||||||||||||||||||
| 406 |            ((void *)0)
  | 0-65 | ||||||||||||||||||||||||
| 407 | ) | - | ||||||||||||||||||||||||
| 408 |   goto executed 65 times by 3 tests:   err;goto err;Executed by: 
 executed 65 times by 3 tests:  goto err;Executed by: 
  | 65 | ||||||||||||||||||||||||
| 409 | - | |||||||||||||||||||||||||
| 410 | - | |||||||||||||||||||||||||
| 411 | - | |||||||||||||||||||||||||
| 412 |  if (ret->sid_ctx_length != s->sid_ctx_length
  | 0 | ||||||||||||||||||||||||
| 413 |      timingsafe_memcmp(ret->sid_ctx,
  | 0 | ||||||||||||||||||||||||
| 414 |   s->sid_ctx, ret->sid_ctx_length) != 0
  | 0 | ||||||||||||||||||||||||
| 415 | - | |||||||||||||||||||||||||
| 416 | - | |||||||||||||||||||||||||
| 417 |   goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 418 | } | - | ||||||||||||||||||||||||
| 419 | - | |||||||||||||||||||||||||
| 420 |  if ((
 
 
  | 0 | ||||||||||||||||||||||||
| 421 | SSL_error_internal(s, 277, __FILE__, 551); | - | ||||||||||||||||||||||||
| 422 | fatal = 1; | - | ||||||||||||||||||||||||
| 423 |   goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 424 | } | - | ||||||||||||||||||||||||
| 425 | - | |||||||||||||||||||||||||
| 426 |  if (ret->cipher == 
  | 0 | ||||||||||||||||||||||||
| 427 |                    ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 428 | ) { | - | ||||||||||||||||||||||||
| 429 | ret->cipher = ssl3_get_cipher_by_id(ret->cipher_id); | - | ||||||||||||||||||||||||
| 430 |   if (ret->cipher == 
  | 0 | ||||||||||||||||||||||||
| 431 |                     ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 432 | ) | - | ||||||||||||||||||||||||
| 433 |    goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 434 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 435 | - | |||||||||||||||||||||||||
| 436 |  if (ret->timeout < (time(
  | 0 | ||||||||||||||||||||||||
| 437 |                          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 438 |                              ) - ret->time)
  | 0 | ||||||||||||||||||||||||
| 439 | - | |||||||||||||||||||||||||
| 440 | s->initial_ctx->internal->stats.sess_timeout++; | - | ||||||||||||||||||||||||
| 441 |   if (try_session_cache
  | 0 | ||||||||||||||||||||||||
| 442 | - | |||||||||||||||||||||||||
| 443 | SSL_CTX_remove_session(s->initial_ctx, ret); | - | ||||||||||||||||||||||||
| 444 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 445 |   goto never executed:   err;goto err;never executed:  goto err; | 0 | ||||||||||||||||||||||||
| 446 | } | - | ||||||||||||||||||||||||
| 447 | - | |||||||||||||||||||||||||
| 448 | s->initial_ctx->internal->stats.sess_hit++; | - | ||||||||||||||||||||||||
| 449 | - | |||||||||||||||||||||||||
| 450 |  if (s->session != 
  | 0 | ||||||||||||||||||||||||
| 451 |                   ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 452 | ) | - | ||||||||||||||||||||||||
| 453 |   SSL_SESSION_free(s->session); never executed:  SSL_SESSION_free(s->session); | 0 | ||||||||||||||||||||||||
| 454 | s->session = ret; | - | ||||||||||||||||||||||||
| 455 | s->verify_result = s->session->verify_result; | - | ||||||||||||||||||||||||
| 456 |  return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||
| 457 | - | |||||||||||||||||||||||||
| 458 | err: | - | ||||||||||||||||||||||||
| 459 |  if (ret != 
  | 0-65 | ||||||||||||||||||||||||
| 460 |            ((void *)0)
  | 0-65 | ||||||||||||||||||||||||
| 461 | ) { | - | ||||||||||||||||||||||||
| 462 | SSL_SESSION_free(ret); | - | ||||||||||||||||||||||||
| 463 |   if (!try_session_cache
  | 0 | ||||||||||||||||||||||||
| 464 | - | |||||||||||||||||||||||||
| 465 | - | |||||||||||||||||||||||||
| 466 | - | |||||||||||||||||||||||||
| 467 | - | |||||||||||||||||||||||||
| 468 | s->internal->tlsext_ticket_expected = 1; | - | ||||||||||||||||||||||||
| 469 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 470 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 471 |  if (fatal
  | 0-65 | ||||||||||||||||||||||||
| 472 |   return never executed:   -1;return -1;never executed:  return -1; | 0 | ||||||||||||||||||||||||
| 473 | else | - | ||||||||||||||||||||||||
| 474 |   return executed 65 times by 3 tests:   0;return 0;Executed by: 
 executed 65 times by 3 tests:  return 0;Executed by: 
  | 65 | ||||||||||||||||||||||||
| 475 | } | - | ||||||||||||||||||||||||
| 476 | - | |||||||||||||||||||||||||
| 477 | int | - | ||||||||||||||||||||||||
| 478 | SSL_CTX_add_session(SSL_CTX *ctx, SSL_SESSION *c) | - | ||||||||||||||||||||||||
| 479 | { | - | ||||||||||||||||||||||||
| 480 | int ret = 0; | - | ||||||||||||||||||||||||
| 481 | SSL_SESSION *s; | - | ||||||||||||||||||||||||
| 482 | - | |||||||||||||||||||||||||
| 483 | - | |||||||||||||||||||||||||
| 484 | - | |||||||||||||||||||||||||
| 485 | - | |||||||||||||||||||||||||
| 486 | - | |||||||||||||||||||||||||
| 487 | - | |||||||||||||||||||||||||
| 488 | CRYPTO_add_lock(&c->references,1,14,__FILE__,608); | - | ||||||||||||||||||||||||
| 489 | - | |||||||||||||||||||||||||
| 490 | - | |||||||||||||||||||||||||
| 491 | - | |||||||||||||||||||||||||
| 492 | - | |||||||||||||||||||||||||
| 493 | - | |||||||||||||||||||||||||
| 494 | CRYPTO_lock(1|8,12,__FILE__,614); | - | ||||||||||||||||||||||||
| 495 | s = ((SSL_SESSION *)lh_insert(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0))), ((void*) (1 ? c : (SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||
| 496 | - | |||||||||||||||||||||||||
| 497 | - | |||||||||||||||||||||||||
| 498 | - | |||||||||||||||||||||||||
| 499 | - | |||||||||||||||||||||||||
| 500 | - | |||||||||||||||||||||||||
| 501 | - | |||||||||||||||||||||||||
| 502 |  if (s != 
  | 0 | ||||||||||||||||||||||||
| 503 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 504 |               && s != c
  | 0 | ||||||||||||||||||||||||
| 505 | - | |||||||||||||||||||||||||
| 506 | SSL_SESSION_list_remove(ctx, s); | - | ||||||||||||||||||||||||
| 507 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||
| 508 | - | |||||||||||||||||||||||||
| 509 | - | |||||||||||||||||||||||||
| 510 | - | |||||||||||||||||||||||||
| 511 | - | |||||||||||||||||||||||||
| 512 | - | |||||||||||||||||||||||||
| 513 | - | |||||||||||||||||||||||||
| 514 | - | |||||||||||||||||||||||||
| 515 | s = | - | ||||||||||||||||||||||||
| 516 | ((void *)0) | - | ||||||||||||||||||||||||
| 517 | ; | - | ||||||||||||||||||||||||
| 518 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 519 | - | |||||||||||||||||||||||||
| 520 | - | |||||||||||||||||||||||||
| 521 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 522 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 523 | ) | - | ||||||||||||||||||||||||
| 524 |   SSL_SESSION_list_add(ctx, c); never executed:  SSL_SESSION_list_add(ctx, c); | 0 | ||||||||||||||||||||||||
| 525 | - | |||||||||||||||||||||||||
| 526 |  if (s != 
  | 0 | ||||||||||||||||||||||||
| 527 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 528 | ) { | - | ||||||||||||||||||||||||
| 529 | - | |||||||||||||||||||||||||
| 530 | - | |||||||||||||||||||||||||
| 531 | - | |||||||||||||||||||||||||
| 532 | - | |||||||||||||||||||||||||
| 533 | - | |||||||||||||||||||||||||
| 534 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||
| 535 | ret = 0; | - | ||||||||||||||||||||||||
| 536 |  } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 537 | - | |||||||||||||||||||||||||
| 538 | - | |||||||||||||||||||||||||
| 539 | - | |||||||||||||||||||||||||
| 540 | - | |||||||||||||||||||||||||
| 541 | - | |||||||||||||||||||||||||
| 542 | ret = 1; | - | ||||||||||||||||||||||||
| 543 | - | |||||||||||||||||||||||||
| 544 |   if (SSL_CTX_ctrl(ctx,43,0,
  | 0 | ||||||||||||||||||||||||
| 545 |      ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 546 |      ) > 0
  | 0 | ||||||||||||||||||||||||
| 547 |    while (SSL_CTX_ctrl(ctx,20,0,
  | 0 | ||||||||||||||||||||||||
| 548 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 549 |          ) >
  | 0 | ||||||||||||||||||||||||
| 550 |        SSL_CTX_ctrl(ctx,43,0,
  | 0 | ||||||||||||||||||||||||
| 551 |       ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 552 |       )
  | 0 | ||||||||||||||||||||||||
| 553 |     if (!remove_session_lock(ctx,
  | 0 | ||||||||||||||||||||||||
| 554 |         ctx->internal->session_cache_tail, 0)
  | 0 | ||||||||||||||||||||||||
| 555 |      break; never executed:  break; | 0 | ||||||||||||||||||||||||
| 556 | else | - | ||||||||||||||||||||||||
| 557 |      ctx->internal->stats.sess_cache_full++; never executed:  ctx->internal->stats.sess_cache_full++; | 0 | ||||||||||||||||||||||||
| 558 | } | - | ||||||||||||||||||||||||
| 559 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 560 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 561 | CRYPTO_lock(2|8,12,__FILE__,667); | - | ||||||||||||||||||||||||
| 562 |  return never executed:   (ret);return (ret);never executed:  return (ret); | 0 | ||||||||||||||||||||||||
| 563 | } | - | ||||||||||||||||||||||||
| 564 | - | |||||||||||||||||||||||||
| 565 | int | - | ||||||||||||||||||||||||
| 566 | SSL_CTX_remove_session(SSL_CTX *ctx, SSL_SESSION *c) | - | ||||||||||||||||||||||||
| 567 | { | - | ||||||||||||||||||||||||
| 568 |  return never executed:   remove_session_lock(ctx, c, 1);return remove_session_lock(ctx, c, 1);never executed:  return remove_session_lock(ctx, c, 1); | 0 | ||||||||||||||||||||||||
| 569 | } | - | ||||||||||||||||||||||||
| 570 | - | |||||||||||||||||||||||||
| 571 | static int | - | ||||||||||||||||||||||||
| 572 | remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck) | - | ||||||||||||||||||||||||
| 573 | { | - | ||||||||||||||||||||||||
| 574 | SSL_SESSION *r; | - | ||||||||||||||||||||||||
| 575 | int ret = 0; | - | ||||||||||||||||||||||||
| 576 | - | |||||||||||||||||||||||||
| 577 |  if ((
 
  | 0 | ||||||||||||||||||||||||
| 578 |           ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 579 |               )
 
 
  | 0 | ||||||||||||||||||||||||
| 580 |   if (lck
  | 0 | ||||||||||||||||||||||||
| 581 |    CRYPTO_lock(1|8,12,__FILE__,685); never executed:  CRYPTO_lock(1|8,12,__FILE__,685); | 0 | ||||||||||||||||||||||||
| 582 |   if ((
 
  | 0 | ||||||||||||||||||||||||
| 583 | ret = 1; | - | ||||||||||||||||||||||||
| 584 | r = ((SSL_SESSION *)lh_delete(((_LHASH *)((void*) (1 ? ctx->internal->sessions : (struct lhash_st_SSL_SESSION*)0))), ((void*) (1 ? c : (SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||
| 585 | SSL_SESSION_list_remove(ctx, c); | - | ||||||||||||||||||||||||
| 586 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 587 |   if (lck
  | 0 | ||||||||||||||||||||||||
| 588 |    CRYPTO_lock(2|8,12,__FILE__,692); never executed:  CRYPTO_lock(2|8,12,__FILE__,692); | 0 | ||||||||||||||||||||||||
| 589 | - | |||||||||||||||||||||||||
| 590 |   if (ret
  | 0 | ||||||||||||||||||||||||
| 591 | r->internal->not_resumable = 1; | - | ||||||||||||||||||||||||
| 592 |    if (ctx->internal->remove_session_cb != 
  | 0 | ||||||||||||||||||||||||
| 593 |                                           ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 594 | ) | - | ||||||||||||||||||||||||
| 595 |     ctx->internal->remove_session_cb(ctx, r); never executed:  ctx->internal->remove_session_cb(ctx, r); | 0 | ||||||||||||||||||||||||
| 596 | SSL_SESSION_free(r); | - | ||||||||||||||||||||||||
| 597 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 598 |  } never executed:   elseend of block | 0 | ||||||||||||||||||||||||
| 599 |   ret = 0; never executed:  ret = 0; | 0 | ||||||||||||||||||||||||
| 600 |  return never executed:   (ret);return (ret);never executed:  return (ret); | 0 | ||||||||||||||||||||||||
| 601 | } | - | ||||||||||||||||||||||||
| 602 | - | |||||||||||||||||||||||||
| 603 | void | - | ||||||||||||||||||||||||
| 604 | SSL_SESSION_free(SSL_SESSION *ss) | - | ||||||||||||||||||||||||
| 605 | { | - | ||||||||||||||||||||||||
| 606 | int i; | - | ||||||||||||||||||||||||
| 607 | - | |||||||||||||||||||||||||
| 608 |  if (ss == 
  | 0-157 | ||||||||||||||||||||||||
| 609 |           ((void *)0)
  | 0-157 | ||||||||||||||||||||||||
| 610 | ) | - | ||||||||||||||||||||||||
| 611 |   return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 612 | - | |||||||||||||||||||||||||
| 613 | i = CRYPTO_add_lock(&ss->references,-1,14,__FILE__,713); | - | ||||||||||||||||||||||||
| 614 |  if (i > 0
  | 0-157 | ||||||||||||||||||||||||
| 615 |   return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 616 | - | |||||||||||||||||||||||||
| 617 | CRYPTO_free_ex_data(3, ss, &ss->internal->ex_data); | - | ||||||||||||||||||||||||
| 618 | - | |||||||||||||||||||||||||
| 619 | explicit_bzero(ss->master_key, sizeof ss->master_key); | - | ||||||||||||||||||||||||
| 620 | explicit_bzero(ss->session_id, sizeof ss->session_id); | - | ||||||||||||||||||||||||
| 621 | - | |||||||||||||||||||||||||
| 622 | ssl_sess_cert_free(ss->internal->sess_cert); | - | ||||||||||||||||||||||||
| 623 | - | |||||||||||||||||||||||||
| 624 | X509_free(ss->peer); | - | ||||||||||||||||||||||||
| 625 | - | |||||||||||||||||||||||||
| 626 | sk_free(((_STACK*) (1 ? (ss->ciphers) : (struct stack_st_SSL_CIPHER*)0))); | - | ||||||||||||||||||||||||
| 627 | - | |||||||||||||||||||||||||
| 628 | free(ss->tlsext_hostname); | - | ||||||||||||||||||||||||
| 629 | free(ss->tlsext_tick); | - | ||||||||||||||||||||||||
| 630 | free(ss->internal->tlsext_ecpointformatlist); | - | ||||||||||||||||||||||||
| 631 | free(ss->internal->tlsext_supportedgroups); | - | ||||||||||||||||||||||||
| 632 | - | |||||||||||||||||||||||||
| 633 | freezero(ss->internal, sizeof(*ss->internal)); | - | ||||||||||||||||||||||||
| 634 | freezero(ss, sizeof(*ss)); | - | ||||||||||||||||||||||||
| 635 | } executed 157 times by 5 tests:  end of blockExecuted by: 
  | 157 | ||||||||||||||||||||||||
| 636 | - | |||||||||||||||||||||||||
| 637 | int | - | ||||||||||||||||||||||||
| 638 | SSL_SESSION_up_ref(SSL_SESSION *ss) | - | ||||||||||||||||||||||||
| 639 | { | - | ||||||||||||||||||||||||
| 640 | int refs = CRYPTO_add_lock(&ss->references,1,14,__FILE__,740); | - | ||||||||||||||||||||||||
| 641 |  return never executed:   (return (refs > 1) ? 1 : 0;
 
 never executed:  return (refs > 1) ? 1 : 0; | 0 | ||||||||||||||||||||||||
| 642 | } | - | ||||||||||||||||||||||||
| 643 | - | |||||||||||||||||||||||||
| 644 | int | - | ||||||||||||||||||||||||
| 645 | SSL_set_session(SSL *s, SSL_SESSION *session) | - | ||||||||||||||||||||||||
| 646 | { | - | ||||||||||||||||||||||||
| 647 | int ret = 0; | - | ||||||||||||||||||||||||
| 648 | const SSL_METHOD *meth; | - | ||||||||||||||||||||||||
| 649 | - | |||||||||||||||||||||||||
| 650 |  if (session != 
  | 0-59 | ||||||||||||||||||||||||
| 651 |                ((void *)0)
  | 0-59 | ||||||||||||||||||||||||
| 652 | ) { | - | ||||||||||||||||||||||||
| 653 | meth = s->ctx->method->internal->get_ssl_method(session->ssl_version); | - | ||||||||||||||||||||||||
| 654 |   if (meth == 
  | 0 | ||||||||||||||||||||||||
| 655 |              ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 656 | ) | - | ||||||||||||||||||||||||
| 657 |    meth = s->method->internal->get_ssl_method(session->ssl_version); never executed:  meth = s->method->internal->get_ssl_method(session->ssl_version); | 0 | ||||||||||||||||||||||||
| 658 |   if (meth == 
  | 0 | ||||||||||||||||||||||||
| 659 |              ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 660 | ) { | - | ||||||||||||||||||||||||
| 661 | SSL_error_internal(s, 240, __FILE__, 755); | - | ||||||||||||||||||||||||
| 662 |    return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 663 | } | - | ||||||||||||||||||||||||
| 664 | - | |||||||||||||||||||||||||
| 665 |   if (meth != s->method
  | 0 | ||||||||||||||||||||||||
| 666 |    if (!SSL_set_ssl_method(s, meth)
  | 0 | ||||||||||||||||||||||||
| 667 |     return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 668 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 669 | - | |||||||||||||||||||||||||
| 670 | - | |||||||||||||||||||||||||
| 671 | CRYPTO_add_lock(&session->references,1,14,__FILE__,765); | - | ||||||||||||||||||||||||
| 672 |   if (s->session != 
  | 0 | ||||||||||||||||||||||||
| 673 |                    ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 674 | ) | - | ||||||||||||||||||||||||
| 675 |    SSL_SESSION_free(s->session); never executed:  SSL_SESSION_free(s->session); | 0 | ||||||||||||||||||||||||
| 676 | s->session = session; | - | ||||||||||||||||||||||||
| 677 | s->verify_result = s->session->verify_result; | - | ||||||||||||||||||||||||
| 678 | - | |||||||||||||||||||||||||
| 679 | ret = 1; | - | ||||||||||||||||||||||||
| 680 |  } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 681 |   if (s->session != 
  | 9-50 | ||||||||||||||||||||||||
| 682 |                    ((void *)0)
  | 9-50 | ||||||||||||||||||||||||
| 683 | ) { | - | ||||||||||||||||||||||||
| 684 | SSL_SESSION_free(s->session); | - | ||||||||||||||||||||||||
| 685 | s->session = | - | ||||||||||||||||||||||||
| 686 | ((void *)0) | - | ||||||||||||||||||||||||
| 687 | ; | - | ||||||||||||||||||||||||
| 688 |   } executed 9 times by 1 test:  end of blockExecuted by: 
  | 9 | ||||||||||||||||||||||||
| 689 | - | |||||||||||||||||||||||||
| 690 | meth = s->ctx->method; | - | ||||||||||||||||||||||||
| 691 |   if (meth != s->method
  | 9-50 | ||||||||||||||||||||||||
| 692 |    if (!SSL_set_ssl_method(s, meth)
  | 0-9 | ||||||||||||||||||||||||
| 693 |     return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 694 |   } executed 9 times by 1 test:  end of blockExecuted by: 
  | 9 | ||||||||||||||||||||||||
| 695 | ret = 1; | - | ||||||||||||||||||||||||
| 696 |  } executed 59 times by 1 test:  end of blockExecuted by: 
  | 59 | ||||||||||||||||||||||||
| 697 |  return executed 59 times by 1 test:   (ret);return (ret);Executed by: 
 executed 59 times by 1 test:  return (ret);Executed by: 
  | 59 | ||||||||||||||||||||||||
| 698 | } | - | ||||||||||||||||||||||||
| 699 | - | |||||||||||||||||||||||||
| 700 | size_t | - | ||||||||||||||||||||||||
| 701 | SSL_SESSION_get_master_key(const SSL_SESSION *ss, unsigned char *out, | - | ||||||||||||||||||||||||
| 702 | size_t max_out) | - | ||||||||||||||||||||||||
| 703 | { | - | ||||||||||||||||||||||||
| 704 | size_t len = ss->master_key_length; | - | ||||||||||||||||||||||||
| 705 | - | |||||||||||||||||||||||||
| 706 |  if (out == 
  | 0 | ||||||||||||||||||||||||
| 707 |            ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 708 | ) | - | ||||||||||||||||||||||||
| 709 |   return never executed:   len;return len;never executed:  return len; | 0 | ||||||||||||||||||||||||
| 710 | - | |||||||||||||||||||||||||
| 711 |  if (len > max_out
  | 0 | ||||||||||||||||||||||||
| 712 |   len = max_out; never executed:  len = max_out; | 0 | ||||||||||||||||||||||||
| 713 | - | |||||||||||||||||||||||||
| 714 | memcpy(out, ss->master_key, len); | - | ||||||||||||||||||||||||
| 715 | - | |||||||||||||||||||||||||
| 716 |  return never executed:   len;return len;never executed:  return len; | 0 | ||||||||||||||||||||||||
| 717 | } | - | ||||||||||||||||||||||||
| 718 | - | |||||||||||||||||||||||||
| 719 | long | - | ||||||||||||||||||||||||
| 720 | SSL_SESSION_set_timeout(SSL_SESSION *s, long t) | - | ||||||||||||||||||||||||
| 721 | { | - | ||||||||||||||||||||||||
| 722 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 723 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 724 | ) | - | ||||||||||||||||||||||||
| 725 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 726 | s->timeout = t; | - | ||||||||||||||||||||||||
| 727 |  return never executed:   (1);return (1);never executed:  return (1); | 0 | ||||||||||||||||||||||||
| 728 | } | - | ||||||||||||||||||||||||
| 729 | - | |||||||||||||||||||||||||
| 730 | long | - | ||||||||||||||||||||||||
| 731 | SSL_SESSION_get_timeout(const SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 732 | { | - | ||||||||||||||||||||||||
| 733 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 734 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 735 | ) | - | ||||||||||||||||||||||||
| 736 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 737 |  return never executed:   (s->timeout);return (s->timeout);never executed:  return (s->timeout); | 0 | ||||||||||||||||||||||||
| 738 | } | - | ||||||||||||||||||||||||
| 739 | - | |||||||||||||||||||||||||
| 740 | - | |||||||||||||||||||||||||
| 741 | long | - | ||||||||||||||||||||||||
| 742 | SSL_SESSION_get_time(const SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 743 | { | - | ||||||||||||||||||||||||
| 744 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 745 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 746 | ) | - | ||||||||||||||||||||||||
| 747 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 748 |  return never executed:   (s->time);return (s->time);never executed:  return (s->time); | 0 | ||||||||||||||||||||||||
| 749 | } | - | ||||||||||||||||||||||||
| 750 | - | |||||||||||||||||||||||||
| 751 | - | |||||||||||||||||||||||||
| 752 | long | - | ||||||||||||||||||||||||
| 753 | SSL_SESSION_set_time(SSL_SESSION *s, long t) | - | ||||||||||||||||||||||||
| 754 | { | - | ||||||||||||||||||||||||
| 755 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 756 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 757 | ) | - | ||||||||||||||||||||||||
| 758 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 759 | s->time = t; | - | ||||||||||||||||||||||||
| 760 |  return never executed:   (t);return (t);never executed:  return (t); | 0 | ||||||||||||||||||||||||
| 761 | } | - | ||||||||||||||||||||||||
| 762 | - | |||||||||||||||||||||||||
| 763 | int | - | ||||||||||||||||||||||||
| 764 | SSL_SESSION_get_protocol_version(const SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 765 | { | - | ||||||||||||||||||||||||
| 766 |  return never executed:   s->ssl_version;return s->ssl_version;never executed:  return s->ssl_version; | 0 | ||||||||||||||||||||||||
| 767 | } | - | ||||||||||||||||||||||||
| 768 | - | |||||||||||||||||||||||||
| 769 | X509 * | - | ||||||||||||||||||||||||
| 770 | SSL_SESSION_get0_peer(SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 771 | { | - | ||||||||||||||||||||||||
| 772 |  return never executed:   s->peer;return s->peer;never executed:  return s->peer; | 0 | ||||||||||||||||||||||||
| 773 | } | - | ||||||||||||||||||||||||
| 774 | - | |||||||||||||||||||||||||
| 775 | int | - | ||||||||||||||||||||||||
| 776 | SSL_SESSION_set1_id(SSL_SESSION *s, const unsigned char *sid, | - | ||||||||||||||||||||||||
| 777 | unsigned int sid_len) | - | ||||||||||||||||||||||||
| 778 | { | - | ||||||||||||||||||||||||
| 779 |  if (sid_len > 32
  | 0 | ||||||||||||||||||||||||
| 780 | ERR_put_error(20,(0xfff),(408),__FILE__,858); | - | ||||||||||||||||||||||||
| 781 |   return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 782 | } | - | ||||||||||||||||||||||||
| 783 | s->session_id_length = sid_len; | - | ||||||||||||||||||||||||
| 784 | memmove(s->session_id, sid, sid_len); | - | ||||||||||||||||||||||||
| 785 |  return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||
| 786 | } | - | ||||||||||||||||||||||||
| 787 | - | |||||||||||||||||||||||||
| 788 | int | - | ||||||||||||||||||||||||
| 789 | SSL_SESSION_set1_id_context(SSL_SESSION *s, const unsigned char *sid_ctx, | - | ||||||||||||||||||||||||
| 790 | unsigned int sid_ctx_len) | - | ||||||||||||||||||||||||
| 791 | { | - | ||||||||||||||||||||||||
| 792 |  if (sid_ctx_len > 32
  | 0 | ||||||||||||||||||||||||
| 793 | ERR_put_error(20,(0xfff),(273),__FILE__,871); | - | ||||||||||||||||||||||||
| 794 |   return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 795 | } | - | ||||||||||||||||||||||||
| 796 | s->sid_ctx_length = sid_ctx_len; | - | ||||||||||||||||||||||||
| 797 | memcpy(s->sid_ctx, sid_ctx, sid_ctx_len); | - | ||||||||||||||||||||||||
| 798 | - | |||||||||||||||||||||||||
| 799 |  return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||
| 800 | } | - | ||||||||||||||||||||||||
| 801 | - | |||||||||||||||||||||||||
| 802 | long | - | ||||||||||||||||||||||||
| 803 | SSL_CTX_set_timeout(SSL_CTX *s, long t) | - | ||||||||||||||||||||||||
| 804 | { | - | ||||||||||||||||||||||||
| 805 | long l; | - | ||||||||||||||||||||||||
| 806 | - | |||||||||||||||||||||||||
| 807 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 808 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 809 | ) | - | ||||||||||||||||||||||||
| 810 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 811 | l = s->session_timeout; | - | ||||||||||||||||||||||||
| 812 | s->session_timeout = t; | - | ||||||||||||||||||||||||
| 813 | - | |||||||||||||||||||||||||
| 814 |  return never executed:   (l);return (l);never executed:  return (l); | 0 | ||||||||||||||||||||||||
| 815 | } | - | ||||||||||||||||||||||||
| 816 | - | |||||||||||||||||||||||||
| 817 | long | - | ||||||||||||||||||||||||
| 818 | SSL_CTX_get_timeout(const SSL_CTX *s) | - | ||||||||||||||||||||||||
| 819 | { | - | ||||||||||||||||||||||||
| 820 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 821 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 822 | ) | - | ||||||||||||||||||||||||
| 823 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 824 |  return never executed:   (s->session_timeout);return (s->session_timeout);never executed:  return (s->session_timeout); | 0 | ||||||||||||||||||||||||
| 825 | } | - | ||||||||||||||||||||||||
| 826 | - | |||||||||||||||||||||||||
| 827 | int | - | ||||||||||||||||||||||||
| 828 | SSL_set_session_secret_cb(SSL *s, int (*tls_session_secret_cb)(SSL *s, | - | ||||||||||||||||||||||||
| 829 | void *secret, int *secret_len, struct stack_st_SSL_CIPHER *peer_ciphers, | - | ||||||||||||||||||||||||
| 830 | SSL_CIPHER **cipher, void *arg), void *arg) | - | ||||||||||||||||||||||||
| 831 | { | - | ||||||||||||||||||||||||
| 832 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 833 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 834 | ) | - | ||||||||||||||||||||||||
| 835 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 836 | s->internal->tls_session_secret_cb = tls_session_secret_cb; | - | ||||||||||||||||||||||||
| 837 | s->internal->tls_session_secret_cb_arg = arg; | - | ||||||||||||||||||||||||
| 838 |  return never executed:   (1);return (1);never executed:  return (1); | 0 | ||||||||||||||||||||||||
| 839 | } | - | ||||||||||||||||||||||||
| 840 | - | |||||||||||||||||||||||||
| 841 | int | - | ||||||||||||||||||||||||
| 842 | SSL_set_session_ticket_ext_cb(SSL *s, tls_session_ticket_ext_cb_fn cb, | - | ||||||||||||||||||||||||
| 843 | void *arg) | - | ||||||||||||||||||||||||
| 844 | { | - | ||||||||||||||||||||||||
| 845 |  if (s == 
  | 0 | ||||||||||||||||||||||||
| 846 |          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 847 | ) | - | ||||||||||||||||||||||||
| 848 |   return never executed:   (0);return (0);never executed:  return (0); | 0 | ||||||||||||||||||||||||
| 849 | s->internal->tls_session_ticket_ext_cb = cb; | - | ||||||||||||||||||||||||
| 850 | s->internal->tls_session_ticket_ext_cb_arg = arg; | - | ||||||||||||||||||||||||
| 851 |  return never executed:   (1);return (1);never executed:  return (1); | 0 | ||||||||||||||||||||||||
| 852 | } | - | ||||||||||||||||||||||||
| 853 | - | |||||||||||||||||||||||||
| 854 | int | - | ||||||||||||||||||||||||
| 855 | SSL_set_session_ticket_ext(SSL *s, void *ext_data, int ext_len) | - | ||||||||||||||||||||||||
| 856 | { | - | ||||||||||||||||||||||||
| 857 |  if (s->version >= 0x0301
  | 0-2 | ||||||||||||||||||||||||
| 858 | free(s->internal->tlsext_session_ticket); | - | ||||||||||||||||||||||||
| 859 | s->internal->tlsext_session_ticket = | - | ||||||||||||||||||||||||
| 860 | malloc(sizeof(TLS_SESSION_TICKET_EXT) + ext_len); | - | ||||||||||||||||||||||||
| 861 |   if (!s->internal->tlsext_session_ticket
  | 0-2 | ||||||||||||||||||||||||
| 862 | SSL_error_internal(s, (1|64), __FILE__, 932); | - | ||||||||||||||||||||||||
| 863 |    return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 864 | } | - | ||||||||||||||||||||||||
| 865 | - | |||||||||||||||||||||||||
| 866 |   if (ext_data
  | 1 | ||||||||||||||||||||||||
| 867 | s->internal->tlsext_session_ticket->length = ext_len; | - | ||||||||||||||||||||||||
| 868 | s->internal->tlsext_session_ticket->data = | - | ||||||||||||||||||||||||
| 869 | s->internal->tlsext_session_ticket + 1; | - | ||||||||||||||||||||||||
| 870 | memcpy(s->internal->tlsext_session_ticket->data, | - | ||||||||||||||||||||||||
| 871 | ext_data, ext_len); | - | ||||||||||||||||||||||||
| 872 |   } executed 1 time by 1 test:   else {end of blockExecuted by: 
  | 1 | ||||||||||||||||||||||||
| 873 | s->internal->tlsext_session_ticket->length = 0; | - | ||||||||||||||||||||||||
| 874 | s->internal->tlsext_session_ticket->data = | - | ||||||||||||||||||||||||
| 875 | ((void *)0) | - | ||||||||||||||||||||||||
| 876 | ; | - | ||||||||||||||||||||||||
| 877 |   } executed 1 time by 1 test:  end of blockExecuted by: 
  | 1 | ||||||||||||||||||||||||
| 878 | - | |||||||||||||||||||||||||
| 879 |   return executed 2 times by 1 test:   1;return 1;Executed by: 
 executed 2 times by 1 test:  return 1;Executed by: 
  | 2 | ||||||||||||||||||||||||
| 880 | } | - | ||||||||||||||||||||||||
| 881 | - | |||||||||||||||||||||||||
| 882 |  return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 883 | } | - | ||||||||||||||||||||||||
| 884 | - | |||||||||||||||||||||||||
| 885 | typedef struct timeout_param_st { | - | ||||||||||||||||||||||||
| 886 | SSL_CTX *ctx; | - | ||||||||||||||||||||||||
| 887 | long time; | - | ||||||||||||||||||||||||
| 888 | struct lhash_st_SSL_SESSION *cache; | - | ||||||||||||||||||||||||
| 889 | } TIMEOUT_PARAM; | - | ||||||||||||||||||||||||
| 890 | - | |||||||||||||||||||||||||
| 891 | static void | - | ||||||||||||||||||||||||
| 892 | timeout_doall_arg(SSL_SESSION *s, TIMEOUT_PARAM *p) | - | ||||||||||||||||||||||||
| 893 | { | - | ||||||||||||||||||||||||
| 894 |  if ((
 
 
 
  | 0 | ||||||||||||||||||||||||
| 895 | - | |||||||||||||||||||||||||
| 896 | - | |||||||||||||||||||||||||
| 897 | - | |||||||||||||||||||||||||
| 898 | (void)((SSL_SESSION *)lh_delete(((_LHASH *)((void*) (1 ? p->cache : (struct lhash_st_SSL_SESSION*)0))), ((void*) (1 ? s : (SSL_SESSION*)0)))); | - | ||||||||||||||||||||||||
| 899 | SSL_SESSION_list_remove(p->ctx, s); | - | ||||||||||||||||||||||||
| 900 | s->internal->not_resumable = 1; | - | ||||||||||||||||||||||||
| 901 |   if (p->ctx->internal->remove_session_cb != 
  | 0 | ||||||||||||||||||||||||
| 902 |                                             ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 903 | ) | - | ||||||||||||||||||||||||
| 904 |    p->ctx->internal->remove_session_cb(p->ctx, s); never executed:  p->ctx->internal->remove_session_cb(p->ctx, s); | 0 | ||||||||||||||||||||||||
| 905 | SSL_SESSION_free(s); | - | ||||||||||||||||||||||||
| 906 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 907 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 908 | - | |||||||||||||||||||||||||
| 909 | static void | - | ||||||||||||||||||||||||
| 910 | timeout_LHASH_DOALL_ARG(void *arg1, void *arg2) | - | ||||||||||||||||||||||||
| 911 | { | - | ||||||||||||||||||||||||
| 912 | SSL_SESSION *a = arg1; | - | ||||||||||||||||||||||||
| 913 | TIMEOUT_PARAM *b = arg2; | - | ||||||||||||||||||||||||
| 914 | - | |||||||||||||||||||||||||
| 915 | timeout_doall_arg(a, b); | - | ||||||||||||||||||||||||
| 916 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 917 | - | |||||||||||||||||||||||||
| 918 | - | |||||||||||||||||||||||||
| 919 | void | - | ||||||||||||||||||||||||
| 920 | SSL_CTX_flush_sessions(SSL_CTX *s, long t) | - | ||||||||||||||||||||||||
| 921 | { | - | ||||||||||||||||||||||||
| 922 | unsigned long i; | - | ||||||||||||||||||||||||
| 923 | TIMEOUT_PARAM tp; | - | ||||||||||||||||||||||||
| 924 | - | |||||||||||||||||||||||||
| 925 | tp.ctx = s; | - | ||||||||||||||||||||||||
| 926 | tp.cache = s->internal->sessions; | - | ||||||||||||||||||||||||
| 927 |  if (tp.cache == 
  | 0-207 | ||||||||||||||||||||||||
| 928 |                 ((void *)0)
  | 0-207 | ||||||||||||||||||||||||
| 929 | ) | - | ||||||||||||||||||||||||
| 930 |   return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 931 | tp.time = t; | - | ||||||||||||||||||||||||
| 932 | CRYPTO_lock(1|8,12,__FILE__,996); | - | ||||||||||||||||||||||||
| 933 |  i = ((_LHASH *)((void*) (1 ? tp.cache : (struct dead code:   lhash_st_SSL_SESSION*)0(struct lhash_st_SSL_SESSION*)0dead code:  )))->down_load;(struct lhash_st_SSL_SESSION*)0 | - | ||||||||||||||||||||||||
| 934 | ((_LHASH *)((void*) (1 ? tp.cache : (struct lhash_st_SSL_SESSION*)0)))->down_load = 0; | - | ||||||||||||||||||||||||
| 935 | lh_doall_arg(((_LHASH *)((void*) (1 ? tp.cache : (struct lhash_st_SSL_SESSION*)0))), timeout_LHASH_DOALL_ARG, ((void*) (1 ? &tp : (TIMEOUT_PARAM*)0))) | - | ||||||||||||||||||||||||
| 936 | ; | - | ||||||||||||||||||||||||
| 937 | ((_LHASH *)((void*) (1 ? tp.cache : (struct lhash_st_SSL_SESSION*)0)))->down_load = i; | - | ||||||||||||||||||||||||
| 938 | CRYPTO_lock(2|8,12,__FILE__,1002); | - | ||||||||||||||||||||||||
| 939 | } executed 207 times by 13 tests:  end of blockExecuted by: 
  | 207 | ||||||||||||||||||||||||
| 940 | - | |||||||||||||||||||||||||
| 941 | int | - | ||||||||||||||||||||||||
| 942 | ssl_clear_bad_session(SSL *s) | - | ||||||||||||||||||||||||
| 943 | { | - | ||||||||||||||||||||||||
| 944 |  if ((
 
  | 138-332 | ||||||||||||||||||||||||
| 945 |                    ((void *)0)
  | 138-332 | ||||||||||||||||||||||||
| 946 |                        )
 
  | 30-332 | ||||||||||||||||||||||||
| 947 |      !((
 
 
 
  | 0-30 | ||||||||||||||||||||||||
| 948 | SSL_CTX_remove_session(s->ctx, s->session); | - | ||||||||||||||||||||||||
| 949 |   return never executed:   (1);return (1);never executed:  return (1); | 0 | ||||||||||||||||||||||||
| 950 | } else | - | ||||||||||||||||||||||||
| 951 |   return executed 470 times by 11 tests:   (0);return (0);Executed by: 
 executed 470 times by 11 tests:  return (0);Executed by: 
  | 470 | ||||||||||||||||||||||||
| 952 | } | - | ||||||||||||||||||||||||
| 953 | - | |||||||||||||||||||||||||
| 954 | - | |||||||||||||||||||||||||
| 955 | static void | - | ||||||||||||||||||||||||
| 956 | SSL_SESSION_list_remove(SSL_CTX *ctx, SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 957 | { | - | ||||||||||||||||||||||||
| 958 |  if ((
 
  | 0 | ||||||||||||||||||||||||
| 959 |                           ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 960 |                               )
 
 
  | 0 | ||||||||||||||||||||||||
| 961 |                                                          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 962 |                                                              )
  | 0 | ||||||||||||||||||||||||
| 963 |   return; never executed:  return; | 0 | ||||||||||||||||||||||||
| 964 | - | |||||||||||||||||||||||||
| 965 |  if (s->internal->next == (SSL_SESSION *)&(ctx->internal->session_cache_tail)
  | 0 | ||||||||||||||||||||||||
| 966 | - | |||||||||||||||||||||||||
| 967 |   if (s->internal->prev == (SSL_SESSION *)&(ctx->internal->session_cache_head)
  | 0 | ||||||||||||||||||||||||
| 968 | - | |||||||||||||||||||||||||
| 969 | ctx->internal->session_cache_head = | - | ||||||||||||||||||||||||
| 970 | ((void *)0) | - | ||||||||||||||||||||||||
| 971 | ; | - | ||||||||||||||||||||||||
| 972 | ctx->internal->session_cache_tail = | - | ||||||||||||||||||||||||
| 973 | ((void *)0) | - | ||||||||||||||||||||||||
| 974 | ; | - | ||||||||||||||||||||||||
| 975 |   } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 976 | ctx->internal->session_cache_tail = s->internal->prev; | - | ||||||||||||||||||||||||
| 977 | s->internal->prev->internal->next = | - | ||||||||||||||||||||||||
| 978 | (SSL_SESSION *)&(ctx->internal->session_cache_tail); | - | ||||||||||||||||||||||||
| 979 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 980 | } else { | - | ||||||||||||||||||||||||
| 981 |   if (s->internal->prev == (SSL_SESSION *)&(ctx->internal->session_cache_head)
  | 0 | ||||||||||||||||||||||||
| 982 | - | |||||||||||||||||||||||||
| 983 | ctx->internal->session_cache_head = s->internal->next; | - | ||||||||||||||||||||||||
| 984 | s->internal->next->internal->prev = | - | ||||||||||||||||||||||||
| 985 | (SSL_SESSION *)&(ctx->internal->session_cache_head); | - | ||||||||||||||||||||||||
| 986 |   } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 987 | - | |||||||||||||||||||||||||
| 988 | s->internal->next->internal->prev = s->internal->prev; | - | ||||||||||||||||||||||||
| 989 | s->internal->prev->internal->next = s->internal->next; | - | ||||||||||||||||||||||||
| 990 |   } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 991 | } | - | ||||||||||||||||||||||||
| 992 | s->internal->prev = s->internal->next = | - | ||||||||||||||||||||||||
| 993 | ((void *)0) | - | ||||||||||||||||||||||||
| 994 | ; | - | ||||||||||||||||||||||||
| 995 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 996 | - | |||||||||||||||||||||||||
| 997 | static void | - | ||||||||||||||||||||||||
| 998 | SSL_SESSION_list_add(SSL_CTX *ctx, SSL_SESSION *s) | - | ||||||||||||||||||||||||
| 999 | { | - | ||||||||||||||||||||||||
| 1000 |  if ((
 
  | 0 | ||||||||||||||||||||||||
| 1001 |                           ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 1002 |                               )
 
 
  | 0 | ||||||||||||||||||||||||
| 1003 |                                                          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 1004 |                                                              )
  | 0 | ||||||||||||||||||||||||
| 1005 |   SSL_SESSION_list_remove(ctx, s); never executed:  SSL_SESSION_list_remove(ctx, s); | 0 | ||||||||||||||||||||||||
| 1006 | - | |||||||||||||||||||||||||
| 1007 |  if (ctx->internal->session_cache_head == 
  | 0 | ||||||||||||||||||||||||
| 1008 |                                          ((void *)0)
  | 0 | ||||||||||||||||||||||||
| 1009 | ) { | - | ||||||||||||||||||||||||
| 1010 | ctx->internal->session_cache_head = s; | - | ||||||||||||||||||||||||
| 1011 | ctx->internal->session_cache_tail = s; | - | ||||||||||||||||||||||||
| 1012 | s->internal->prev = (SSL_SESSION *)&(ctx->internal->session_cache_head); | - | ||||||||||||||||||||||||
| 1013 | s->internal->next = (SSL_SESSION *)&(ctx->internal->session_cache_tail); | - | ||||||||||||||||||||||||
| 1014 |  } never executed:   else {end of block | 0 | ||||||||||||||||||||||||
| 1015 | s->internal->next = ctx->internal->session_cache_head; | - | ||||||||||||||||||||||||
| 1016 | s->internal->next->internal->prev = s; | - | ||||||||||||||||||||||||
| 1017 | s->internal->prev = (SSL_SESSION *)&(ctx->internal->session_cache_head); | - | ||||||||||||||||||||||||
| 1018 | ctx->internal->session_cache_head = s; | - | ||||||||||||||||||||||||
| 1019 |  } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1020 | } | - | ||||||||||||||||||||||||
| 1021 | - | |||||||||||||||||||||||||
| 1022 | void | - | ||||||||||||||||||||||||
| 1023 | SSL_CTX_sess_set_new_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1024 | int (*cb)(struct ssl_st *ssl, SSL_SESSION *sess)) { | - | ||||||||||||||||||||||||
| 1025 | ctx->internal->new_session_cb = cb; | - | ||||||||||||||||||||||||
| 1026 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1027 | - | |||||||||||||||||||||||||
| 1028 | int | - | ||||||||||||||||||||||||
| 1029 | (*SSL_CTX_sess_get_new_cb(SSL_CTX *ctx))(SSL *ssl, SSL_SESSION *sess) | - | ||||||||||||||||||||||||
| 1030 | { | - | ||||||||||||||||||||||||
| 1031 |  return never executed:   ctx->internal->new_session_cb;return ctx->internal->new_session_cb;never executed:  return ctx->internal->new_session_cb; | 0 | ||||||||||||||||||||||||
| 1032 | } | - | ||||||||||||||||||||||||
| 1033 | - | |||||||||||||||||||||||||
| 1034 | void | - | ||||||||||||||||||||||||
| 1035 | SSL_CTX_sess_set_remove_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1036 | void (*cb)(SSL_CTX *ctx, SSL_SESSION *sess)) | - | ||||||||||||||||||||||||
| 1037 | { | - | ||||||||||||||||||||||||
| 1038 | ctx->internal->remove_session_cb = cb; | - | ||||||||||||||||||||||||
| 1039 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1040 | - | |||||||||||||||||||||||||
| 1041 | void | - | ||||||||||||||||||||||||
| 1042 | (*SSL_CTX_sess_get_remove_cb(SSL_CTX *ctx))(SSL_CTX * ctx, SSL_SESSION *sess) | - | ||||||||||||||||||||||||
| 1043 | { | - | ||||||||||||||||||||||||
| 1044 |  return never executed:   ctx->internal->remove_session_cb;return ctx->internal->remove_session_cb;never executed:  return ctx->internal->remove_session_cb; | 0 | ||||||||||||||||||||||||
| 1045 | } | - | ||||||||||||||||||||||||
| 1046 | - | |||||||||||||||||||||||||
| 1047 | void | - | ||||||||||||||||||||||||
| 1048 | SSL_CTX_sess_set_get_cb(SSL_CTX *ctx, SSL_SESSION *(*cb)(struct ssl_st *ssl, | - | ||||||||||||||||||||||||
| 1049 | const unsigned char *data, int len, int *copy)) | - | ||||||||||||||||||||||||
| 1050 | { | - | ||||||||||||||||||||||||
| 1051 | ctx->internal->get_session_cb = cb; | - | ||||||||||||||||||||||||
| 1052 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1053 | - | |||||||||||||||||||||||||
| 1054 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 1055 | (*SSL_CTX_sess_get_get_cb(SSL_CTX *ctx))(SSL *ssl, const unsigned char *data, | - | ||||||||||||||||||||||||
| 1056 | int len, int *copy) | - | ||||||||||||||||||||||||
| 1057 | { | - | ||||||||||||||||||||||||
| 1058 |  return never executed:   ctx->internal->get_session_cb;return ctx->internal->get_session_cb;never executed:  return ctx->internal->get_session_cb; | 0 | ||||||||||||||||||||||||
| 1059 | } | - | ||||||||||||||||||||||||
| 1060 | - | |||||||||||||||||||||||||
| 1061 | void | - | ||||||||||||||||||||||||
| 1062 | SSL_CTX_set_info_callback(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1063 | void (*cb)(const SSL *ssl, int type, int val)) | - | ||||||||||||||||||||||||
| 1064 | { | - | ||||||||||||||||||||||||
| 1065 | ctx->internal->info_callback = cb; | - | ||||||||||||||||||||||||
| 1066 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1067 | - | |||||||||||||||||||||||||
| 1068 | void | - | ||||||||||||||||||||||||
| 1069 | (*SSL_CTX_get_info_callback(SSL_CTX *ctx))(const SSL *ssl, int type, int val) | - | ||||||||||||||||||||||||
| 1070 | { | - | ||||||||||||||||||||||||
| 1071 |  return never executed:   ctx->internal->info_callback;return ctx->internal->info_callback;never executed:  return ctx->internal->info_callback; | 0 | ||||||||||||||||||||||||
| 1072 | } | - | ||||||||||||||||||||||||
| 1073 | - | |||||||||||||||||||||||||
| 1074 | void | - | ||||||||||||||||||||||||
| 1075 | SSL_CTX_set_client_cert_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1076 | int (*cb)(SSL *ssl, X509 **x509, EVP_PKEY **pkey)) | - | ||||||||||||||||||||||||
| 1077 | { | - | ||||||||||||||||||||||||
| 1078 | ctx->internal->client_cert_cb = cb; | - | ||||||||||||||||||||||||
| 1079 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1080 | - | |||||||||||||||||||||||||
| 1081 | int | - | ||||||||||||||||||||||||
| 1082 | (*SSL_CTX_get_client_cert_cb(SSL_CTX *ctx))(SSL * ssl, X509 ** x509, | - | ||||||||||||||||||||||||
| 1083 | EVP_PKEY **pkey) | - | ||||||||||||||||||||||||
| 1084 | { | - | ||||||||||||||||||||||||
| 1085 |  return never executed:   ctx->internal->client_cert_cb;return ctx->internal->client_cert_cb;never executed:  return ctx->internal->client_cert_cb; | 0 | ||||||||||||||||||||||||
| 1086 | } | - | ||||||||||||||||||||||||
| 1087 | - | |||||||||||||||||||||||||
| 1088 | - | |||||||||||||||||||||||||
| 1089 | int | - | ||||||||||||||||||||||||
| 1090 | SSL_CTX_set_client_cert_engine(SSL_CTX *ctx, ENGINE *e) | - | ||||||||||||||||||||||||
| 1091 | { | - | ||||||||||||||||||||||||
| 1092 |  if (!ENGINE_init(e)
  | 0 | ||||||||||||||||||||||||
| 1093 | ERR_put_error(20,(0xfff),(38),__FILE__,1139); | - | ||||||||||||||||||||||||
| 1094 |   return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 1095 | } | - | ||||||||||||||||||||||||
| 1096 |  if (!ENGINE_get_ssl_client_cert_function(e)
  | 0 | ||||||||||||||||||||||||
| 1097 | ERR_put_error(20,(0xfff),(331),__FILE__,1143); | - | ||||||||||||||||||||||||
| 1098 | ENGINE_finish(e); | - | ||||||||||||||||||||||||
| 1099 |   return never executed:   0;return 0;never executed:  return 0; | 0 | ||||||||||||||||||||||||
| 1100 | } | - | ||||||||||||||||||||||||
| 1101 | ctx->internal->client_cert_engine = e; | - | ||||||||||||||||||||||||
| 1102 |  return never executed:   1;return 1;never executed:  return 1; | 0 | ||||||||||||||||||||||||
| 1103 | } | - | ||||||||||||||||||||||||
| 1104 | - | |||||||||||||||||||||||||
| 1105 | - | |||||||||||||||||||||||||
| 1106 | void | - | ||||||||||||||||||||||||
| 1107 | SSL_CTX_set_cookie_generate_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1108 | int (*cb)(SSL *ssl, unsigned char *cookie, unsigned int *cookie_len)) | - | ||||||||||||||||||||||||
| 1109 | { | - | ||||||||||||||||||||||||
| 1110 | ctx->internal->app_gen_cookie_cb = cb; | - | ||||||||||||||||||||||||
| 1111 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1112 | - | |||||||||||||||||||||||||
| 1113 | void | - | ||||||||||||||||||||||||
| 1114 | SSL_CTX_set_cookie_verify_cb(SSL_CTX *ctx, | - | ||||||||||||||||||||||||
| 1115 | int (*cb)(SSL *ssl, const unsigned char *cookie, unsigned int cookie_len)) | - | ||||||||||||||||||||||||
| 1116 | { | - | ||||||||||||||||||||||||
| 1117 | ctx->internal->app_verify_cookie_cb = cb; | - | ||||||||||||||||||||||||
| 1118 | } never executed:  end of block | 0 | ||||||||||||||||||||||||
| 1119 | - | |||||||||||||||||||||||||
| 1120 | int | - | ||||||||||||||||||||||||
| 1121 | PEM_write_SSL_SESSION(FILE *fp, SSL_SESSION *x) | - | ||||||||||||||||||||||||
| 1122 | { | - | ||||||||||||||||||||||||
| 1123 |  return never executed:   PEM_ASN1_write((i2d_of_void *)i2d_SSL_SESSION,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 | ||||||||||||||||||||||||
| 1124 |      "SSL SESSION PARAMETERS", fp, x,  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 | ||||||||||||||||||||||||
| 1125 |                                    ((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 | ||||||||||||||||||||||||
| 1126 |                                        ,  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 | ||||||||||||||||||||||||
| 1127 |                                          ((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 | ||||||||||||||||||||||||
| 1128 |                                              , 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 | ||||||||||||||||||||||||
| 1129 |                                                   ((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 | ||||||||||||||||||||||||
| 1130 |                                                       ,  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 | ||||||||||||||||||||||||
| 1131 |                                                         ((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 | ||||||||||||||||||||||||
| 1132 |                                                             ); 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 | ||||||||||||||||||||||||
| 1133 | } | - | ||||||||||||||||||||||||
| 1134 | - | |||||||||||||||||||||||||
| 1135 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 1136 | PEM_read_SSL_SESSION(FILE *fp, SSL_SESSION **x, pem_password_cb *cb, void *u) | - | ||||||||||||||||||||||||
| 1137 | { | - | ||||||||||||||||||||||||
| 1138 |  return never executed:   PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION,return PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", fp, (void **)x, cb, u);never executed:  return PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", fp, (void **)x, cb, u); | 0 | ||||||||||||||||||||||||
| 1139 |      "SSL SESSION PARAMETERS", fp, (void **)x, cb, u); never executed:  return PEM_ASN1_read((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", fp, (void **)x, cb, u); | 0 | ||||||||||||||||||||||||
| 1140 | } | - | ||||||||||||||||||||||||
| 1141 | - | |||||||||||||||||||||||||
| 1142 | SSL_SESSION * | - | ||||||||||||||||||||||||
| 1143 | PEM_read_bio_SSL_SESSION(BIO *bp, SSL_SESSION **x, pem_password_cb *cb, void *u) | - | ||||||||||||||||||||||||
| 1144 | { | - | ||||||||||||||||||||||||
| 1145 |  return never executed:   PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION,return PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", bp, (void **)x, cb, u);never executed:  return PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", bp, (void **)x, cb, u); | 0 | ||||||||||||||||||||||||
| 1146 |      "SSL SESSION PARAMETERS", bp, (void **)x, cb, u); never executed:  return PEM_ASN1_read_bio((d2i_of_void *)d2i_SSL_SESSION, "SSL SESSION PARAMETERS", bp, (void **)x, cb, u); | 0 | ||||||||||||||||||||||||
| 1147 | } | - | ||||||||||||||||||||||||
| 1148 | - | |||||||||||||||||||||||||
| 1149 | int | - | ||||||||||||||||||||||||
| 1150 | PEM_write_bio_SSL_SESSION(BIO *bp, SSL_SESSION *x) | - | ||||||||||||||||||||||||
| 1151 | { | - | ||||||||||||||||||||||||
| 1152 |  return never executed:   PEM_ASN1_write_bio((i2d_of_void *)i2d_SSL_SESSION,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) );never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1153 |      "SSL SESSION PARAMETERS", bp, x,  never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1154 |                                    ((void *)0) never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1155 |                                        ,  never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1156 |                                          ((void *)0) never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1157 |                                              , 0,  never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1158 |                                                   ((void *)0) never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1159 |                                                       ,  never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1160 |                                                         ((void *)0) never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1161 |                                                             ); never executed:  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) ); | 0 | ||||||||||||||||||||||||
| 1162 | } | - | ||||||||||||||||||||||||
| Switch to Source code | Preprocessed file |