You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2018/10/11 20:20:45 UTC
svn commit: r1843600 - /tomcat/native/trunk/native/src/ssl.c
Author: markt
Date: Thu Oct 11 20:20:44 2018
New Revision: 1843600
URL: http://svn.apache.org/viewvc?rev=1843600&view=rev
Log:
Add additional hooks to enable Tomcat to determine if post-handshake authentication is in progress.
Add missing dummy methods for when OpenSSL is not present.
Modified:
tomcat/native/trunk/native/src/ssl.c
Modified: tomcat/native/trunk/native/src/ssl.c
URL: http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/ssl.c?rev=1843600&r1=1843599&r2=1843600&view=diff
==============================================================================
--- tomcat/native/trunk/native/src/ssl.c (original)
+++ tomcat/native/trunk/native/src/ssl.c Thu Oct 11 20:20:44 2018
@@ -1540,6 +1540,41 @@ TCN_IMPLEMENT_CALL(jint, SSL, renegotiat
return SSL_renegotiate_pending(ssl_);
}
+TCN_IMPLEMENT_CALL(jint, SSL, verifyClientPostHandshake)(TCN_STDARGS,
+ jlong ssl /* SSL * */) {
+ SSL *ssl_ = J2P(ssl, SSL *);
+ tcn_ssl_conn_t *con;
+
+ if (ssl_ == NULL) {
+ tcn_ThrowException(e, "ssl is null");
+ return 0;
+ }
+
+ UNREFERENCED(o);
+
+ con = (tcn_ssl_conn_t *)SSL_get_app_data(ssl_);
+ con->pha_state = PHA_STARTED;
+
+ return SSL_verify_client_post_handshake(ssl_);
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, getPostHandshakeAuthInProgress)(TCN_STDARGS,
+ jlong ssl /* SSL * */) {
+ SSL *ssl_ = J2P(ssl, SSL *);
+ tcn_ssl_conn_t *con;
+
+ if (ssl_ == NULL) {
+ tcn_ThrowException(e, "ssl is null");
+ return 0;
+ }
+
+ UNREFERENCED(o);
+
+ con = (tcn_ssl_conn_t *)SSL_get_app_data(ssl_);
+
+ return (con->pha_state == PHA_STARTED);
+}
+
/* Read which protocol was negotiated for the given SSL *. */
TCN_IMPLEMENT_CALL(jstring, SSL, getNextProtoNegotiated)(TCN_STDARGS,
jlong ssl /* SSL * */) {
@@ -2168,6 +2203,27 @@ TCN_IMPLEMENT_CALL(jint, SSL, renegotiat
UNREFERENCED(o);
UNREFERENCED(ssl);
tcn_ThrowException(e, "Not implemented");
+ return 0;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, renegotiatePending)(TCN_STDARGS, jlong ssl) {
+ UNREFERENCED(o);
+ UNREFERENCED(ssl);
+ tcn_ThrowException(e, "Not implemented");
+ return 0;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, verifyClientPostHandshake)(TCN_STDARGS, jlong ssl) {
+ UNREFERENCED(o);
+ UNREFERENCED(ssl);
+ tcn_ThrowException(e, "Not implemented");
+ return 0;
+}
+
+TCN_IMPLEMENT_CALL(jint, SSL, getPostHandshakeAuthInProgress)(TCN_STDARGS, jlong ssl) {
+ UNREFERENCED(o);
+ UNREFERENCED(ssl);
+ tcn_ThrowException(e, "Not implemented");
return 0;
}
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org