c88f9f55a523f128f0e4dace76a34724bfa1e88c |
|
08-Dec-2017 |
Nathan Mittler <nathanmittler@google.com> |
Refactoring externalization of SSLSessions (#383) This is an implementation to #381. This change attempts to provide more consistency to the session that is returned to the caller by `ConscryptEngine`/`ConscryptFileDescriptorSocket`. Main changes: - New interface ConscryptSession adds a few methods currently only defined by ActiveSession - New interface SessionDecorator that defines getDelegate() - New class ProvidedSessionDecorator delegates to an external provider of the "current" session. The provider implementations are in ConscryptEngine and ConscryptFileDescriptorSocket. - New class SessionSnapshot that takes a snapshot of any ConscryptSession. - Changed ActiveSession and SSLNullSession to implement ConscryptSession. - Updated ConscryptEngine/ConscryptFileDescriptorSocket to create a SessionSnapshot when closing. Additional cleanup: - Split out Java7SessionWrapper into two classes: Java7ExtendedSSLSession and Java8ExtendedSSLSession. The Java 8 version no longer requires reflection and is more consistent with platform-specific code elsewhere. Both classes implement SessionDecorator. - Renamed SslWrapper->NativeSsl and SslSessionWrapper->NativeSslSession for clarity, since the term "wrapper" was being overloaded. Fixes #379
/external/conscrypt/common/src/main/java/org/conscrypt/ConscryptSession.java
|