TLS ALPN Proposal

Simone Bordet simone.bordet at gmail.com
Sat May 23 13:45:45 UTC 2015


Hi,

On Sat, May 23, 2015 at 3:13 AM, Bradford Wetmore
<bradford.wetmore at oracle.com> wrote:
> Thanks for the thorough reviews and comments, I really appreciate it and
> always learn something.  FunctionalInterface (@since 1.8) is something I
> haven't really explored yet, so off to the books.

Just to be clear, this is what I am proposing:

class SSLParameters
{
    ...
    List<String> getApplicationProtocols();
    void setApplicationProtocols(List<String> protocols);
    void setApplicationProtocolSelector(ApplicationProtocolSelector selector);
    ApplicationProtocolSelector getApplicationProtocolSelector();
}

@FunctionalInterface
interface ApplicationProtocolSelector
{
    String select(List<String> protocols) throws SSLException;
}

In this way, there is no need for a SSLBase to converge SSLSocket and
SSLEngine, the ApplicationProtocolSelector can be specified as a
lambda expression on SSLParameters, and everything is much simpler.

-- 
Simone Bordet
http://bordet.blogspot.com
---
Finally, no matter how good the architecture and design are,
to deliver bug-free software with optimal performance and reliability,
the implementation technique must be flawless.   Victoria Livschitz


More information about the security-dev mailing list