[ 
https://issues.apache.org/jira/browse/THRIFT-2122?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Venki Korukanti updated THRIFT-2122:
------------------------------------

    Attachment: THRIFT-2122-ssl-npe-fix.patch
    
> NPE in TSSLTransportFactory.createClient when no truststore password is 
> passed in custom SSL params
> ---------------------------------------------------------------------------------------------------
>
>                 Key: THRIFT-2122
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2122
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9
>            Reporter: Venki Korukanti
>             Fix For: 0.9.1, 1.0, 1.1, 1.2
>
>         Attachments: THRIFT-2122-ssl-npe-fix.patch
>
>
> Following code to get the SSL client transport with custom parameters return 
> NPE. Truststore password is optional, but thrift code always expects a 
> truststore password. Attached test code with the patch.
> {code}
>     TSSLTransportFactory.TSSLTransportParameters params = new
>       TSSLTransportFactory.TSSLTransportParameters();
>     params.setTrustStore(System.getProperty("javax.net.ssl.trustStore"), 
> null);
>     return TSSLTransportFactory.getClientSocket(HOST, PORT, 0/*timeout*/, 
> params);
> {code}
> Exception:
> {code}
> Error creating the transport
> org.apache.thrift.transport.TTransportException: Error creating the transport
>         at 
> org.apache.thrift.transport.TSSLTransportFactory.createSSLContext(TSSLTransportFactory.java:201)
>         at 
> org.apache.thrift.transport.TSSLTransportFactory.getClientSocket(TSSLTransportFactory.java:165)
>         at 
> org.apache.thrift.transport.TestTSSLTransportFactoryCustomClient2.getClientTransport(TestTSSLTransportFactoryCustomClient2.java:32)
>         at 
> org.apache.thrift.server.ServerTestBase.testIt(ServerTestBase.java:387)
> Caused by: java.lang.NullPointerException
>         at 
> org.apache.thrift.transport.TSSLTransportFactory.createSSLContext(TSSLTransportFactory.java:179)
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to