[ https://issues.apache.org/jira/browse/FTPSERVER-516?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17642193#comment-17642193 ]
Gary D. Gregory edited comment on FTPSERVER-516 at 12/3/22 12:36 AM: --------------------------------------------------------------------- Hi [~chrjohn] I don't quite see how to re-implement {{org.apache.ftpserver.impl.FtpIoSession.getClientCertificates()}} in terms of the 2.2.x core. Any ideas? If did this locally: public Certificate[] getClientCertificates() { SslHandler sslHandler = SslHandler.class.cast(getAttribute(SSL_HANDLER)); if (sslHandler != null) { SSLSession sslSession = sslHandler.getEngine().getSession(); if (sslSession != null) { try { return sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { // ignore, certificate will not be available to the session } } } // no certificates available return null; } By adding SslHandler#getEngine(). Can't get the StartTlsFilter to work though. was (Author: garydgregory): Hi [~chrjohn] I don't quite see how to re-implement {{org.apache.ftpserver.impl.FtpIoSession.getClientCertificates()}} in terms of the 2.2.x core. Any ideas? If did this locally: public Certificate[] getClientCertificates() { SslHandler sslHandler = SslHandler.class.cast(getAttribute(SSL_HANDLER)); if (sslHandler != null) { SSLSession sslSession = sslHandler.getEngine().getSession(); if (sslSession != null) { try { return sslSession.getPeerCertificates(); } catch (SSLPeerUnverifiedException e) { // ignore, certificate will not be available to the session } } } // no certificates available return null; } By adding SslHandler#getEngine(). Can't get the StartTlsGadget to work though. > Bump Apache Mina Core from 2.1.6 to 2.2.1 > ----------------------------------------- > > Key: FTPSERVER-516 > URL: https://issues.apache.org/jira/browse/FTPSERVER-516 > Project: FtpServer > Issue Type: Task > Reporter: Gary D. Gregory > Priority: Major > > Bump Apache Mina Core from 2.1.6 to 2.2.1: This is NOT a drop-in replacement > as binary compatibility is broken. We do not compile with these errors: > * DISABLE_ENCRYPTION_ONCE cannot be resolved or is not a field > * The method getSslSession(FtpIoSession) is undefined for the type SslFilter > * The type FtpIoSession must implement the inherited abstract method > IoSession.isServer() > Help needed. > FWIW, there are likely a bunch of other binary compatibility issues just > based on a quick comparison so more might pop up in the future. -- This message was sent by Atlassian Jira (v8.20.10#820010) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@mina.apache.org For additional commands, e-mail: dev-h...@mina.apache.org