You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "mingleizhang (JIRA)" <ji...@apache.org> on 2017/07/23 08:08:03 UTC
[jira] [Commented] (FLINK-4849) trustStorePassword should be
checked against null in SSLUtils#createSSLClientContext
[ https://issues.apache.org/jira/browse/FLINK-4849?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16097548#comment-16097548 ]
mingleizhang commented on FLINK-4849:
-------------------------------------
There already has a NULL check condition before this , which like followling. So, load call can not throw NPE I think.
{{Preconditions.checkNotNull(trustStorePassword, SecurityOptions.SSL_TRUSTSTORE_PASSWORD.key() + " was not configured.");}}
> trustStorePassword should be checked against null in SSLUtils#createSSLClientContext
> ------------------------------------------------------------------------------------
>
> Key: FLINK-4849
> URL: https://issues.apache.org/jira/browse/FLINK-4849
> Project: Flink
> Issue Type: Bug
> Components: Security
> Reporter: Ted Yu
> Priority: Minor
>
> {code}
> String trustStorePassword = sslConfig.getString(
> ConfigConstants.SECURITY_SSL_TRUSTSTORE_PASSWORD,
> null);
> ...
> try {
> trustStoreFile = new FileInputStream(new File(trustStoreFilePath));
> trustStore.load(trustStoreFile, trustStorePassword.toCharArray());
> {code}
> If trustStorePassword is null, the load() call would throw NPE.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)