Re: tls_listen vs ssl_listen (Was: Thunderbird 3.1 SSL/TLS Renegotiation)

Joachim Sehlstedt <[email protected]>
Newsgroups gmane.mail.perdition.user
Organization NewStyleData
Message-ID <[email protected]>
  Hi,

Was looking at some other applications to see how they handle it and it 
seems most does it the way your patch do it. This is from Postfix and 
Cyrus IMAP for an example:

client_ctx = SSL_CTX_new(SSLv23_client_method())

and

s_ctx = SSL_CTX_new(SSLv23_server_method());

greetings
JS




On 2010-07-30 05:01, Simon Horman wrote:
> On Tue, Jul 27, 2010 at 03:48:29PM +0200, Joachim Sehlstedt wrote:
>
> [snip]
>
>>> Is that this line?
>>>
>>> 	ssl_method = SSLv23_method();
>> Yes it is, should have included that for you.
>>
>>> I'm not seeing the warniing here.
>>> Which version of gcc and libssl do you have?
>>> Alternatively, do you know what the problem is?
>> Running gcc 4.3.3 here and OpenSSL 1.0.0a.
>>
>>> Lastly, taking a stab in the dark, does this help?
>>>
>>> Index: perdition/perdition/ssl.c
>>> ===================================================================
>>> --- perdition.orig/perdition/ssl.c	2010-07-27 18:35:15.000000000 +0900
>>> +++ perdition/perdition/ssl.c	2010-07-27 18:35:44.000000000 +0900
>>> @@ -492,7 +492,6 @@ SSL_CTX *perdition_ssl_ctx(const char *c
>>>    		const char *cert, const char *privkey,
>>>    		const char *ca_chain_file, const char *ciphers, flag_t flag)
>>>    {
>>> -	SSL_METHOD *ssl_method;
>>>    	SSL_CTX *ssl_ctx, *out = NULL;
>>>    	const char *use_ca_file = NULL;
>>>    	const char *use_ca_path = NULL;
>>> @@ -519,10 +518,9 @@ SSL_CTX *perdition_ssl_ctx(const char *c
>>>    	 * Initialise an SSL context
>>>    	 */
>>>    	SSLeay_add_ssl_algorithms();
>>> -	ssl_method = SSLv23_method();
>>>    	SSL_load_error_strings();
>>>
>>> -	ssl_ctx = SSL_CTX_new(ssl_method);
>>> +	ssl_ctx = SSL_CTX_new(SSLv23_method());
>>>    	if (!ssl_ctx) {
>>>    		PERDITION_DEBUG_SSL_ERR("SSL_CTX_new");
>>>    		return NULL;
>> Not only does it take away the build warning, it also removes the error
>> I get on the first connect I listed above.
> Curious. Thanks for the feedback.
>
> The new code seems obviously correct (although the old code isn't obviously
> wrong to me) so I will push this into the tree. Sorry that I didn't do it
> for rc3.
>
>
______________________________________________
Perdition-users mailing list
[email protected]
http://lists.vergenet.net/listinfo/perdition-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.