jetty-9.4.14升级存在证书无法认证的问题
双向认证,存在无法认证客户端证书的问题,问题如下
jetty-util-9.4.14之前,SslContextFactory类中的有如下的成员变量
public class SslContextFactory extends AbstractLifeCycle implements Dumpable {
private String _endpointIdentificationAlgorithm;
}
当创建SslContextFactory对象时默认值为null
private SslContextFactory(boolean trustAll, String keyStorePath) {
this._endpointIdentificationAlgorithm = null;
}
但是在jetty-util-9.4.14之后,该类中对于此成员变量的默认值有如下变动
private SslContextFactory(boolean trustAll, String keyStorePath) {
this._endpointIdentificationAlgorithm = "HTTPS";
}
所以在jetty升级过程中,会存在通信的问题,出现"could not send message"等错误,需要在代码中设置
`SslContextFactory sslContextFactory = new SslContextFactory();`
`sslContextFactory.setEndpointIdentificationAlgorithm(null); `
解决升级造成的通信异常的问题。