* Re: gnus/starttls.el and net/tls.el
[not found] <E1Ipflm-0004Yx-6I@fencepost.gnu.org>
@ 2007-11-08 13:35 ` Simon Josefsson
2007-11-09 22:00 ` Richard Stallman
0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2007-11-08 13:35 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
(I'm cc'ing emacs-devel since there appears to be other threads
discussing this already.)
Richard Stallman <rms@gnu.org> writes:
> Can you tell me how these two files relate to each other?
They both create a TLS encrypted network socket using external tools,
but there is some differences:
tls.el starts talking TLS to the server directly. starttls.el, however,
does not begin talking TLS until the application calls
starttls-negotiate. In other words, starttls.el allows an unencrypted
phase before the encrypted phase starts.
tls.el can use openssl and gnutls. starttls.el can use gnutls and a
tool called 'starttls'.
They serve (slightly) different purposes, but there is some code
duplication. They probably should be merged eventually, but it requires
some effort (especially testing on many operating systems) and I'm
afraid I don't have time to work on it.
/Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-08 13:35 ` gnus/starttls.el and net/tls.el Simon Josefsson
@ 2007-11-09 22:00 ` Richard Stallman
2007-11-15 14:20 ` Simon Josefsson
0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2007-11-09 22:00 UTC (permalink / raw)
To: Simon Josefsson; +Cc: emacs-devel
tls.el starts talking TLS to the server directly. starttls.el, however,
does not begin talking TLS until the application calls
starttls-negotiate. In other words, starttls.el allows an unencrypted
phase before the encrypted phase starts.
Would it be hard to extend tls.el to provide a way to do this?
tls.el can use openssl and gnutls. starttls.el can use gnutls and a
tool called 'starttls'.
What is the point of `starttls'? For what purpose is it useful
to use that, rather than GNUtls?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-09 22:00 ` Richard Stallman
@ 2007-11-15 14:20 ` Simon Josefsson
2007-11-16 4:29 ` Richard Stallman
0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2007-11-15 14:20 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> tls.el starts talking TLS to the server directly. starttls.el, however,
> does not begin talking TLS until the application calls
> starttls-negotiate. In other words, starttls.el allows an unencrypted
> phase before the encrypted phase starts.
>
> Would it be hard to extend tls.el to provide a way to do this?
It would require some work, but it is possible. (Alas, I don't think I
have time to do it.)
Semantically, the tls-package could be implemented via starttls.el by
calling the 'open' and then the 'negotiate' function. However, tls.el
and starttls.el differ by supporting different external tools, so some
users may get upset if, e.g., the 'starttls' or 'OpenSSL' way stops
working.
I'm not sure I understand the reason though. Is it to avoid having two
files? If so, how about moving the code in starttls.el into tls.el?
That would make it easier to slowly re-factor the code to avoid code
duplication. On the other hand, starttls.el is used by a couple of
packages already, which may break.
> tls.el can use openssl and gnutls. starttls.el can use gnutls and a
> tool called 'starttls'.
>
> What is the point of `starttls'? For what purpose is it useful
> to use that, rather than GNUtls?
Today, I don't think there is any reason, but I may be biased towards
favoring GnuTLS. gnutls-cli didn't used to support starttls operations,
but it does today. As far as I remember, 'starttls' doesn't verify
server certificates, so starttls may be considered insecure.
/Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-15 14:20 ` Simon Josefsson
@ 2007-11-16 4:29 ` Richard Stallman
2007-11-26 15:28 ` Simon Josefsson
0 siblings, 1 reply; 9+ messages in thread
From: Richard Stallman @ 2007-11-16 4:29 UTC (permalink / raw)
To: Simon Josefsson; +Cc: emacs-devel
I'm not sure I understand the reason though. Is it to avoid having two
files?
It is to avoid the code duplication.
If so, how about moving the code in starttls.el into tls.el?
I don't exactly object, but I am not sure that is the best way.
Today, I don't think there is any reason, but I may be biased towards
favoring GnuTLS. gnutls-cli didn't used to support starttls operations,
but it does today. As far as I remember, 'starttls' doesn't verify
server certificates, so starttls may be considered insecure.
It sounds like the thing to do is to reimplement the useful features
of starttls.el in tls.el.
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-16 4:29 ` Richard Stallman
@ 2007-11-26 15:28 ` Simon Josefsson
2007-11-26 22:39 ` Richard Stallman
2007-11-28 13:44 ` Sascha Wilde
0 siblings, 2 replies; 9+ messages in thread
From: Simon Josefsson @ 2007-11-26 15:28 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Richard Stallman <rms@gnu.org> writes:
> I'm not sure I understand the reason though. Is it to avoid having two
> files?
>
> It is to avoid the code duplication.
>
> If so, how about moving the code in starttls.el into tls.el?
>
> I don't exactly object, but I am not sure that is the best way.
>
> Today, I don't think there is any reason, but I may be biased towards
> favoring GnuTLS. gnutls-cli didn't used to support starttls operations,
> but it does today. As far as I remember, 'starttls' doesn't verify
> server certificates, so starttls may be considered insecure.
>
> It sounds like the thing to do is to reimplement the useful features
> of starttls.el in tls.el.
The problem is the different set of external dependencies:
tls.el: use gnutls-cli (GnuTLS) or s_client (OpenSSL)
starttls.el: use gnutls-cli (GnuTLS) or starttls
As far as I can tell, OpenSSL does not support the general starttls
behaviour, so we cannot switch to that tls.el and starttls.el both
support gnutls+openssl. Depending on which mode you want to support
(direct tls or the starttls approach) the tls.el code need to change
which tool it uses. Merging the code paths will lead to a rather
complex code-path, which is tricky to code and debug. It will likely
also lead to new or different user variables, which will break existing
users configurations, which is another problem.
I'm afraid I don't have time to work on this now. If someone else likes
to do it, I could try to help in discussions.
/Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-26 15:28 ` Simon Josefsson
@ 2007-11-26 22:39 ` Richard Stallman
2007-11-28 13:44 ` Sascha Wilde
1 sibling, 0 replies; 9+ messages in thread
From: Richard Stallman @ 2007-11-26 22:39 UTC (permalink / raw)
To: Simon Josefsson; +Cc: emacs-devel
I guess we are stuck with the duplication.
Could you write some text to compare the capabilities
and uses of tls.el and starttls.el, so people can tell which
is best for a given use, and insert that in the comments section
of both tls.el and starttls.el?
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-26 15:28 ` Simon Josefsson
2007-11-26 22:39 ` Richard Stallman
@ 2007-11-28 13:44 ` Sascha Wilde
2007-11-29 11:34 ` Simon Josefsson
1 sibling, 1 reply; 9+ messages in thread
From: Sascha Wilde @ 2007-11-28 13:44 UTC (permalink / raw)
To: rms; +Cc: emacs-devel
Simon Josefsson <simon@josefsson.org> wrote:
> The problem is the different set of external dependencies:
>
> tls.el: use gnutls-cli (GnuTLS) or s_client (OpenSSL)
> starttls.el: use gnutls-cli (GnuTLS) or starttls
>
> As far as I can tell, OpenSSL does not support the general starttls
> behaviour, so we cannot switch to that tls.el and starttls.el both
> support gnutls+openssl.
I'm not sure that I properly understood the problem (and I haven't read
the whole thread), but OpenSSL supports StartTLS, like:
openssl s_client -starttls smtp -connect mail.example.com
does this do what you need to support s_client in starttls.el?
cheers
sascha
--
Sascha Wilde : The sum of intelligence on earth is a constant;
: population is growing
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-28 13:44 ` Sascha Wilde
@ 2007-11-29 11:34 ` Simon Josefsson
2007-11-29 12:08 ` Sascha Wilde
0 siblings, 1 reply; 9+ messages in thread
From: Simon Josefsson @ 2007-11-29 11:34 UTC (permalink / raw)
To: Sascha Wilde; +Cc: rms, emacs-devel
Sascha Wilde <wilde@sha-bang.de> writes:
> Simon Josefsson <simon@josefsson.org> wrote:
>> The problem is the different set of external dependencies:
>>
>> tls.el: use gnutls-cli (GnuTLS) or s_client (OpenSSL)
>> starttls.el: use gnutls-cli (GnuTLS) or starttls
>>
>> As far as I can tell, OpenSSL does not support the general starttls
>> behaviour, so we cannot switch to that tls.el and starttls.el both
>> support gnutls+openssl.
>
> I'm not sure that I properly understood the problem (and I haven't read
> the whole thread), but OpenSSL supports StartTLS, like:
>
> openssl s_client -starttls smtp -connect mail.example.com
>
> does this do what you need to support s_client in starttls.el?
Not entirely, OpenSSL only supports starttls for a few application
protocols:
-starttls prot - use the STARTTLS command before starting TLS
for those protocols that support it, where
'prot' defines which one to assume. Currently,
only "smtp", "pop3", "imap", and "ftp" are supported.
Right now, in Emacs, I think starttls support is used for IMAP, SMTP,
POP3 and ManageSieve. There is no support for Managesieve in OpenSSL...
Further, the starttls elisp functions in Emacs are application protocol
agnostic, so we would have to add a parameter to indicate which
application protocol is used. That seems like a API layer violation,
but if there were no other problem (like the managesieve issue), maybe
we could do that.
/Simon
^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: gnus/starttls.el and net/tls.el
2007-11-29 11:34 ` Simon Josefsson
@ 2007-11-29 12:08 ` Sascha Wilde
0 siblings, 0 replies; 9+ messages in thread
From: Sascha Wilde @ 2007-11-29 12:08 UTC (permalink / raw)
To: Simon Josefsson; +Cc: rms, emacs-devel
Simon Josefsson <simon@josefsson.org> wrote:
> Sascha Wilde <wilde@sha-bang.de> writes:
>> Simon Josefsson <simon@josefsson.org> wrote:
>>> The problem is the different set of external dependencies:
>>>
>>> tls.el: use gnutls-cli (GnuTLS) or s_client (OpenSSL)
>>> starttls.el: use gnutls-cli (GnuTLS) or starttls
[...]
>> I'm not sure that I properly understood the problem (and I haven't read
>> the whole thread), but OpenSSL supports StartTLS, like:
>>
>> openssl s_client -starttls smtp -connect mail.example.com
>>
>> does this do what you need to support s_client in starttls.el?
>
> Not entirely, OpenSSL only supports starttls for a few application
> protocols:
True. What a pity (well, not to much for replacing OpenSSL with GnuTLS
is a good thing anyway, IMO).
> Right now, in Emacs, I think starttls support is used for IMAP, SMTP,
> POP3 and ManageSieve. There is no support for Managesieve in OpenSSL...
I see. I haven't thought of managesieve here.
cheers
sascha
--
Sascha Wilde
Nota bene: wenn Word für Längeres geeignet wäre, würde es schließlich
nicht Word, sondern Sentence, Page oder Article heißen
-- Matthias Mühlich in dctt
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2007-11-29 12:08 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <E1Ipflm-0004Yx-6I@fencepost.gnu.org>
2007-11-08 13:35 ` gnus/starttls.el and net/tls.el Simon Josefsson
2007-11-09 22:00 ` Richard Stallman
2007-11-15 14:20 ` Simon Josefsson
2007-11-16 4:29 ` Richard Stallman
2007-11-26 15:28 ` Simon Josefsson
2007-11-26 22:39 ` Richard Stallman
2007-11-28 13:44 ` Sascha Wilde
2007-11-29 11:34 ` Simon Josefsson
2007-11-29 12:08 ` Sascha Wilde
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.