On 02/11/2015 14:32, Christopher Schultz wrote: > Mark, > > On 10/31/15 2:57 PM, ma...@apache.org wrote: >> Author: markt >> Date: Sat Oct 31 18:57:58 2015 >> New Revision: 1711667 >> >> URL: http://svn.apache.org/viewvc?rev=1711667&view=rev >> Log: >> Update ignores >> >> Modified: >> tomcat/native/trunk/native/ (props changed) >> tomcat/native/trunk/native/src/sslcontext.c >> >> Propchange: tomcat/native/trunk/native/ >> ------------------------------------------------------------------------------ >> --- svn:ignore (added) >> +++ svn:ignore Sat Oct 31 18:57:58 2015 >> @@ -0,0 +1,9 @@ >> +.make.dirs >> +Makefile >> +build-outputs.mk >> +config.log >> +config.nice >> +config.status >> +configure >> +tcnative.pc >> +tcnative.spec >> >> Modified: tomcat/native/trunk/native/src/sslcontext.c >> URL: >> http://svn.apache.org/viewvc/tomcat/native/trunk/native/src/sslcontext.c?rev=1711667&r1=1711666&r2=1711667&view=diff >> ============================================================================== >> --- tomcat/native/trunk/native/src/sslcontext.c (original) >> +++ tomcat/native/trunk/native/src/sslcontext.c Sat Oct 31 18:57:58 2015 >> @@ -106,12 +106,14 @@ int ssl_callback_ServerNameIndication(SS >> hostname = (*env)->NewStringUTF(env, servername); >> original_ssl_context = P2J(c->ctx); >> >> - // Make the call >> - new_ssl_context = (*env)->CallStaticLongMethod(env, >> - >> ssl_context_class, >> - >> sni_java_callback, >> - >> original_ssl_context, >> - hostname); >> + // Make the call only if the statis methos exists >> + if (sni_java_callback != 0) { >> + new_ssl_context = (*env)->CallStaticLongMethod(env, >> + ssl_context_class, >> + sni_java_callback, >> + original_ssl_context, >> + hostname); >> + } >> >> if (original_ssl_context != new_ssl_context) { >> SSL_set_SSL_CTX(ssl, J2P(new_ssl_context, SSL_CTX *)); >> @@ -283,6 +285,10 @@ TCN_IMPLEMENT_CALL(jlong, SSLContext, ma >> ssl_context_class = (*e)->NewGlobalRef(e, o); >> sni_java_callback = (*e)->GetStaticMethodID(e, ssl_context_class, >> "sniCallBack", >> "(JLjava/lang/String;)J"); >> + /* Older Tomcat versions may not have this static method */ >> + if ( JNI_TRUE == (*e)->ExceptionCheck(e) ) { >> + (*e)->ExceptionClear(e); >> + } >> } >> >> /* Set up OpenSSL call back if SNI is provided by the client */ > > This commit looks to be more extensive than the commit comment would > suggest.
If you look a little further up/down your inbox you'll see I corrected the comment. Mark --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org