View | Details | Raw Unified | Return to bug 57540
Collapse All | Expand All

(-)coyote/http11/Http11Processor.java (+5 lines)
Lines 975-980 Link Here
975
                        request.setAttribute
975
                        request.setAttribute
976
                            (SSLSupport.SESSION_ID_KEY, sslO);
976
                            (SSLSupport.SESSION_ID_KEY, sslO);
977
                    }
977
                    }
978
                    sslO = sslSupport.getProtocol();
979
                    if (sslO != null) {
980
                        request.setAttribute
981
                            (SSLSupport.PROTOCOL_VERSION_KEY, sslO);
982
                    }
978
                    request.setAttribute(SSLSupport.SESSION_MGR, sslSupport);
983
                    request.setAttribute(SSLSupport.SESSION_MGR, sslSupport);
979
                }
984
                }
980
            } catch (Exception e) {
985
            } catch (Exception e) {
(-)tomcat/util/net/AprSSLSupport.java (+5 lines)
Lines 117-120 Link Here
117
            throw new IOException(e);
117
            throw new IOException(e);
118
        }
118
        }
119
    }
119
    }
120
    
121
    @Override
122
    public String getProtocol() throws IOException {
123
       throw new IOException("method not yet implemented");
124
   }
120
}
125
}
(-)tomcat/util/net/SSLSupport.java (+11 lines)
Lines 55-60 Link Here
55
    public static final String SESSION_MGR =
55
    public static final String SESSION_MGR =
56
            "javax.servlet.request.ssl_session_mgr";
56
            "javax.servlet.request.ssl_session_mgr";
57
57
58
    /**
59
     * as per https://issues.apache.org/bugzilla/show_bug.cgi?id=57540 to find out whether the socket was created with TLSv1 or TLSv1.2 etc.
60
     */
61
    public static final String PROTOCOL_VERSION_KEY =
62
            "org.apache.tomcat.util.net.secure_protocol_version";
58
63
59
    /**
64
    /**
60
     * A mapping table to determine the number of effective bits in the key
65
     * A mapping table to determine the number of effective bits in the key
Lines 124-129 Link Here
124
     * @throws IOException If an error occurs trying to obtain the session ID
129
     * @throws IOException If an error occurs trying to obtain the session ID
125
     */
130
     */
126
    public String getSessionId() throws IOException;
131
    public String getSessionId() throws IOException;
132
    
133
134
    /**
135
     * as per https://issues.apache.org/bugzilla/show_bug.cgi?id=57540 to find out whether the socket was created with TLSv1 or TLSv1.2 etc.
136
     */
137
    public String getProtocol() throws IOException;
127
138
128
    /**
139
    /**
129
     * Simple data class that represents the cipher being used, along with the
140
     * Simple data class that represents the cipher being used, along with the
(-)tomcat/util/net/jsse/JSSESupport.java (+8 lines)
Lines 182-186 Link Here
182
    public void invalidateSession() {
182
    public void invalidateSession() {
183
        session.invalidate();
183
        session.invalidate();
184
    }
184
    }
185
    
186
    @Override
187
    public String getProtocol() throws IOException {
188
        if (session == null)
189
           return null;
190
       return session.getProtocol();
191
   }
192
    
185
}
193
}
186
194
(-)tomcat/util/net/jsse/openssl/Protocol.java (+2 lines)
Lines 22-27 Link Here
22
    SSLv3("SSLv3"),
22
    SSLv3("SSLv3"),
23
    SSLv2("SSLv2"),
23
    SSLv2("SSLv2"),
24
    TLSv1("SSLv3"),
24
    TLSv1("SSLv3"),
25
    TLSv1_0("TLSv1"),
26
    TLSv1_1("TLSv1.1"),
25
    TLSv1_2("TLSv1.2");
27
    TLSv1_2("TLSv1.2");
26
28
27
    private final String openSSLName;
29
    private final String openSSLName;

Return to bug 57540