ssl_sess.c (72613) | ssl_sess.c (100928) |
---|---|
1/* ssl/ssl_sess.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 409 unchanged lines hidden (view full) --- 418static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck) 419 { 420 SSL_SESSION *r; 421 int ret=0; 422 423 if ((c != NULL) && (c->session_id_length != 0)) 424 { 425 if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); | 1/* ssl/ssl_sess.c */ 2/* Copyright (C) 1995-1998 Eric Young (eay@cryptsoft.com) 3 * All rights reserved. 4 * 5 * This package is an SSL implementation written 6 * by Eric Young (eay@cryptsoft.com). 7 * The implementation was written so as to conform with Netscapes SSL. 8 * --- 409 unchanged lines hidden (view full) --- 418static int remove_session_lock(SSL_CTX *ctx, SSL_SESSION *c, int lck) 419 { 420 SSL_SESSION *r; 421 int ret=0; 422 423 if ((c != NULL) && (c->session_id_length != 0)) 424 { 425 if(lck) CRYPTO_w_lock(CRYPTO_LOCK_SSL_CTX); |
426 r=(SSL_SESSION *)lh_delete(ctx->sessions,c); 427 if (r != NULL) | 426 if ((r = (SSL_SESSION *)lh_retrieve(ctx->sessions,c)) == c) |
428 { 429 ret=1; | 427 { 428 ret=1; |
429 r=(SSL_SESSION *)lh_delete(ctx->sessions,c); |
|
430 SSL_SESSION_list_remove(ctx,c); 431 } 432 433 if(lck) CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); 434 435 if (ret) 436 { 437 r->not_resumable=1; --- 244 unchanged lines hidden --- | 430 SSL_SESSION_list_remove(ctx,c); 431 } 432 433 if(lck) CRYPTO_w_unlock(CRYPTO_LOCK_SSL_CTX); 434 435 if (ret) 436 { 437 r->not_resumable=1; --- 244 unchanged lines hidden --- |