summaryrefslogtreecommitdiff
path: root/crypto/openssl/ssl/ssl_lib.c
diff options
context:
space:
mode:
authorJacques Vidrine <nectar@FreeBSD.org>2003-02-19 23:17:42 +0000
committerJacques Vidrine <nectar@FreeBSD.org>2003-02-19 23:17:42 +0000
commit015ec3c905309d93aded0cb5fd0ab620cb881e07 (patch)
treea69ee61bbf542766bf3da5184b2fbaec03d0c6fe /crypto/openssl/ssl/ssl_lib.c
parent0c977c9c53916de8a0f52bac1e50a6d89e22801d (diff)
parentfceca8a37790004b7d28e0ba02bd2d47101a818f (diff)
Notes
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);