diff options
| author | markus <> | 2002-09-14 11:18:04 +0000 |
|---|---|---|
| committer | markus <> | 2002-09-14 11:18:04 +0000 |
| commit | 3a3a489a756f2852d798376f20cc0d4ab609c866 (patch) | |
| tree | 2a4277fc9b7635e82c33faa3bae9f9380bc639e8 /src/lib/libssl/ssl_lib.c | |
| parent | 82d2611e1bb67683df1bb201dcc2afbff4c76980 (diff) | |
| download | openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.gz openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.tar.bz2 openbsd-3a3a489a756f2852d798376f20cc0d4ab609c866.zip | |
merge with openssl-0.9.7-stable-SNAP-20020911,
new minor for libcrypto (_X509_REQ_print_ex)
tested by miod@, pb@
Diffstat (limited to 'src/lib/libssl/ssl_lib.c')
| -rw-r--r-- | src/lib/libssl/ssl_lib.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/src/lib/libssl/ssl_lib.c b/src/lib/libssl/ssl_lib.c index 4a87a146e3..4bc4ce5b3a 100644 --- a/src/lib/libssl/ssl_lib.c +++ b/src/lib/libssl/ssl_lib.c | |||
| @@ -1405,13 +1405,24 @@ void SSL_CTX_free(SSL_CTX *a) | |||
| 1405 | abort(); /* ok */ | 1405 | abort(); /* ok */ |
| 1406 | } | 1406 | } |
| 1407 | #endif | 1407 | #endif |
| 1408 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data); | ||
| 1409 | 1408 | ||
| 1409 | /* | ||
| 1410 | * Free internal session cache. However: the remove_cb() may reference | ||
| 1411 | * the ex_data of SSL_CTX, thus the ex_data store can only be removed | ||
| 1412 | * after the sessions were flushed. | ||
| 1413 | * As the ex_data handling routines might also touch the session cache, | ||
| 1414 | * the most secure solution seems to be: empty (flush) the cache, then | ||
| 1415 | * free ex_data, then finally free the cache. | ||
| 1416 | * (See ticket [openssl.org #212].) | ||
| 1417 | */ | ||
| 1410 | if (a->sessions != NULL) | 1418 | if (a->sessions != NULL) |
| 1411 | { | ||
| 1412 | SSL_CTX_flush_sessions(a,0); | 1419 | SSL_CTX_flush_sessions(a,0); |
| 1420 | |||
| 1421 | CRYPTO_free_ex_data(CRYPTO_EX_INDEX_SSL_CTX, a, &a->ex_data); | ||
| 1422 | |||
| 1423 | if (a->sessions != NULL) | ||
| 1413 | lh_free(a->sessions); | 1424 | lh_free(a->sessions); |
| 1414 | } | 1425 | |
| 1415 | if (a->cert_store != NULL) | 1426 | if (a->cert_store != NULL) |
| 1416 | X509_STORE_free(a->cert_store); | 1427 | X509_STORE_free(a->cert_store); |
| 1417 | if (a->cipher_list != NULL) | 1428 | if (a->cipher_list != NULL) |
| @@ -2289,10 +2300,3 @@ void SSL_set_msg_callback(SSL *ssl, void (*cb)(int write_p, int version, int con | |||
| 2289 | 2300 | ||
| 2290 | IMPLEMENT_STACK_OF(SSL_CIPHER) | 2301 | IMPLEMENT_STACK_OF(SSL_CIPHER) |
| 2291 | IMPLEMENT_STACK_OF(SSL_COMP) | 2302 | IMPLEMENT_STACK_OF(SSL_COMP) |
| 2292 | |||
| 2293 | void OpenSSLDie(const char *file,int line,const char *assertion) | ||
| 2294 | { | ||
| 2295 | fprintf(stderr,"%s(%d): OpenSSL internal error, assertion failed: %s\n", | ||
| 2296 | file,line,assertion); | ||
| 2297 | abort(); | ||
| 2298 | } | ||
