emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnutls-protocol-version<


From: Robert Pluim
Subject: Re: gnutls-protocol-version<
Date: Tue, 03 Sep 2019 16:37:58 +0200

>>>>> On Tue, 3 Sep 2019 06:02:45 -0700, Paul Eggert <address@hidden> said:

    Paul> Robert Pluim wrote:
    >> (gnutls-protocol-version< V1 V2)
    >> Return t if TLS protocol version V1 is lower than V2.

    Paul> Alternatively you could get the TLS protocol version as a
    Paul> string, and

Thatʼs already available via gnutls-peer-status

    Paul> use string-version-lessp; that might be simpler.

That works, although it does assume that TLS version strings won't do
anything silly in the future like change prefix (they have done in the
past from SSL -> TLS, but S<T so thatʼs OK).

One nit is this:

(string-version-lessp "TLS1.3" nil) => t

which is somewhat surprising, but doesnʼt matter for my use case.

Robert



reply via email to

[Prev in Thread] Current Thread [Next in Thread]