jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1197910 - /jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java
Date Sat, 05 Nov 2011 09:53:35 GMT
Author: sebb
Date: Sat Nov  5 09:53:35 2011
New Revision: 1197910

URL: http://svn.apache.org/viewvc?rev=1197910&view=rev
Log:
fileName must not be null

Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java?rev=1197910&r1=1197909&r2=1197910&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/SSLManager.java Sat Nov  5 09:53:35 2011
@@ -106,7 +106,7 @@ public abstract class SSLManager {
      */
     protected JmeterKeyStore getKeyStore() {
         if (null == this.keyStore) {
-            String fileName = System.getProperty(JAVAX_NET_SSL_KEY_STORE);
+            String fileName = System.getProperty(JAVAX_NET_SSL_KEY_STORE,""); // empty if
not provided
             String fileType = System.getProperty(JAVAX_NET_SSL_KEY_STORE_TYPE, // use the
system property to determine the type
                     fileName.toLowerCase(Locale.UK).endsWith(".p12") ? PKCS12 : "JKS"); //
otherwise use the name
             log.info("JmeterKeyStore Location: " + fileName + " type " + fileType);
@@ -121,7 +121,7 @@ public abstract class SSLManager {
             try {
                 File initStore = new File(fileName);
 
-                if (initStore.exists()) {
+                if (fileName.length() >0 && initStore.exists()) {
                     fileInputStream = new FileInputStream(initStore);
                     this.keyStore.load(fileInputStream, getPassword());
                     if (log.isInfoEnabled()) {



Mime
View raw message