aboutsummaryrefslogtreecommitdiffstats
path: root/crypto/openssl/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-02-20 15:07:39 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-02-20 15:07:39 +0000
commit926f0ac271c4ccf1edddcdbe6981a58abab0c2e2 (patch)
treea578e3f0094b3cf492491a687e13c8b111d8a176 /crypto/openssl/ssl/ssl_lib.c
parent715403e9fcb7ec321e505e15d80538ead5434f23 (diff)
downloadsrc-926f0ac271c4ccf1edddcdbe6981a58abab0c2e2.tar.gz
src-926f0ac271c4ccf1edddcdbe6981a58abab0c2e2.zip
MFC OpenSSL 0.9.7a.
Approved by: re (murray)
Notes
Notes: svn path=/stable/4/; revision=111177
Diffstat (limited to 'crypto/openssl/ssl/ssl_lib.c')
-rw-r--r--crypto/openssl/ssl/ssl_lib.c35
1 files changed, 21 insertions, 14 deletions
diff --git a/crypto/openssl/ssl/ssl_lib.c b/crypto/openssl/ssl/ssl_lib.c
index 091326f5d6fd..ddd811458779 100644
--- a/crypto/openssl/ssl/ssl_lib.c
+++ b/crypto/openssl/ssl/ssl_lib.c
@@ -1069,14 +1069,17 @@ int ssl_cipher_ptr_id_cmp(const SSL_CIPHER * const *ap,
* preference */
STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s)
{
- if ((s != NULL) && (s->cipher_list != NULL))
- {
- return(s->cipher_list);
- }
- else if ((s->ctx != NULL) &&
- (s->ctx->cipher_list != NULL))
+ if (s != NULL)
{
- return(s->ctx->cipher_list);
+ if (s->cipher_list != NULL)
+ {
+ return(s->cipher_list);
+ }
+ else if ((s->ctx != NULL) &&
+ (s->ctx->cipher_list != NULL))
+ {
+ return(s->ctx->cipher_list);
+ }
}
return(NULL);
}
@@ -1085,14 +1088,17 @@ STACK_OF(SSL_CIPHER) *SSL_get_ciphers(SSL *s)
* algorithm id */
STACK_OF(SSL_CIPHER) *ssl_get_ciphers_by_id(SSL *s)
{
- if ((s != NULL) && (s->cipher_list_by_id != NULL))
- {
- return(s->cipher_list_by_id);
- }
- else if ((s != NULL) && (s->ctx != NULL) &&
- (s->ctx->cipher_list_by_id != NULL))
+ if (s != NULL)
{
- return(s->ctx->cipher_list_by_id);
+ if (s->cipher_list_by_id != NULL)
+ {
+ return(s->cipher_list_by_id);
+ }
+ else if ((s->ctx != NULL) &&
+ (s->ctx->cipher_list_by_id != NULL))
+ {
+ return(s->ctx->cipher_list_by_id);
+ }
}
return(NULL);
}
@@ -1890,6 +1896,7 @@ SSL *SSL_dup(SSL *s)
* they should not both point to the same object,
* and thus we can't use SSL_copy_session_id. */
+ ret->method->ssl_free(ret);
ret->method = s->method;
ret->method->ssl_new(ret);