Hi All,

After migrating from Tomcat 9 to Tomcat 10, there is an error to introduce 
SSLHostConfig.
Introduced SSLHostConfig with Keystorefile and KeystorePassword as mentioned 
below is not working and throwing error with file is tampered.

SSLHostConfig sslHostConfig = new SSLHostConfig();
SSLHostConfigCertificate sslHostConfigCer = new SSLHostConfigCertificate( 
sslHostConfig, SSLHostConfigCertificate.Type.UNDEFINED );
sslHostConfig.setInsecureRenegotiation( false );
sslHostConfigCer.setCertificateKeystoreFile( "/var/tmp/cert/server.jks" );
sslHostConfigCer.setCertificateKeyPassword( "Temp@123456" );
sslHostConfig.addCertificate( sslHostConfigCer );
this.addSslHostConfig( sslHostConfig );


But the below mentioned code is working fine.

SSLHostConfig sslHostConfig = new SSLHostConfig();
SSLHostConfigCertificate sslHostConfigCer = new SSLHostConfigCertificate( 
sslHostConfig, SSLHostConfigCertificate.Type.UNDEFINED );
sslHostConfig.setInsecureRenegotiation( false );

// hardcording for debugging tomcat 10 concern
sslHostConfigCer.setCertificateFile( "/var/tmp/cert/server.crt" );
sslHostConfigCer.setCertificateKeyFile( "/var/tmp/cert/server.key" );
sslHostConfigCer.setCertificateKeyPassword( "Ericsson@123" );
sslHostConfig.addCertificate( sslHostConfigCer );
this.addSslHostConfig( sslHostConfig );

Please let me know why the Keystore file and password is not working.

Regards,
Abirami.S

Reply via email to